summaryrefslogtreecommitdiffstats
path: root/docs/development
diff options
context:
space:
mode:
authorElijah DeLee <kdelee@redhat.com>2022-01-27 14:16:49 +0100
committerElijah DeLee <kdelee@redhat.com>2022-01-27 14:37:14 +0100
commit598c8a1c4d7e23152032bd0b9b84340d4ce5b461 (patch)
tree456d89d5052e3c4230fb9ac23a4fa073dd3b0a7c /docs/development
parentMerge pull request #11569 from zjzh/devel (diff)
downloadawx-598c8a1c4d7e23152032bd0b9b84340d4ce5b461.tar.xz
awx-598c8a1c4d7e23152032bd0b9b84340d4ce5b461.zip
Update minikube docs
Replace reference to a non-existent playbook with current directions from awx-operator Also add some tips about how to interact with the deployment
Diffstat (limited to 'docs/development')
-rw-r--r--docs/development/minikube.md59
1 files changed, 56 insertions, 3 deletions
diff --git a/docs/development/minikube.md b/docs/development/minikube.md
index ff5a931baa..93a3afb8ba 100644
--- a/docs/development/minikube.md
+++ b/docs/development/minikube.md
@@ -35,10 +35,15 @@ For the following playbooks to work, you will need to:
$ pip install openshift
```
-If you are not changing any code in the operator itself, simply run:
+If you are not changing any code in the operator itself, git checkout the latest version from https://github.com/ansible/awx-operator/releases, and then run the following command (from the awx-operator repo):
```
-$ ansible-playbook ansible/deploy-operator.yml
+$ alias kubectl="minikube kubectl --"
+$ export NAMESPACE=my-namespace
+$ kubectl create namespace $NAMESPACE
+$ kubectl config set-context --current --namespace=$NAMESPACE
+$ make deploy
+
```
If making changes to the operator itself, run the following command in the root
@@ -70,9 +75,24 @@ $ ansible-playbook ansible/instantiate-awx-deployment.yml \
-e image_version=devel \
-e image_pull_policy=Always \
-e service_type=nodeport \
- -e namespace=default
+ -e namespace=$NAMESPACE
+```
+Check the operator with the following commands:
+
+```
+# Check the operator deployment
+$ kubectl get deployments
+NAME READY UP-TO-DATE AVAILABLE AGE
+awx 1/1 1 1 16h
+awx-operator-controller-manager 1/1 1 1 16h
+
+$ kubectl get pods
+NAME READY STATUS RESTARTS AGE
+awx-operator-controller-manager-b775bfc7c-fn995 2/2 Running 0 16h
```
+If there are errors in the image pull, check that it is using the right tag. You can update the tag that it will pull by editing the deployment.
+
### Custom AWX Development Image for Kubernetes
I have found `minikube cache add` to be unacceptably slow for larger images such
@@ -102,6 +122,39 @@ the AWX Pod. A new Pod will respawn with the latest revision.
## Accessing AWX
+To access via the web browser, run the following command:
```
$ minikube service awx-service --url
```
+
+To retreive your admin password
+```
+$ kubectl get secrets awx-admin-password -o json | jq '.data.password' | xargs | base64 -d
+```
+
+To tail logs from the containers
+```
+# Find the awx pod name
+kubectl get pods
+NAME READY STATUS RESTARTS AGE
+awx-56fbfbb6c8-jkhzl 4/4 Running 0 13h
+awx-operator-controller-manager-b775bfc7c-fn995 2/2 Running 0 16h
+awx-postgres-0 1/1 Running 0 16h
+
+# now you know the pod name, tail logs from task container in pod
+kubectl logs -f awx-56fbfbb6c8-jkhzl -n awx -c awx-task
+
+# alternatively, or in a different window tail logs from the web container in pod
+kubectl logs -f awx-56fbfbb6c8-jkhzl -n awx -c awx-web
+```
+
+To exec in to the container:
+```
+# Using same pod name we found above from "kubectl get pods"
+$ kubectl exec -it awx-56fbfbb6c8-k6p82 -c awx-task bash
+```
+
+The application will live reload when files are edited just like in the development environment. Just like in the development environment, if the application totally crashes because files are invalid syntax or other fatal problem, you will get an error like "no python application" in the web container. Delete the whole control plane pod and wait until a new one spins up automatically.
+```
+$ kubectl delete pod awx-56fbfbb6c8-k6p82
+```