IBM Sterling DevOps CLI Container: Difference between revisions

From Wiki
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
= IBM Sterling DevOps CLI Container =
== Overview ==
The '''IBM Sterling DevOps CLI Container''' is a containerized environment that provides all necessary tools to run [https://github.com/ibm-sterling-devops/ansible-ibm-sterling 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 '''IBM Sterling DevOps CLI Container''' is a containerized environment that provides all necessary tools to run [https://github.com/ibm-sterling-devops/ansible-ibm-sterling 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
The project is available at: https://github.com/ibm-sterling-devops/cli


== Key Features ==
'''Key Features'''


* '''Consistent Environment''': Eliminates "works on my machine" issues with a standardized toolset
* '''Consistent Environment''': Eliminates "works on my machine" issues with a standardized toolset
Line 15: Line 11:
* '''Container-based''': Works with both Podman and Docker
* '''Container-based''': Works with both Podman and Docker


== Included Tools ==
'''Included Tools'''


The container comes pre-installed with the following tools:
The container comes pre-installed with the following tools:
Line 38: Line 34:
|}
|}


== Available Images ==
'''Available Images'''


* '''Red Hat UBI9 Python 3.12''' based image (default) - Available for AMD64 and ARM64
* '''Red Hat UBI9 Python 3.12''' based image (default) - Available for AMD64 and ARM64
Line 44: Line 40:


== How to Use ==
== How to Use ==
=== Getting Started with Pre-built Images ===


The easiest way to start using the Sterling CLI container is to pull a pre-built image from Quay.io:
The easiest way to start using the Sterling CLI container is to pull a pre-built image from Quay.io:
Line 53: Line 47:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Using Podman
# Using Podman
podman pull quay.io/ibm-sterling-devops/sterling-cli:latest
podman pull quay.io/ibm-sterling-devops/sterling-cli:1.0.0


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


Line 63: Line 57:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Using Podman
# Using Podman
podman run -it --rm quay.io/ibm-sterling-devops/sterling-cli:latest
podman run -it --rm quay.io/ibm-sterling-devops/sterling-cli:1.0.0


# Using Docker
# Using Docker
docker run -it --rm quay.io/ibm-sterling-devops/sterling-cli:latest
docker run -it --rm quay.io/ibm-sterling-devops/sterling-cli:1.0.0
</syntaxhighlight>
</syntaxhighlight>
==== Working with Local Files ====
To work with your local Ansible playbooks and configurations, mount your workspace directory:
<syntaxhighlight lang="bash">
# Using Podman
podman run -it --rm \
  -v $(pwd):/workspace \
  -w /workspace \
  quay.io/ibm-sterling-devops/sterling-cli:latest
# Using Docker
docker run -it --rm \
  -v $(pwd):/workspace \
  -w /workspace \
  quay.io/ibm-sterling-devops/sterling-cli:latest
</syntaxhighlight>
=== Typical Workflow ===
# '''Pull the container image''' from Quay.io
# '''Mount your workspace''' containing Ansible playbooks and configuration files
# '''Run Ansible playbooks''' using the pre-installed ansible-ibm-sterling collection
# '''Access OpenShift/Kubernetes clusters''' using the included oc and kubectl tools
# '''Manage Helm charts''' for Sterling B2B Integrator deployments


=== Example: Running Ansible Playbooks ===
=== Example: Running Ansible Playbooks ===
Line 99: Line 67:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
# Start the container with your workspace mounted
# Start the container with your workspace mounted
podman run -it --rm \
podman run -it quay.io/ibm-sterling-devops/sterling-cli:1.0.0
  -v $(pwd):/workspace \
  -w /workspace \
  quay.io/ibm-sterling-devops/sterling-cli:latest
 
# Inside the container, run your Ansible playbook
ansible-playbook playbooks/deploy-sterling.yml
</syntaxhighlight>
 
=== Example: Connecting to OpenShift ===


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


# Verify connection
# Go to directory
oc get nodes
cd ansible-ibm-sterling


# Deploy using Ansible
# Deploy using Ansible
ansible-playbook playbooks/install-sterling-b2bi.yml
ansible-playbook playbooks/deploy-b2b.yml
</syntaxhighlight>
</syntaxhighlight>


Line 124: Line 82:


If you need to customize the container or build it yourself:
If you need to customize the container or build it yourself:
=== Prerequisites ===
* Podman or Docker installed
* Git for cloning the repository


=== Build Steps ===
=== Build Steps ===
Line 146: Line 99:
podman run -it --rm localhost/sterling-cli:custom
podman run -it --rm localhost/sterling-cli:custom
</syntaxhighlight>
</syntaxhighlight>
== Architecture ==
The container is built on two base images:
* '''Red Hat UBI9''' (Universal Base Image) with Python 3.12 - Default and recommended
* '''Ubuntu 24.04''' - Alternative option
Both images support AMD64 and ARM64 architectures, ensuring compatibility across different hardware platforms including:
* x86_64 servers and workstations
* Apple Silicon Macs (M1, M2, M3)
* ARM-based cloud instances
== 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.
== Project Team ==
This is a community-driven open-source project. One of the main developers and contributors is '''ebasso''', who actively maintains and enhances the project.
=== Contributing ===
We welcome contributions from IBM Sterling users, developers, and enthusiasts. You can contribute by:
* Reporting issues on [https://github.com/ibm-sterling-devops/cli/issues GitHub Issues]
* Submitting pull requests with improvements
* Suggesting new features and enhancements
* Improving documentation


== Resources ==
== Resources ==
Line 182: Line 106:
* '''Ansible Collection''': https://github.com/ibm-sterling-devops/ansible-ibm-sterling
* '''Ansible Collection''': https://github.com/ibm-sterling-devops/ansible-ibm-sterling
* '''Issue Tracker''': https://github.com/ibm-sterling-devops/cli/issues
* '''Issue Tracker''': https://github.com/ibm-sterling-devops/cli/issues
== License ==
This project is licensed under the '''Eclipse Public License - v 2.0'''.


== See Also ==
== See Also ==

Latest revision as of 16:57, 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

# Go to directory
cd ansible-ibm-sterling

# 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