From 9f63fc0da5ac80724654a6b23fd63cc454dc8c76 Mon Sep 17 00:00:00 2001 From: Shane McDonald Date: Mon, 25 Apr 2022 15:54:45 -0400 Subject: [PATCH] Add docs/debugging.md --- docs/debugging.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 docs/debugging.md diff --git a/docs/debugging.md b/docs/debugging.md new file mode 100644 index 00000000..0ae3c3e0 --- /dev/null +++ b/docs/debugging.md @@ -0,0 +1,51 @@ +# Iterating on the installer without deploying the operator + +Go through the [normal basic install](https://github.com/ansible/awx-operator/blob/devel/README.md#basic-install) steps. + +Install some dependencies: + +``` +$ ansible-galaxy collection install -r molecule/requirements.yml +$ pip install -r molecule/requirements.txt +``` + +To prevent the changes we're about to make from being overwritten, scale down any running instance of the operator: + +``` +$ kubectl scale deployment awx-operator-controller-manager --replicas=0 +``` + +Create a playbook that invokes the installer role (the operator uses ansible-runner's role execution feature): + +```yaml +# run.yml +--- +- hosts: localhost + roles: + - installer +``` + +Create a vars file: + +```yaml +# vars.yml +--- +ansible_operator_meta: + name: awx + namespace: awx +ingress_type: ingress +``` + +Run the installer: + +``` +$ ansible-playbook run.yml -e @vars.yml -v +``` + +Grab the URL and admin password: + +``` +$ minikube service awx-service --url -n awx +$ minikube kubectl get secret awx-admin-password -- -o jsonpath="{.data.password}" | base64 --decode +LU6lTfvnkjUvDwL240kXKy1sNhjakZmT +```