The primary use case for this buildconfig and imagestream is to install a custom Ansible Tower image using the official Tower container image as its base.
This example adds several dependencies from pip and a single RPM from EPEL to demonstrate how to load a custom Tower image to your OCP internal image registry.
The official docs which outline how to consume this deploy Ansible Tower with a custom image can be found at:
Note that this has been tested with Ansible Tower 3.8.1 and 3.8.2
The example contains a BuildConfig and ImageStream which shows how you might add dependencies to your Tower container such as pandoc, or a custom Python virtualenv.
Currently this example only has 3 configurable parameters, as shown below:
Option | Value |
---|---|
TOWER_IMAGE |
registry.redhat.io/ansible-tower-38/ansible-tower-rhel7 |
TOWER_IMAGE_VERSION |
3.8.2 |
OC_CLIENT_VERSION |
4.6 |
The following prerequisites must be met prior to beginning to deploy the Ansible Tower custom image for OCP 4.x
- OpenShift Command Line Tool
- Openshift Applier to deploy custom Ansible Tower base image. As a result you'll need to have ansible installed
- Clone this repository:
git clone https://github.com/redhat-cop/containers-quickstarts
cd containers-quickstarts/tower-ocp-custom
- Run
ansible-galaxy install -r requirements.yml --roles-path=galaxy
- Login to OpenShift:
oc login -u <username> --server=https://api.<example.com>:6443
Run the openshift-applier to create the tower-ocp
project and deploy required objects
ansible-playbook -i ./applier galaxy/openshift-applier/playbooks/openshift-cluster-seed.yml
oc delete project tower-ocp