I’ve had a few requests for this demo as It seems like a lot of people are having issues setting up the new version of AWX. Before v18, (v17) you could simply install AWX on a server with enough resources. Now, the preferred way to install AWX is via the AWX-operator. So you need a Kubernetes or OpenShift cluster. For this demo, I’m using Minikube.
Subscribe To Me On YouTube: https://bit.ly/lon_sub
(if you get any errors, check the bottom of this page for the fix)
I’m using minikube because it’s a single node cluster and it keeps the price down. I did try this on a t2.medium, but there just weren’t enough resources to get it working.
- Install and setup kubectl and docker.
- Installing and setting up Minikube in EC2 [t3a.xlarge – 4 x cpu / 16gb memory]
- ami-0194c3e07668a7e36
- You might be able to get away with less resources)
- Setup the AWX-operator (latest version – 0.10.0) and deploy.
- Get the AWX admin password.
- Forward the service port so we can access it from the internet and use minikube tunnel.
- Login to AWX and take a quick tour.
- All commands will be added into the description.
Make sure you have enough FREE Disk space. 10GB+ please
https://github.com/ansible/awx-operator https://github.com/ansible/awx-operator/tags
If you like the demo, hit subscribe for more videos like this and give it a like.
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
kubectl version --client
sudo apt-get update -y && sudo apt-get install -y docker.io
There is an issue with the latest version (1.22) Please install 1.21 for now.
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/```
curl -Lo minikube https://github.com/kubernetes/minikube/releases/download/v1.21.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
sudo usermod -aG docker $USER
LOGOUT & BACK IN AGAIN
groups $USER
minikube start --addons=ingress --cpus=2 --install-addons=true --kubernetes-version=stable --memory=6g
kubectl get nodes
kubectl get pods
kubectl get pods -A
kubectl apply -f https://raw.githubusercontent.com/ansible/awx-operator/0.10.0/deploy/awx-operator.yaml
kubectl get pods
vi awx-demo.yml
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx-demo
spec:
service_type: nodeport
ingress_type: none
hostname: awx-demo.example.com
kubectl apply -f awx-demo.yml
kubectl get pods -l "app.kubernetes.io/managed-by=awx-operator"
kubectl get svc -l "app.kubernetes.io/managed-by=awx-operator"
WAIT A FEW MINS...
kubectl get secrets
kubectl get secret awx-demo-admin-password -o jsonpath="{.data.password}" | base64 --decode
kubectl expose deployment awx-demo --type=LoadBalancer --port=8080
On a new session, start the minikube tunnel:
minikube tunnel
kubectl port-forward svc/awx-demo-service --address 0.0.0.0 30886:80
Now visit https://your_ip:high_port
You may need to update your FW rules to be able to connect to the AWX login screen
--- ISSUES SECTION ---
-
Starting minikube tunnel - Exiting due to GUEST_STATUS: state: unknown state "minikube": docker container inspect minikube --format=: exit status 1 ANS:
sudo chmod 666 /var/run/docker.sock ; sudo usermod -aG docker ${USER}
-
If you see the message: ImagePullBackOff or ErrImagePull when you run kubectl get pods, run the following command to see what the issue is:
kubectl describe pods <my-pod> # Output from "kubectl get pods" command for the pod with the issue.
I've seen a few issues where the server runs out of space so it should be easy to fix.
- If you have PENDING resources, try running a describe of the resource. If you see this at the bottom you are lacking in resources:
(
kubectl describe pods <my-pod>
# Output fromkubectl get pods
)
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 14s (x19 over 23m) default-scheduler 0/1 nodes are available: 1 Insufficient cpu, 1 Insufficient memory.
This link has some more information: https://containersolutions.github.io/runbooks/posts/kubernetes/0-nodes-available-insufficient/
Hi Max18-100. I've not looked at this for a long time! The thing that came up many times before was the VM not having enough resources. In my demo, I used a t3a.xlarge – 4 x cpu / 16gb memory in AWS. You will need at least 4 CPUs and 8GB memory for it to work properly.
I did try to get a T2.medium working (2CPU X 4GB) but it wasn't enough.
Does your VM have enough resources? Alternatively try the K3 install.: https://github.com/kurokobo/awx-on-k3s. I have another video with a demo on my channel here: https://www.youtube.com/watch?v=xVOnBDvpbK0