Update Containers/Kubernetes/Rancher RKE2/AWX Operator/Ansible Operator.md
This commit is contained in:
@ -10,6 +10,7 @@ You will need to deploy a [Rancher RKE2 Cluster](https://docs.bunny-lab.io/Conta
|
|||||||
|
|
||||||
!!! tip
|
!!! tip
|
||||||
If this is a virtual machine, after deploying the RKE2 cluster and validating it functions, now would be the best time to take a checkpoint / snapshot of the VM before moving forward, in case you need to perform rollbacks of the server(s) if you accidentally misconfigure something during deployment.
|
If this is a virtual machine, after deploying the RKE2 cluster and validating it functions, now would be the best time to take a checkpoint / snapshot of the VM before moving forward, in case you need to perform rollbacks of the server(s) if you accidentally misconfigure something during deployment.
|
||||||
|
|
||||||
## Server Configuration
|
## Server Configuration
|
||||||
The AWX deployment will consist of 3 yaml files that configure the containers for AWX as well as the NGINX ingress networking-side of things. You will need all of them in the same folder for the deployment to be successful. For the purpose of this example, we will put all of them into a folder located at `/awx`.
|
The AWX deployment will consist of 3 yaml files that configure the containers for AWX as well as the NGINX ingress networking-side of things. You will need all of them in the same folder for the deployment to be successful. For the purpose of this example, we will put all of them into a folder located at `/awx`.
|
||||||
|
|
||||||
@ -22,7 +23,7 @@ cd /awx
|
|||||||
ulimit -n 4096
|
ulimit -n 4096
|
||||||
```
|
```
|
||||||
|
|
||||||
### Create the AWX deployment configuration files
|
### Create AWX Deployment Donfiguration 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.
|
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.yml"
|
=== "awx.yml"
|
||||||
@ -73,17 +74,26 @@ You will need to create these files all in the same directory using the content
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Deploy AWX using Kustomize
|
## 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.bunny-lab.io/Containers/Kubernetes/Rancher%20RKE2/AWX%20Operator/Ansible%20Operator/#troubleshooting) section if you want to track the progress more directly.
|
Now it is time to tell Kubernetes to read the configuration files using Kustomize (*built-in to newer versions of Kubernetes*) to deploy AWX into the cluster.
|
||||||
|
!!! warning "Be Patient"
|
||||||
|
The AWX deployment process can take a while. 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 after running the commands below.
|
||||||
|
|
||||||
|
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.
|
||||||
``` sh
|
``` sh
|
||||||
cd /awx
|
cd /awx
|
||||||
kubectl apply -k .
|
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.
|
|
||||||
|
|
||||||
## Access the WebUI behind Ingress Controller
|
## Access the AWX 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.
|
After you have deployed AWX into the cluster, it will not be immediately accessible to the host's network (such as your personal 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.
|
||||||
- AWX WebUI: https://ansible.cyberstrawberry.net
|
|
||||||
|
The RKE2 Cluster will translate `awx.bunny-lab.io` 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.
|
||||||
|
|
||||||
|
!!! failure "Nested Reverse Proxy Issues"
|
||||||
|
My homelab environment primarily uses a Traefik reverse proxy to handle all communications, but AWX currently has issues running behind Traefik/NGINX, and documentation outlining how to fix this does not exist here yet. For the time being, when you create the DNS record, use an `A` record pointing directly to the IP address of the Virtual Machine running the Rancher / AWX Operator cluster.
|
||||||
|
|
||||||
|
- AWX WebUI: https://awx.bunny-lab.io
|
||||||
|
|
||||||
### Retrieving the Auto-Generated Admin Password
|
### Retrieving the Auto-Generated Admin Password
|
||||||
AWX will generate its own secure password the first time you set up AWX. This password is stored as a *secret* in Kubernetes. You can navigate to the WebUI of Rancher in the RKE2 Cluster as long as you have a DNS record matching the hostname you assigned to Rancher the first time you signed in.
|
AWX will generate its own secure password the first time you set up AWX. This password is stored as a *secret* in Kubernetes. You can navigate to the WebUI of Rancher in the RKE2 Cluster as long as you have a DNS record matching the hostname you assigned to Rancher the first time you signed in.
|
||||||
- Rancher WebUI: https://awx-cluster.cyberstrawberry.net
|
- Rancher WebUI: https://awx-cluster.cyberstrawberry.net
|
||||||
|
Reference in New Issue
Block a user