From e415236fd1f5066dee3edc0c60d739b0a8ca3f14 Mon Sep 17 00:00:00 2001 From: kurokobo <2920259+kurokobo@users.noreply.github.com> Date: Thu, 23 Nov 2023 00:06:51 +0900 Subject: [PATCH] feat: bump operator version to 2.8.0 --- README.md | 20 ++++++++------------ backup/README.md | 4 ++-- backup/ansible/README.md | 2 +- git/kustomization.yaml | 2 +- operator/kustomization.yaml | 4 ++-- restore/README.md | 4 ++-- restore/awxrestore.yaml | 2 +- tips/alternative-methods.md | 12 ++++++------ tips/enable-hsts.md | 4 ++-- tips/upgrade-operator.md | 4 ---- tips/version-mapping.md | 1 + 11 files changed, 26 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 27c23ba..c513e95 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.27.6+k3s1 + - K3s v1.27.7+k3s2 - Products that will be deployed: - - AWX Operator 2.7.2 - - AWX 23.4.0 + - AWX Operator 2.8.0 + - AWX 23.5.0 - PostgreSQL 13 ## References - [K3s - Lightweight Kubernetes](https://docs.k3s.io/) -- [INSTALL.md on ansible/awx](https://github.com/ansible/awx/blob/23.4.0/INSTALL.md) @23.4.0 -- [README.md on ansible/awx-operator](https://github.com/ansible/awx-operator/blob/2.7.2/README.md) @2.7.2 +- [INSTALL.md on ansible/awx](https://github.com/ansible/awx/blob/23.5.0/INSTALL.md) @23.5.0 +- [README.md on ansible/awx-operator](https://github.com/ansible/awx-operator/blob/2.8.0/README.md) @2.8.0 ## Requirements @@ -76,10 +76,10 @@ sudo dnf install -y git curl ### Install K3s -Install specific version of K3s with `--write-kubeconfig-mode 644` to make config file (`/etc/rancher/k3s/k3s.yaml`) readable by non-root user. **Note that the latest `v1.27.7+k3s1` has [an issue](https://github.com/k3s-io/k3s/issues/8755) that HTTP redirection causes 404 error for your AWX, so this guide explicitly specifies `v1.27.6+k3s1`.** +Install specific version of K3s with `--write-kubeconfig-mode 644` to make config file (`/etc/rancher/k3s/k3s.yaml`) readable by non-root user. ```bash -curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.27.6+k3s1 sh -s - --write-kubeconfig-mode 644 +curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.27.7+k3s2 sh -s - --write-kubeconfig-mode 644 ``` ### Install AWX Operator @@ -88,15 +88,11 @@ Clone this repository and change directory. If you want to use files suitable for the specific version of AWX Operator, [refer tags in this repository](https://github.com/kurokobo/awx-on-k3s/tags) and specify desired tag in `git checkout`. Especially for `0.13.0` or earlier version of AWX Operator, refer to [๐Ÿ“Tips: Deploy older version of AWX Operator](tips/deploy-older-operator.md). -**โš ๏ธNote for 2.7.0 through 2.7.2โš ๏ธ** - -**AWX Operator 2.7.0 through 2.7.2 have a bug that restoration using backup files directly instead of using AWXBackup object will fail ([#1586](https://github.com/ansible/awx-operator/issues/1586)). If you want to use this method to restore your AWX, you should avoid to use these versions.** - ```bash cd ~ git clone https://github.com/kurokobo/awx-on-k3s.git cd awx-on-k3s -git checkout 2.7.2 +git checkout 2.8.0 ``` Then invoke `kubectl apply -k operator` to deploy AWX Operator. diff --git a/backup/README.md b/backup/README.md index 9f0afa6..682251c 100644 --- a/backup/README.md +++ b/backup/README.md @@ -77,9 +77,9 @@ awxbackup-2021-06-06 6m47s ```bash $ ls -l /data/backup/ total 0 -drwxr-xr-x. 2 root root 59 Jun 5 06:51 tower-openshift-backup-2021-06-06-10:51:49 +drwxr-xr-x. 2 root root 59 Jun 5 06:51 tower-openshift-backup-2021-06-06-105149 -$ ls -l /data/backup/tower-openshift-backup-2021-06-06-10\:51\:49/ +$ ls -l /data/backup/tower-openshift-backup-2021-06-06-105149/ total 736 -rw-------. 1 1001 root 1093 Jun 6 06:51 awx_object -rw-------. 1 1001 root 17085 Jun 6 06:51 secrets.yml diff --git a/backup/ansible/README.md b/backup/ansible/README.md index 4d36a5f..6f306e4 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/2.7.2/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/2.8.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/git/kustomization.yaml b/git/kustomization.yaml index ddeaeee..97c6c48 100644 --- a/git/kustomization.yaml +++ b/git/kustomization.yaml @@ -15,7 +15,7 @@ secretGenerator: images: - name: gitea/gitea - newTag: "1.20" + newTag: "1.21" resources: - namespace.yaml diff --git a/operator/kustomization.yaml b/operator/kustomization.yaml index 4467e6d..b5e9b57 100644 --- a/operator/kustomization.yaml +++ b/operator/kustomization.yaml @@ -12,8 +12,8 @@ secretGenerator: - operator=awx resources: - - github.com/ansible/awx-operator/config/default?ref=2.7.2 + - github.com/ansible/awx-operator/config/default?ref=2.8.0 images: - name: quay.io/ansible/awx-operator - newTag: 2.7.2 + newTag: 2.8.0 diff --git a/restore/README.md b/restore/README.md index 6fa1313..db3c3de 100644 --- a/restore/README.md +++ b/restore/README.md @@ -73,13 +73,13 @@ If you want to restore from AWXBackup object, specify its name in `restore/awxre ... ``` -If the AWXBackup object no longer exists, place the backup files under `/data/backup/` (e.g. `/data/backup/tower-openshift-backup-2021-06-06-10:51:49`) and specify the name of the PVC and directory in `restore/awxrestore.yaml`. **โš ๏ธThis method does not work on AWX Operator 2.7.0 through 2.7.2 due to [#1586](https://github.com/ansible/awx-operator/issues/1586).** +If the AWXBackup object no longer exists, place the backup files under `/data/backup/` (e.g. `/data/backup/tower-openshift-backup-2021-06-06-105149`) and specify the name of the PVC and directory in `restore/awxrestore.yaml`. ```yaml ... # Parameters to restore from existing files on PVC (without AWXBackup object) backup_pvc: awx-backup-claim ๐Ÿ‘ˆ๐Ÿ‘ˆ๐Ÿ‘ˆ - backup_dir: /backups/tower-openshift-backup-2021-06-06-10:51:49 ๐Ÿ‘ˆ๐Ÿ‘ˆ๐Ÿ‘ˆ + backup_dir: /backups/tower-openshift-backup-2021-06-06-105149 ๐Ÿ‘ˆ๐Ÿ‘ˆ๐Ÿ‘ˆ ... ``` diff --git a/restore/awxrestore.yaml b/restore/awxrestore.yaml index e3bdb2b..52953d2 100644 --- a/restore/awxrestore.yaml +++ b/restore/awxrestore.yaml @@ -12,7 +12,7 @@ spec: # Parameters to restore from existing files on PVC (without AWXBackup object) #backup_pvc: awx-backup-claim - #backup_dir: /backups/tower-openshift-backup-2021-06-06-10:51:49 + #backup_dir: /backups/tower-openshift-backup-2021-06-06-105149 # Uncomment to reveal "censored" logs #no_log: false diff --git a/tips/alternative-methods.md b/tips/alternative-methods.md index 6c4742c..05d509d 100644 --- a/tips/alternative-methods.md +++ b/tips/alternative-methods.md @@ -256,7 +256,7 @@ In this method, the lifecycle of AWX Operator is managed by OLM. In the default Refer to [the first step of the instruction that appears by `Install` button](https://operatorhub.io/operator/awx-operator) for details. ```bash -OLM_RELEASE="v0.25.0" +OLM_RELEASE="v0.26.0" curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${OLM_RELEASE}/install.sh | bash -s ${OLM_RELEASE} ``` @@ -278,7 +278,7 @@ NAMESPACE NAME DISPLAY olm catalogsource.operators.coreos.com/operatorhubio-catalog Community Operators grpc OperatorHub.io 83s NAMESPACE NAME DISPLAY VERSION REPLACES PHASE -olm clusterserviceversion.operators.coreos.com/packageserver Package Server 0.25.0 Succeeded +olm clusterserviceversion.operators.coreos.com/packageserver Package Server 0.26.0 Succeeded $ kubectl -n olm get all @@ -383,8 +383,8 @@ You can gather metadata of deployed operator by `get`ting `ClusterServiceVersion ```bash $ kubectl -n awx get csv -NAME DISPLAY VERSION REPLACES PHASE -awx-operator.v1.0.0 AWX 1.0.0 awx-operator.v0.30.0 Succeeded +NAME DISPLAY VERSION REPLACES PHASE +awx-operator.v2.8.0 AWX 2.8.0 awx-operator.v2.7.2 Succeeded ``` #### Deploy AWX @@ -406,7 +406,7 @@ All installations requiring approval can be listed by `get`ting InstallPlan reso ```bash $ kubectl -n awx get installplan NAME CSV APPROVAL APPROVED -install-jfh85 awx-operator.v1.0.0 Manual false +install-jfh85 awx-operator.v2.8.0 Manual false ``` To approve pending `InstallPlan`, `patch` it. @@ -434,7 +434,7 @@ kubectl delete -f subscription.yaml To uninstall OLM, some resources should be deleted. ```bash -OLM_RELEASE="v0.22.0" +OLM_RELEASE="v0.26.0" kubectl delete apiservices.apiregistration.k8s.io v1.packages.operators.coreos.com kubectl delete -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${OLM_RELEASE}/crds.yaml kubectl delete -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${OLM_RELEASE}/olm.yaml diff --git a/tips/enable-hsts.md b/tips/enable-hsts.md index 061065f..fbb0377 100644 --- a/tips/enable-hsts.md +++ b/tips/enable-hsts.md @@ -28,7 +28,7 @@ Since this can be referenced from other namespaces, in this guide it will be cre ```bash cat < middleware.yaml -apiVersion: traefik.containo.us/v1alpha1 +apiVersion: traefik.io/v1alpha1 kind: Middleware metadata: namespace: kube-system @@ -43,7 +43,7 @@ spec: EOF kubectl -n kube-system apply -f middleware.yaml -kubectl -n kube-system get middleware +kubectl -n kube-system get middleware.traefik.io ``` #### Note for restoring AWX that uses HSTS diff --git a/tips/upgrade-operator.md b/tips/upgrade-operator.md index e5c9084..2573bce 100644 --- a/tips/upgrade-operator.md +++ b/tips/upgrade-operator.md @@ -11,10 +11,6 @@ Note that once you upgrade AWX Operator, your AWX will also be upgraded automati [There is `image_version` parameter for AWX resource to change which image will be used](https://ansible.readthedocs.io/projects/awx-operator/en/latest/user-guide/advanced-configuration/deploying-a-specific-version-of-awx.html), but it appears that using a version of AWX other than the one bundled with the AWX Operator [is currently not supported](https://ansible.readthedocs.io/projects/awx-operator/en/latest/user-guide/advanced-configuration/deploying-a-specific-version-of-awx.html). Conversely, if you want to upgrade AWX, you need to plan to upgrade AWX Operator first. -**โš ๏ธNote for 2.7.0 through 2.7.2โš ๏ธ** - -**AWX Operator 2.7.0 through 2.7.2 have a bug that restoration using backup files directly instead of using AWXBackup object will fail ([#1586](https://github.com/ansible/awx-operator/issues/1586)). If you want to use this method to restore your AWX, you should avoid to use these versions.** - ## Table of Contents diff --git a/tips/version-mapping.md b/tips/version-mapping.md index 642a636..86560fb 100644 --- a/tips/version-mapping.md +++ b/tips/version-mapping.md @@ -10,6 +10,7 @@ The table below maps the AWX Operator versions and bundled AWX versions. | AWX Operator | AWX | | - | - | +| 2.8.0 | 23.5.0 | | 2.7.2 | 23.4.0 | | 2.7.1 | 23.3.1 | | 2.7.0 | 23.3.0 |