Currently using the Github action workflow files to execute the merging branch for integration testing. Trying to test with a local AWX instance is still under works.
In order to do the integration testing there needs to be a publicly accessible version of AWX that Github actions can use. If doing this with private runners, then the runner needs access to AWX in your environment.
Included is some prebuilt k8s kustomize templates for various cloud providers in order to build an AWX instance that is publicly exposed.
Be sure to follow the AWX Operator documentation if there are any questions to deploying an AWX instance.
These are general actions that are needed for any AWX Instance setup.
Clone and switch to the branch with the version of operator to install
git clone git@github.com:ansible/awx-operator.git
cd awx-operator
git tag
git checkout tags/<tag>
Copy in kubernetes/**/kustomization.yaml
and kubernetes/**/awx-demo.yaml
files into the awx-operator
directory.
Replace <TAG>
in kustomization.yaml
file with the version of the operator to install.
Apply the current config:
kubectl apply -k .
Update the conxt to use awx namespace as a default.
kubectl config set-context --current --namespace=awx
You can use kubectl get pods
in order to see the awx-operator pod. Once its deployed you can move on.
Update kustomization.yaml
and remove the comment under resources for the awx-demo.yaml file.
...
resources:
- github.com/ansible/awx-operator/config/default?ref=<TAG>
- awx-demo.yaml
...
Apply the new updates.
kubectl apply -k .
To get pods deployed by the awx-operator:
kubectl get pods -l "app.kubernetes.io/managed-by=awx-operator"
To get the LoadBalancer service
kubectl get svc -l "app.kubernetes.io/managed-by=awx-operator"
To get the logs
kubectl logs -f deployments/awx-operator-controller-manager -c awx-manager
To get the admin password:
kubectl get secret awx-demo-admin-password -o jsonpath="{.data.password}" | base64 --decode ; echo
Currently my preferred method since its cheap and easy to use.
There are some consdiertions when trying to setup the load balancer. The files in kubernetes/digitalocean/
should be sufficient enough to setup a basic one without SSL.
Review the Digital Ocean LoadBalancer setup documents for more details.
Included is some basic exports of some builtin templates in order to do some simple integration testing. You can import the templates using awxcli. Otherwise, you can create them manually or use your own pre-made templates.
Import Job Templates:
awx --conf.host ${AWX_HOST} \
--conf.username ${AWX_USERNAME} \
--conf.password ${AWX_PASSWORD} \
import < exports/job_templates.json
Import Workflow Job Templates:
awx --conf.host ${AWX_HOST} \
--conf.username ${AWX_USERNAME} \
--conf.password ${AWX_PASSWORD} \
import < exports/workflow_job_templates.json