IBM Sterling DevOps CLI Container: Difference between revisions

From Wiki
Line 96: Line 96:
podman run -it --rm localhost/sterling-cli:custom
podman run -it --rm localhost/sterling-cli:custom
</syntaxhighlight>
</syntaxhighlight>
== Integration with ansible-ibm-sterling ==
This CLI container is designed to work seamlessly with the [https://github.com/ibm-sterling-devops/ansible-ibm-sterling ansible-ibm-sterling] Ansible collection. The automation engine performs all deployment and management tasks through Ansible playbooks, which can be executed directly within this container environment.


== Resources ==
== Resources ==

Revision as of 16:56, 27 January 2026

The IBM Sterling DevOps CLI Container is a containerized environment that provides all necessary tools to run ansible-ibm-sterling automation scripts. This project eliminates environment inconsistencies by packaging essential CLI tools, Python packages, and dependencies required for IBM Sterling B2B Integrator deployment and management on Red Hat OpenShift and Kubernetes platforms.

The project is available at: https://github.com/ibm-sterling-devops/cli

Key Features

  • Consistent Environment: Eliminates "works on my machine" issues with a standardized toolset
  • Multi-Architecture Support: Available for both AMD64 and ARM64 architectures
  • Pre-configured Tools: All required dependencies installed and ready to use
  • Ansible Ready: Includes ansible-ibm-sterling collection and all prerequisites
  • Container-based: Works with both Podman and Docker

Included Tools

The container comes pre-installed with the following tools:

Package Version AMD64 ARM64
python3 3.12 Y Y
helm 3.16.3 Y Y
oc latest Y Y
oc ibm-pak 1.21.1 Y Y
rclone latest Y Y
kubectl latest Y Y
ibmcloud 2.40.0 Y Y

Available Images

  • Red Hat UBI9 Python 3.12 based image (default) - Available for AMD64 and ARM64
  • Ubuntu 24.04 based image - Alternative option

How to Use

The easiest way to start using the Sterling CLI container is to pull a pre-built image from Quay.io:

Pull the Latest Image

# Using Podman
podman pull quay.io/ibm-sterling-devops/sterling-cli:1.0.0

# Using Docker
docker pull quay.io/ibm-sterling-devops/sterling-cli:1.0.0

Run the Container

# Using Podman
podman run -it --rm quay.io/ibm-sterling-devops/sterling-cli:1.0.0

# Using Docker
docker run -it --rm quay.io/ibm-sterling-devops/sterling-cli:1.0.0

Example: Running Ansible Playbooks

# Start the container with your workspace mounted
podman run -it quay.io/ibm-sterling-devops/sterling-cli:1.0.0

# Inside the container
oc login --token=<your-token> --server=https://api.your-cluster.com:6443

# Deploy using Ansible
ansible-playbook playbooks/deploy-b2b.yml

Building Custom Images

If you need to customize the container or build it yourself:

Build Steps

# Clone the repository
git clone https://github.com/ibm-sterling-devops/cli.git
cd cli/image

# Build for AMD64
podman build --build-arg ARCHITECTURE=amd64 -f Dockerfile.ubi9 -t sterling-cli:custom .

# Build for ARM64
podman build --build-arg ARCHITECTURE=arm64 -f Dockerfile.ubi9 -t sterling-cli:custom .

# Test your custom image
podman run -it --rm localhost/sterling-cli:custom

Resources

See Also