Hi Team,
I have installed the AWX using Minikube cluster in my local. I have followed the basic installation steps using this link: https://github.com/ansible/awx-operator
Now, as next step I wanted to dockerize this application (to create a Dockerfile), so that it can be delploy in the cloud environment. Could you please give me the suggestion or any steps that how I can proceed further here
Thanks & Regards
Neha Singh
We recommend spinning up a k8s cluster using GKE (or similar cloud provider) and use the awx-operator to deploy AWX there.
We do have docker based deployments, but this is intended for development or testing purposes only. The documentation for setting that up is here https://github.com/ansible/awx/blob/devel/CONTRIBUTING.md
AWX Team
Hi Team,
I checked the given link. But I am not sure, this is something I am looking for. I wanted to create a dockerfile (then build the same and push into dockerhub or other registry). then that pushed image (from registry) will be going to deploy on Kubernetes (IBM cloud). Could you please let me know where should I check first for the above specified requirement.
Thanks & Regards
Neha Singh
Hi,
If I understand correctly, you would like to deploy an AWX instance on Kubernetes.
The process is rather simple:
-
prepare the storage for the database and awx pod, pv, pvc
-
Clone the operator git repo and deploy it in your chosen namespace
-
prepare manifest to deploy awx and apply it to the namespace where the operator is deployed with kubectl or kustomization
There are lots of examples available:
https://github.com/antuelle78/awx-install-on-k3s
https://github.com/kurokobo/awx-on-k3s
These repos are for k3s, but they contain examples of kustomization, pv, pvc, and awx manifests.
Hope that helps,
Regards,
Antuelle78
Hello Michael,
Thanks for the prompt reply.
I got this step using kubectl and performed the same in my local environment cluster.
But now I am looking for the dockerization of this application like…through Dockerfile and then deploy the docker file in any cloud instance (like ec2 etc.)
Thanks & Regards
Neha Singh
Hi Neha,
If your goal is to deploy on any cloud instance, it’s best if you follow the recommendations from the AWX Team.
The links provided in my previous message can help.
The most important thing to note is that k3s(lightweight kubernetes) is installed on a single node and awx deployed.
Not sure why you want to create a “Dockerfile”.
Regards,
Thanks for the required details.
I’ll follow up with the given links regarding deploying the application in k8s.
Just one question though. Regarding Dockerfile, I wanted to build the image for this application. So that is why I am checking whether it is feasible or not. This application can be run through container or not?
Thanks and Regards
Neha Singh
Hi Neha,
To provide some clarification,
the normal recommended install (via awx-operator) already uses a containerized version of AWX.
awx-operator will deploy this image in a pod, quay.io/repository/ansible/awx
So, by using k8s (awx-operator), you already are using a containerized version of AWX
Hope that helps
Seth
Hi Neha, are you aware that kubernetes IS a containerisation platform?
You say “This application can be run through container or not?”
You already are running AWX in containers with minikube, so no need to use docker.
When you deploy AWX with the operator it sets up everything that is required for containers to run in pods (groups of containers), with correct storage/database etc.
Those containers in kubernetes are already using a container (docker) image anyway, so why would you want to rebuild one?
These are the container images that AWX 21.7 currently use:
quay.io/ansible/awx:21.7.0
quay.io/ansible/awx-ee:latest
docker.io/redis:7
To build all these into one image and run in one docker container would be an epic feat requiring complete re-architecting of how AWX now works (ie., undoing everything that has been done to containerise AWX in the first place)
You say your requirement is to “deploy the docker file in any cloud instance (like ec2 etc.)”
All cloud providers have a kubernetes option similar to minikube, so just deploy directly to them.
Murf.