====== AWX ======
===== Database =====
# CREATE ROLE awx LOGIN;
postgres=# \password awx
postgres=# CREATE DATABASE awx OWNER awx;
postgres=# \q
$ vim ${PGDATA}/pg_hba.conf
[...]
# Acesso AWX Kubernetes
host awx awx 2804:694:4c00:4007::/64 scram-sha-256
$ pg_ctl reload
===== Configure =====
$ curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" |
$ sudo mv kustomize /usr/local/bin/
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
# Find the latest tag here: https://github.com/ansible/awx-operator/releases
- github.com/ansible/awx-operator/config/default?ref=1.1.4
# Set the image tags to match the git version from above
images:
- name: quay.io/ansible/awx-operator
newTag: 1.1.4
# Specify a custom namespace in which to install AWX
namespace: awx
$ kustomize build . | kubectl apply -f -
# Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.
namespace/awx created
customresourcedefinition.apiextensions.k8s.io/awxbackups.awx.ansible.com configured
customresourcedefinition.apiextensions.k8s.io/awxrestores.awx.ansible.com configured
customresourcedefinition.apiextensions.k8s.io/awxs.awx.ansible.com configured
serviceaccount/awx-operator-controller-manager created
role.rbac.authorization.k8s.io/awx-operator-awx-manager-role created
role.rbac.authorization.k8s.io/awx-operator-leader-election-role created
clusterrole.rbac.authorization.k8s.io/awx-operator-metrics-reader unchanged
clusterrole.rbac.authorization.k8s.io/awx-operator-proxy-role unchanged
rolebinding.rbac.authorization.k8s.io/awx-operator-awx-manager-rolebinding created
rolebinding.rbac.authorization.k8s.io/awx-operator-leader-election-rolebinding created
clusterrolebinding.rbac.authorization.k8s.io/awx-operator-proxy-rolebinding unchanged
configmap/awx-operator-awx-manager-config created
service/awx-operator-controller-manager-metrics-service created
deployment.apps/awx-operator-controller-manager created
$ kubectl get all -n awx
NAME READY STATUS RESTARTS AGE
pod/awx-operator-controller-manager-cb68577b7-vfdq8 2/2 Running 0 97s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/awx-operator-controller-manager-metrics-service ClusterIP 10.96.140.81 8443/TCP 97s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/awx-operator-controller-manager 1/1 1 1 97s
NAME DESIRED CURRENT READY AGE
replicaset.apps/awx-operator-controller-manager-cb68577b7 1 1 1 97s
$ cat postgres-secret
host=pgsql.juntotelecom.com.br
database=awx
username=awx
password=senha
$ kubectl create secret generic postgres-secret -n awx \
--from-env-file=postgres-secret -o yaml \
--dry-run=client > postgres-secret.yaml
$ kubectl apply -f postgres-secret.yaml