awx.md (2704B)
1 # awx 2 3 ## basic install 4 follow the [install guide][] but these are the stripped down steps 5 6 * clone repo (use https not ssh) and switch to [latest tag][] 7 ``` 8 git clone https://github.com/ansible/awx-operator.git 9 cd awx-operator && \ 10 git checkout tags/<tag> 11 ``` 12 * make 13 ``` 14 make deploy 15 ``` 16 * wait for 2 running 17 * this skips the need to have your own `kustomization.yaml` but it seems we need it later any way 18 ``` 19 --- 20 apiVersion: kustomize.config.k8s.io/v1beta1 21 kind: Kustomization 22 resources: 23 # Find the latest tag here: https://github.com/ansible/awx-operator/releases 24 - github.com/ansible/awx-operator/config/default?ref=<tag> 25 26 # Set the image tags to match the git version from above 27 images: 28 - name: quay.io/ansible/awx-operator 29 newTag: <tag> 30 31 # Specify a custom namespace in which to install AWX 32 namespace: awx 33 ``` 34 * check operator is running 35 ``` 36 kubectl get pods -n awx 37 ``` 38 * set default namespace 39 ``` 40 kubectl config set-context --current --namespace=awx 41 ``` 42 * check or create `awx-demo.yml` 43 ``` 44 --- 45 apiVersion: awx.ansible.com/v1beta1 46 kind: AWX 47 metadata: 48 name: awx-demo 49 spec: 50 service_type: nodeport 51 ``` 52 * add `awx-demo` to `kustomization.yaml` (see, told you we needed it) 53 ``` 54 ... 55 resources: 56 - github.com/ansible/awx-operator/config/default?ref=<tag> 57 # Add this extra line: 58 - awx-demo.yml 59 ... 60 ``` 61 * apply changes 62 ``` 63 kubectl apply -k . 64 ``` 65 * check deployment 66 ``` 67 kubectl logs -f deployments/awx-operator-controller-manager -c awx-manager -n awx 68 kubectl get pods -l "app.kubernetes.io/managed-by=awx-operator" -n awx 69 kubectl get svc -l "app.kubernetes.io/managed-by=awx-operator" -n awx 70 ``` 71 ## don't need this, and minikube isn't configured 72 #* install minikube, because we need it and it isn't installed already 73 #``` 74 #curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb 75 #dpkg -i minikube_latest_amd64.deb 76 #``` 77 #* get service url 78 #``` 79 #minikube service -n awx awx-demo-service --url 80 #``` 81 * create ingress.yaml 82 ``` 83 apiVersion: networking.k8s.io/v1 84 kind: Ingress 85 metadata: 86 name: awx-demo-service 87 annotations: 88 ingress.kubernetes.io/ssl-redirect: "false" 89 spec: 90 rules: 91 - http: 92 paths: 93 - path: / 94 pathType: Prefix 95 backend: 96 service: 97 name: awx-demo-service 98 port: 99 number: 80 100 ``` 101 * create ingress 102 ``` 103 kubectl create -f ./ingress.yaml 104 kubectl describe ingress 105 ``` 106 * get admin password 107 ``` 108 kubectl get secret awx-demo-admin-password -o jsonpath="{.data.password}" | base64 --decode ; echo 109 ``` 110 111 [install guide]: https://ansible.readthedocs.io/projects/awx-operator/en/latest/installation/basic-install.html 112 [latest tag]: https://github.com/ansible/awx-operator/releases