diff --git a/Containers/Kubernetes/Rancher RKE2/AWX Operator/Ansible Operator.md b/Containers/Kubernetes/Rancher RKE2/AWX Operator/Ansible Operator.md index 6d0f9a4..4aacc9c 100644 --- a/Containers/Kubernetes/Rancher RKE2/AWX Operator/Ansible Operator.md +++ b/Containers/Kubernetes/Rancher RKE2/AWX Operator/Ansible Operator.md @@ -26,24 +26,9 @@ ulimit -n 4096 ### Create the AWX deployment configuration files You will need to create these files all in the same directory using the content of the examples below. Be sure to replace values such as the `spec.host=awx.bunny-lab.io` in the `awx-ingress.yml` file to a hostname you can point a DNS server / record to. -=== "/awx/kustomization.yml" +=== "awx.yml" - ```jsx title="kustomization.yml" - apiVersion: kustomize.config.k8s.io/v1beta1 - kind: Kustomization - resources: - - github.com/ansible/awx-operator/config/default?ref=2.4.0 - - awx.yml - - awx-ingress.yml - images: - - name: quay.io/ansible/awx-operator - newTag: 2.4.0 - namespace: awx - ``` - -=== "/awx/awx.yml" - - ```jsx title="awx.yml" + ```jsx title="/awx/awx.yml" apiVersion: awx.ansible.com/v1beta1 kind: AWX metadata: @@ -52,13 +37,13 @@ You will need to create these files all in the same directory using the content service_type: ClusterIP ``` -=== "awx-ingress.yml" +=== "ingress.yml" - ```jsx title="/awx/awx-ingress.yml" + ```jsx title="/awx/ingress.yml" apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: awx-ingress + name: ingress spec: rules: - host: awx.bunny-lab.io @@ -73,15 +58,30 @@ You will need to create these files all in the same directory using the content number: 80 ``` +=== "kustomization.yml" + + ```jsx title="/awx/kustomization.yml" + apiVersion: kustomize.config.k8s.io/v1beta1 + kind: Kustomization + resources: + - github.com/ansible/awx-operator/config/default?ref=2.4.0 + - awx.yml + - ingress.yml + images: + - name: quay.io/ansible/awx-operator + newTag: 2.4.0 + namespace: awx + ``` + ## Deploy AWX using Kustomize -Now it is time to tell Rancher / Kubernetes to read the configuration files using Kustomize (built-in to newer versions of Kubernetes) to deploy AWX into the cluster. Be sure that you are still in the `/awx` folder before running this command. **Be Patient: ** The AWX deployment process can take a while. Go grab a cup of coffee and use the commands in the [Troubleshooting](https://docs.cyberstrawberry.net/Container%20Documentation/Kubernetes/Rancher%20RKE2/RKE2%20Ansible%20AWX#troubleshooting) - section if you want to track the progress more directly. -``` +Now it is time to tell Rancher / Kubernetes to read the configuration files using Kustomize (built-in to newer versions of Kubernetes) to deploy AWX into the cluster. Be sure that you are still in the `/awx` folder before running this command. **Be Patient: ** The AWX deployment process can take a while. Go grab a cup of coffee and use the commands in the [Troubleshooting](https://docs.bunny-lab.io/Containers/Kubernetes/Rancher%20RKE2/AWX%20Operator/Ansible%20Operator/#troubleshooting) section if you want to track the progress more directly. +``` sh +cd /awx kubectl apply -k . ``` -:::caution -If you get any errors mentioning "**CRD**" in the output, re-run the `kubectl apply -k .` command a second time after waiting about 10 seconds. The second time the error should be gone. -::: +!!! caution + If you get any errors mentioning "**CRD**" in the output, re-run the `kubectl apply -k .` command a second time after waiting about 10 seconds. The second time the error should be gone. + ## Access the WebUI behind Ingress Controller After you have deployed AWX into the cluster, it will not be immediately accessible to the host's network (such as your home computer) unless you set up a DNS record pointing to it. In the example above, you would have an `A` or `CNAME` DNS record pointing to the internal IP address of the Rancher RKE2 Cluster host. The RKE2 Cluster will translate `ansible.cyberstrawberry.net` to the AWX web-service container(s) automatically. SSL certificates are not covered in this documentation, but suffice to say, the can be configured on another reverse proxy such as Traefik or via Cert-Manager / JetStack. The process of setting this up goes outside the scope of this document. - AWX WebUI: https://ansible.cyberstrawberry.net