I see mention of docker_registry_repository to pull and push images to docker or other private registry, but don’t see any information on how to pull AWX images from a private registry other than public docker hub registry.
We’re setting up AWX but unable to build our own docker images for Kubernetes environment since our network is very restrictive and running into all kinds of issues when Ansible tries to build npm, pip, nodejs and other software.
So I gave up building our own AWX docker image after multiple attempts. At the end our requirement is to be able to add LDAP utilities, jq, wget, and few other custom utilities and use that image instead of docker hosted AWX image.
I created a simple Dockerfile as below and able to create an image with jq, wget, and gcc just to prove that it’s working.
Now how do I make use of this image instead of the default AWX docker image for Kubernetes deployment. I am aware of workaround where I can modify Kubernetes runtime deployment configuration to use a different image and registry and let Kubernetes pull AWX image from there, but would like to know if there is a better way than this.
I have a similar requirement but its very simple it terms of what you are doing .
My requirement is that I must be able to mount a remote mount in awx, the way we are running awx is standalone docker images
This what I did to make things work in normal environment
So when awx is installed in a normal estate all it does is within the {{awx git repo clone}}/installer/roles/local_docker/templates/docker-compose.yml.j2
and from that it creates /root/.awx/awxcompose/docker-compose.yml
All I had to do was edit /root/.awx/awxcompose/docker-compose.yml to mount the volume ( this is the same place where you can use custom images as well)
The only bad side of such a setup is everyime I upgrade my awx instance I will need to manually change the file to add the remote mount.
I initially thought that I would create a custom image like what you have done but I felt its too much of a faff for a simple remote mount in a container.
I am sure similar things can be done in the k8s as well, I have done awx setup in k8s , I will do the same in minikube and will get back to you by Saturday.
I understand this is not exactly what you are after but I felt like sharing in case if this helps you meanwhile
Found out that it’s actually very simple to use a different AWX image. Create an image as mentioned above with base AWX image as above, tag and push that image to internal private registry.
After that all I had to do was update awx/installer/roles/kubernetes/defaults/main.yml with following changes and leave following inventory entries as is.
Added entry for secret to be used by awx serviceaccount during Kubernetes deployment as part of imagePullSecrets that’s required to pull images from a private registry.
kubernetes_image_pull_secrets: myimagepullsecret
This helps us to use new AWX releases without much hassle and not lose existing AWX projects, Orgs, Teams, etc… since those are saved in PostgreSQL DB. I guess we have to deal with that situation when we update the DB but should work fine since the DB data is stored on a mounted NFS drive, instead of the local Kubernetes worker node.