From 272dd1d1c8491578da48ca927f0f57a36fb69cdd Mon Sep 17 00:00:00 2001 From: kurokobo <2920259+kurokobo@users.noreply.github.com> Date: Sun, 28 Aug 2022 17:11:52 +0900 Subject: [PATCH] feat: bump awx operator version to 0.27.0 --- README.md | 64 ++++++++++++++++--------------- backup/ansible/README.md | 2 +- backup/ansible/project/backup.yml | 4 +- base/awx.yaml | 8 ++-- containergroup/README.md | 8 ++-- galaxy/README.md | 4 +- galaxy/pulp/galaxy.yaml | 8 ++-- git/README.md | 12 +++--- registry/README.md | 16 ++++---- tips/expose-hosts.md | 12 +++--- tips/troubleshooting.md | 4 +- tips/version-mapping.md | 1 + 12 files changed, 74 insertions(+), 69 deletions(-) diff --git a/README.md b/README.md index 86c922c..8336bb0 100644 --- a/README.md +++ b/README.md @@ -29,17 +29,17 @@ An example implementation of AWX on single node K3s using AWX Operator, with eas - Tested on: - CentOS Stream 8 (Minimal) - - K3s v1.24.3+k3s1 + - K3s v1.24.4+k3s1 - Products that will be deployed: - - AWX Operator 0.26.0 - - AWX 21.4.0 + - AWX Operator 0.27.0 + - AWX 21.5.0 - PostgreSQL 13 ## References - [K3s - Lightweight Kubernetes](https://rancher.com/docs/k3s/latest/en/) -- [INSTALL.md on ansible/awx](https://github.com/ansible/awx/blob/21.4.0/INSTALL.md) @21.4.0 -- [README.md on ansible/awx-operator](https://github.com/ansible/awx-operator/blob/0.26.0/README.md) @0.26.0 +- [INSTALL.md on ansible/awx](https://github.com/ansible/awx/blob/21.5.0/INSTALL.md) @21.5.0 +- [README.md on ansible/awx-operator](https://github.com/ansible/awx-operator/blob/0.27.0/README.md) @0.27.0 ## Requirements @@ -86,11 +86,15 @@ curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644 Install specified version of AWX Operator. Note that this procedure is applicable only for AWX Operator `0.14.0` or later. If you want to deploy `0.13.0` or earlier version of AWX Operator, refer [πŸ“Tips: Deploy older version of AWX Operator](tips/deploy-older-operator.md). +| ⚠️ Note ⚠️ | +| :- | +| This guide does not recommend 0.27.0 since there is an issue that the deployment for AWX with some `spec` e.g. `*_extra_volume` or `*_extra_env` will be failed ([ansible/awx-operator#1032](https://github.com/ansible/awx-operator/issues/1032)). Use 0.28.0 or later instead. | + ```bash cd ~ git clone https://github.com/ansible/awx-operator.git cd awx-operator -git checkout 0.26.0 +git checkout 0.27.0 ``` Export the name of the namespace where you want to deploy AWX Operator as the environment variable `NAMESPACE` and run `make deploy`. The default namespace is `awx`. @@ -127,7 +131,7 @@ If you want to use files suitable for the specific version of AWX Operator, [ref cd ~ git clone https://github.com/kurokobo/awx-on-k3s.git cd awx-on-k3s -git checkout 0.26.0 +git checkout 0.27.0 ``` Generate a Self-Signed certificate. Note that IP address can't be specified. If you want to use a certificate from public ACME CA such as Let's Encrypt or ZeroSSL instead of Self-Signed certificate, follow the guide on [πŸ“ **Use SSL Certificate from Public ACME CA**](acme) first and come back to this step when done. @@ -200,7 +204,7 @@ $ kubectl -n awx logs -f deployments/awx-operator-controller-manager -c awx-mana ... ----- Ansible Task Status Event StdOut (awx.ansible.com/v1beta1, Kind=AWX, awx/awx) ----- PLAY RECAP ********************************************************************* -localhost : ok=71 changed=0 unreachable=0 failed=0 skipped=48 rescued=0 ignored=0 +localhost : ok=71 changed=0 unreachable=0 failed=0 skipped=48 rescued=0 ignored=1 ``` Required objects has been deployed next to AWX Operator in `awx` namespace. @@ -208,40 +212,40 @@ Required objects has been deployed next to AWX Operator in `awx` namespace. ```bash $ kubectl -n awx get awx,all,ingress,secrets NAME AGE -awx.awx.ansible.com/awx 4m17s +awx.awx.ansible.com/awx 5m NAME READY STATUS RESTARTS AGE -pod/awx-operator-controller-manager-68d787cfbd-j6k7z 2/2 Running 0 7m43s -pod/awx-postgres-13-0 1/1 Running 0 4m6s -pod/awx-84d5c45999-h7xm4 4/4 Running 0 3m59s +pod/awx-operator-controller-manager-5d5d58758c-7xcrl 2/2 Running 0 5m35s +pod/awx-postgres-13-0 1/1 Running 0 4m46s +pod/awx-5b859c644-zp6x5 4/4 Running 0 4m26s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -service/awx-operator-controller-manager-metrics-service ClusterIP 10.43.134.67 8443/TCP 7m43s -service/awx-postgres-13 ClusterIP None 5432/TCP 4m6s -service/awx-service ClusterIP 10.43.232.137 80/TCP 4m +service/awx-operator-controller-manager-metrics-service ClusterIP 10.43.229.20 8443/TCP 5m45s +service/awx-postgres-13 ClusterIP None 5432/TCP 4m46s +service/awx-service ClusterIP 10.43.135.205 80/TCP 4m28s NAME READY UP-TO-DATE AVAILABLE AGE -deployment.apps/awx-operator-controller-manager 1/1 1 1 7m43s -deployment.apps/awx 1/1 1 1 3m59s +deployment.apps/awx-operator-controller-manager 1/1 1 1 5m45s +deployment.apps/awx 1/1 1 1 4m26s NAME DESIRED CURRENT READY AGE -replicaset.apps/awx-operator-controller-manager-68d787cfbd 1 1 1 7m43s -replicaset.apps/awx-84d5c45999 1 1 1 3m59s +replicaset.apps/awx-operator-controller-manager-5d5d58758c 1 1 1 5m35s +replicaset.apps/awx-5b859c644 1 1 1 4m26s NAME READY AGE -statefulset.apps/awx-postgres-13 1/1 4m6s +statefulset.apps/awx-postgres-13 1/1 4m46s -NAME CLASS HOSTS ADDRESS PORTS AGE -ingress.networking.k8s.io/awx-ingress awx.example.com 192.168.0.100 80, 443 4m +NAME CLASS HOSTS ADDRESS PORTS AGE +ingress.networking.k8s.io/awx-ingress awx.example.com 192.168.0.219,2400:4050:a8e2:a00:250:56ff:fe86:454d 80, 443 4m27s -NAME TYPE DATA AGE -secret/awx-admin-password Opaque 1 4m17s -secret/awx-postgres-configuration Opaque 6 4m17s -secret/awx-secret-tls kubernetes.io/tls 2 4m17s -secret/redhat-operators-pull-secret kubernetes.io/dockerconfigjson 1 4m17s -secret/awx-app-credentials Opaque 3 4m2s -secret/awx-secret-key Opaque 1 4m13s -secret/awx-broadcast-websocket Opaque 1 4m9s +NAME TYPE DATA AGE +secret/awx-admin-password Opaque 1 5m +secret/awx-postgres-configuration Opaque 6 5m +secret/awx-secret-tls kubernetes.io/tls 2 5m +secret/redhat-operators-pull-secret kubernetes.io/dockerconfigjson 1 5m +secret/awx-app-credentials Opaque 3 4m30s +secret/awx-secret-key Opaque 1 4m55s +secret/awx-broadcast-websocket Opaque 1 4m52s ``` Now your AWX is available at `https://awx.example.com/` or the hostname you specified. diff --git a/backup/ansible/README.md b/backup/ansible/README.md index daacd57..11626f3 100644 --- a/backup/ansible/README.md +++ b/backup/ansible/README.md @@ -32,7 +32,7 @@ An example simple playbook for Ansible is also provided in this repository. This | - | - | - | | `awxbackup_namespace` | The name of the NameSpace where the `AWXBackup` resource will be created. | `awx` | | `awxbackup_name` | The name of the `AWXBackup` resource. Dynamically generated using execution time by default. | `awxbackup-{{ lookup('pipe', 'date +%Y-%m-%d-%H-%M-%S') }}` | -| `awxbackup_spec` | The `spec` of the `AWXBackup` resource. Refer [official documentation](https://github.com/ansible/awx-operator/tree/0.26.0/roles/backup) for acceptable fields. | `deployment_name: awx`
`backup_pvc: awx-backup-claim`
`clean_backup_on_delete: true` | +| `awxbackup_spec` | The `spec` of the `AWXBackup` resource. Refer [official documentation](https://github.com/ansible/awx-operator/tree/0.27.0/roles/backup) for acceptable fields. | `deployment_name: awx`
`backup_pvc: awx-backup-claim`
`clean_backup_on_delete: true` | | `awxbackup_timeout` | Time to wait for backup to complete, in seconds. If exceeded, the playbook will fail. | `600` | | `awxbackup_keep_days` | Number of days to keep `AWXBackup` resources. `AWXBackup` resources older than this value will be deleted by this playbook. Set `0` to keep forever. | `30` | diff --git a/backup/ansible/project/backup.yml b/backup/ansible/project/backup.yml index 9155227..31efd52 100644 --- a/backup/ansible/project/backup.yml +++ b/backup/ansible/project/backup.yml @@ -104,13 +104,13 @@ api_version: "{{ _awxbackup_config.api_version }}" kind: "{{ _awxbackup_config.kind }}" namespace: "{{ _awxbackup_config.namespace }}" - name: "{{ item.name }}" + name: "{{ item.metadata.name }}" state: absent wait_timeout: "{{ _awxbackup_config.timeout | int }}" wait: true loop: "{{ _awxbackup_all_backups.resources }}" loop_control: - label: "{{ item.name }}" + label: "{{ item.metadata.name }}" when: >- (_awxbackup_now | int) - ((item.metadata.creationTimestamp | to_datetime('%Y-%m-%dT%H:%M:%S%z')).strftime('%s') | int) diff --git a/base/awx.yaml b/base/awx.yaml index 6d108a3..89ca299 100644 --- a/base/awx.yaml +++ b/base/awx.yaml @@ -5,10 +5,10 @@ metadata: name: awx spec: # These parameters are designed for use with: - # - AWX Operator: 0.26.0 - # https://github.com/ansible/awx-operator/blob/0.26.0/README.md - # - AWX: 21.4.0 - # https://github.com/ansible/awx/blob/21.4.0/INSTALL.md + # - AWX Operator: 0.27.0 + # https://github.com/ansible/awx-operator/blob/0.27.0/README.md + # - AWX: 21.5.0 + # https://github.com/ansible/awx/blob/21.5.0/INSTALL.md admin_user: admin admin_password_secret: awx-admin-password diff --git a/containergroup/README.md b/containergroup/README.md index d5b49fc..c106dc3 100644 --- a/containergroup/README.md +++ b/containergroup/README.md @@ -11,7 +11,7 @@ In this example, we make the Execution Environment to work with the Pod with fol - Mount PVC as `/etc/demo` - Run on the node with the label `awx-node-type: demo` using `nodeSelector` - Have custom environment variable `MY_CUSTOM_ENV` -- Use custom DNS server `192.168.0.100` in addition to the default DNS servers +- Use custom DNS server `192.168.0.219` in addition to the default DNS servers ## Table of Contents @@ -113,7 +113,7 @@ spec: awx-node-type: demo dnsConfig: nameservers: - - 192.168.0.100 + - 192.168.0.219 volumes: - name: demo-volume persistentVolumeClaim: @@ -128,7 +128,7 @@ This is the customized manifest to achieve; - Mounting PVC as `/etc/demo` - Running on the node with the label `awx-node-type: demo` using `nodeSelector` - Having custom environment variable `MY_CUSTOM_ENV` -- Using custom DNS server `192.168.0.100` in addition to the default DNS servers +- Using custom DNS server `192.168.0.219` in addition to the default DNS servers You can also change `image`, but it will be overridden by specifying Execution Environment for the Job Template, Project Default, or Global Default. @@ -177,7 +177,7 @@ spec: ... dnsConfig: nameservers: - - 192.168.0.100 + - 192.168.0.219 nodeSelector: awx-node-type: demo ... diff --git a/galaxy/README.md b/galaxy/README.md index 31d5d83..0b850f4 100644 --- a/galaxy/README.md +++ b/galaxy/README.md @@ -370,8 +370,8 @@ replicaset.apps/galaxy-web-5f7bc488fb 1 1 NAME READY AGE statefulset.apps/galaxy-postgres-13 1/1 4m31s -NAME CLASS HOSTS ADDRESS PORTS AGE -ingress.networking.k8s.io/galaxy-ingress galaxy.example.com 192.168.0.100 80, 443 4m19s +NAME CLASS HOSTS ADDRESS PORTS AGE +ingress.networking.k8s.io/galaxy-ingress galaxy.example.com 192.168.0.219,2400:4050:a8e2:a00:250:56ff:fe86:454d 80, 443 4m19s NAME TYPE DATA AGE secret/default-token-lhlds kubernetes.io/service-account-token 3 5m4s diff --git a/galaxy/pulp/galaxy.yaml b/galaxy/pulp/galaxy.yaml index 12cc43f..63ad572 100644 --- a/galaxy/pulp/galaxy.yaml +++ b/galaxy/pulp/galaxy.yaml @@ -6,13 +6,13 @@ spec: # These parameters are designed for use with: # - Pulp Operator: 0.13.0 # https://github.com/pulp/pulp-operator/blob/0.13.0/README.md - # - Galaxy NG: 4.5.0 - # https://github.com/ansible/galaxy_ng/tree/4.5.0 + # - Galaxy NG: 4.5.2 + # https://github.com/ansible/galaxy_ng/tree/4.5.2 image: quay.io/pulp/galaxy - image_version: 4.5.0 + image_version: 4.5.2 image_web: quay.io/pulp/galaxy-web - image_web_version: 4.5.0 + image_web_version: 4.5.2 admin_password_secret: galaxy-admin-password diff --git a/git/README.md b/git/README.md index b161bdd..e1d7983 100644 --- a/git/README.md +++ b/git/README.md @@ -55,19 +55,19 @@ Required resources has been deployed in `git` namespace. ```bash $ kubectl -n git get all,ingress NAME READY STATUS RESTARTS AGE -pod/git-dc5d76bdb-xpl62 1/1 Running 0 11s +pod/git-56cc958f9-2q44j 1/1 Running 0 9s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -service/git-service ClusterIP 10.43.64.160 3000/TCP,22/TCP 11s +service/git-service ClusterIP 10.43.134.80 3000/TCP,22/TCP 9s NAME READY UP-TO-DATE AVAILABLE AGE -deployment.apps/git 1/1 1 1 11s +deployment.apps/git 1/1 1 1 9s NAME DESIRED CURRENT READY AGE -replicaset.apps/git-dc5d76bdb 1 1 1 11s +replicaset.apps/git-56cc958f9 1 1 1 9s -NAME CLASS HOSTS ADDRESS PORTS AGE -ingress.networking.k8s.io/git-ingress git.example.com 192.168.0.100 80, 443 11s +NAME CLASS HOSTS ADDRESS PORTS AGE +ingress.networking.k8s.io/git-ingress git.example.com 192.168.0.219,2400:4050:a8e2:a00:250:56ff:fe86:454d 80, 443 9s ``` Now your Git repository is accessible through `https://git.example.com/` or the hostname you specified. Visit the URL and follow the installation wizard. diff --git a/registry/README.md b/registry/README.md index 9c118a5..eb1a347 100644 --- a/registry/README.md +++ b/registry/README.md @@ -74,20 +74,20 @@ Required resources has been deployed in `registry` namespace. ```bash $ kubectl -n registry get all,ingress -NAME READY STATUS RESTARTS AGE -pod/registry-756d57bfd-khln6 1/1 Running 0 9s +NAME READY STATUS RESTARTS AGE +pod/registry-7457f6c64b-sxqfp 1/1 Running 0 9s -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -service/registry-service ClusterIP 10.43.183.177 5000/TCP 9s +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +service/registry-service ClusterIP 10.43.15.228 5000/TCP 9s NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/registry 1/1 1 1 9s -NAME DESIRED CURRENT READY AGE -replicaset.apps/registry-756d57bfd 1 1 1 9s +NAME DESIRED CURRENT READY AGE +replicaset.apps/registry-7457f6c64b 1 1 1 9s -NAME CLASS HOSTS ADDRESS PORTS AGE -ingress.networking.k8s.io/registry-ingress registry.example.com 192.168.0.100 80, 443 9s +NAME CLASS HOSTS ADDRESS PORTS AGE +ingress.networking.k8s.io/registry-ingress registry.example.com 192.168.0.219,2400:4050:a8e2:a00:250:56ff:fe86:454d 80, 443 ``` Now your container registry can be used through `registry.example.com` or the hostname you specified. diff --git a/tips/expose-hosts.md b/tips/expose-hosts.md index fec6eac..eb8418b 100644 --- a/tips/expose-hosts.md +++ b/tips/expose-hosts.md @@ -10,10 +10,10 @@ One easy way to do this is to use `dnsmasq`. ```bash sudo tee -a /etc/hosts <