From 8e45e40ceb124d2169c19a620d8e0d7eb2659d0f Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Fri, 19 Jan 2024 23:33:02 -0700 Subject: [PATCH] Update Containers/Kubernetes/Rancher RKE2/AWX Operator/Ansible Operator.md --- .../AWX Operator/Ansible Operator.md | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/Containers/Kubernetes/Rancher RKE2/AWX Operator/Ansible Operator.md b/Containers/Kubernetes/Rancher RKE2/AWX Operator/Ansible Operator.md index 934dd38..00fc2a1 100644 --- a/Containers/Kubernetes/Rancher RKE2/AWX Operator/Ansible Operator.md +++ b/Containers/Kubernetes/Rancher RKE2/AWX Operator/Ansible Operator.md @@ -2,30 +2,31 @@ Deploying a Rancher RKE2 Cluster-based Ansible AWX Operator server. This can scale to a larger more enterprise environment if needed. !!! note Prerequisites - This document assumes you are running **Ubuntu Server 20.04** or later with at least 8GB of memory and 4 CPU cores. + This document assumes you are running **Ubuntu Server 20.04** or later with at least 8GB of memory, 4 CPU cores, and 64GB of storage. ![Ansible AWX WebUI](awx.png) ## Deploy Rancher RKE2 Cluster You will need to deploy a [Rancher RKE2 Cluster](https://docs.bunny-lab.io/Containers/Kubernetes/Rancher%20RKE2/Rancher%20RKE2%20Cluster/) on an Ubuntu Server-based virtual machine. After this phase, you can focus on the Ansible AWX-specific deployment. A single ControlPlane node is all you need to set up AWX, additional infrastructure can be added after-the-fact. -:::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. -::: +!!! 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. + ## 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`. -### Make the deployment folder -``` + +``` sh +# Make the deployment folder mkdir -p /awx cd /awx -``` -### Run a command to adjust open file limits in Ubuntu Server (just-in-case) -``` + +# Run a command to adjust open file limits in Ubuntu Server (just-in-case) 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=ansible.cyberstrawberry.net` in the `awx-ingress.yml` file to a hostname you can point a DNS server / record to. -```jsx title="nano /awx/kustomization.yml" +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. +``` yaml jsx title="/awx/kustomization.yml" apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: @@ -37,7 +38,7 @@ images: newTag: 2.4.0 namespace: awx ``` -```jsx title="nano /awx/awx.yml" +```yaml jsx title="/awx/awx.yml" apiVersion: awx.ansible.com/v1beta1 kind: AWX metadata: @@ -45,14 +46,14 @@ metadata: spec: service_type: ClusterIP ``` -```jsx title="nano /awx/awx-ingress.yml" +``` yaml jsx title="/awx/awx-ingress.yml" apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: awx-ingress spec: rules: - - host: ansible.cyberstrawberry.net + - host: awx.bunny-lab.io http: paths: - pathType: Prefix @@ -63,6 +64,7 @@ spec: port: number: 80 ``` + ## 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.