Skip to content

Commit

Permalink
feat: bump operator version to 0.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kurokobo committed May 7, 2022
1 parent 718e326 commit eeaa026
Show file tree
Hide file tree
Showing 16 changed files with 86 additions and 54 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ An example implementation of AWX on single node K3s using AWX Operator, with eas
- CentOS Stream 8 (Minimal)
- K3s v1.22.7+k3s1
- Products that will be deployed:
- AWX Operator 0.20.2
- AWX Operator 0.21.0
- AWX 21.0.0
- PostgreSQL 12

## References

- [K3s - Lightweight Kubernetes](https://rancher.com/docs/k3s/latest/en/)
- [INSTALL.md on ansible/awx](https://github.com/ansible/awx/blob/21.0.0/INSTALL.md) @21.0.0
- [README.md on ansible/awx-operator](https://github.com/ansible/awx-operator/blob/0.20.2/README.md) @0.20.2
- [README.md on ansible/awx-operator](https://github.com/ansible/awx-operator/blob/0.21.0/README.md) @0.21.0

## Requirements

Expand Down Expand Up @@ -83,7 +83,7 @@ Install specified version of AWX Operator. Note that this procedure is applicabl
cd ~
git clone https://github.com/ansible/awx-operator.git
cd awx-operator
git checkout 0.20.2
git checkout 0.21.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`.
Expand Down Expand Up @@ -281,4 +281,5 @@ Refer [📁 **Back up AWX using AWX Operator**](backup) and [📁 **Restore AWX
- [📝Deploy older version of AWX Operator](tips/deploy-older-operator.md)
- [📝Upgrade AWX Operator and AWX](tips/upgrade-operator.md)
- [📝Workaround for the rate limit on Docker Hub](tips/dockerhub-rate-limit.md)
- [📝Version Mapping between AWX Operator and AWX](tips/version-mapping.md)
- [📝Troubleshooting Guide](tips/troubleshooting.md)
1 change: 0 additions & 1 deletion acme/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ secretGenerator:
- client-secret=0000000000000000000000000000000000

resources:
- namespace.yaml
- issuer.yaml
5 changes: 0 additions & 5 deletions acme/namespace.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion backup/ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,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.20.2/roles/backup) for acceptable fields. | `{'deployment_name':'awx','backup_pvc':'awx-backup-claim'}` |
| `awxbackup_spec` | The `spec` of the `AWXBackup` resource. Refer [official documentation](https://github.com/ansible/awx-operator/tree/0.21.0/roles/backup) for acceptable fields. | `{'deployment_name':'awx','backup_pvc':'awx-backup-claim'}` |
| `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. **Note that the actual backup data will remain in the PVC after the `AWXBackup` resource is deleted.** | `30` |

Expand Down
1 change: 0 additions & 1 deletion backup/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ generatorOptions:
disableNameSuffixHash: true

resources:
- namespace.yaml
- pv.yaml
- pvc.yaml
5 changes: 0 additions & 5 deletions backup/namespace.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions base/awx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ metadata:
name: awx
spec:
# These parameters are designed for use with:
# - AWX Operator: 0.20.2
# https://github.com/ansible/awx-operator/blob/0.20.2/README.md
# - AWX Operator: 0.21.0
# https://github.com/ansible/awx-operator/blob/0.21.0/README.md
# - AWX: 21.0.0
# https://github.com/ansible/awx/blob/21.0.0/INSTALL.md

Expand Down
1 change: 0 additions & 1 deletion base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ secretGenerator:
- password=Ansible123!

resources:
- namespace.yaml
- pv.yaml
- pvc.yaml
- awx.yaml
5 changes: 0 additions & 5 deletions base/namespace.yaml

This file was deleted.

9 changes: 7 additions & 2 deletions restore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ It is strongly recommended that the version of AWX Operator is the same as the v

### Prepare for Restore

If your AWX instance is running, it is recommended that it be deleted along with any data in the PV for the PostgreSQL first, in order to restore to be succeeded.
If your AWX instance is running, it is recommended that it be deleted along with PVC and PV for the PostgreSQL first, in order to restore to be succeeded.

```bash
# Delete AWX resource, PVC, and PV
kubectl -n awx delete awx awx
kubectl -n awx delete pvc postgres-awx-postgres-0
kubectl delete pv awx-postgres-volume

# Delete any data in the PV
sudo rm -rf /data/postgres
```

Expand All @@ -38,7 +43,7 @@ sudo chmod 755 /data/postgres
sudo chown 1000:0 /data/projects
```

Then deploy Persistent Volume and Persistent Volume Claim. It is recommended that making the size of PVs and PVCs same as the PVs which your AWX used when the backup was taken.
Then deploy PV and PVC. It is recommended that making the size of PVs and PVCs same as the PVs which your AWX used when the backup was taken.

```bash
kubectl apply -k restore
Expand Down
1 change: 0 additions & 1 deletion restore/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ generatorOptions:
# - tls.key

resources:
- namespace.yaml
- pv.yaml
- pvc.yaml
5 changes: 0 additions & 5 deletions restore/namespace.yaml

This file was deleted.

1 change: 1 addition & 0 deletions tips/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
- [📝Deploy older version of AWX Operator](deploy-older-operator.md)
- [📝Upgrade AWX Operator and AWX](upgrade-operator.md)
- [📝Workaround for the rate limit on Docker Hub](dockerhub-rate-limit.md)
- [📝Version Mapping between AWX Operator and AWX](version-mapping.md)
- [📝Troubleshooting Guide](troubleshooting.md)
2 changes: 1 addition & 1 deletion tips/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Typical solutions are one of the following:
ee_resource_requirements: {} 👈👈👈
```
- You can specify more specific value for each containers. Refer [official documentation](https://github.com/ansible/awx-operator/blob/0.20.2/README.md#containers-resource-requirements) for details.
- You can specify more specific value for each containers. Refer [official documentation](https://github.com/ansible/awx-operator/blob/0.21.0/README.md#containers-resource-requirements) for details.
- In this way you can run AWX with fewer resources, but you may encounter performance issues.
### The Pod is `Pending` with "1 pod has unbound immediate PersistentVolumeClaims." event
Expand Down
22 changes: 1 addition & 21 deletions tips/upgrade-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,7 @@ This guide provides the procedure for the following three types of upgrading AWX
- Upgrade from `0.13.0` (e.g. from `0.13.0` to `0.14.0`)
- Upgrade from `0.12.0` or earlier (e.g. from `0.12.0` to `0.13.0`)

Note that once you upgrade AWX Operator, your AWX will also be upgraded automatically to the version bundled with the upgraded AWX Operator as shown below.

| AWX Operator | AWX |
| - | - |
| 0.20.2 | 21.0.0 |
| 0.20.1 | 21.0.0 |
| 0.20.0 | 20.1.0 |
| 0.19.0 | 20.0.1 |
| 0.18.0 | 20.0.1 |
| 0.17.0 | 20.0.0 |
| 0.16.1 | 19.5.1 |
| 0.15.0 | 19.5.0 |
| 0.14.0 | 19.4.0 |
| 0.13.0 | 19.3.0 |
| 0.12.0 | 19.2.2 |
| 0.11.0 | 19.2.1 |
| 0.10.0 | 19.2.0 |
| 0.9.0 | 19.1.0 |
| 0.8.0 | 19.0.0 |
| 0.7.0 | 18.0.0 |
| 0.6.0 | 15.0.0 |
Note that once you upgrade AWX Operator, your AWX will also be upgraded automatically to the version bundled with the upgraded AWX Operator as shown in [📝Version Mapping between AWX Operator and AWX](version-mapping.md).

[There is `image_version` parameter for AWX resource to change which image will be used](https://github.com/ansible/awx-operator#deploying-a-specific-version-of-awx), but it appears that using a version of AWX other than the one bundled with the AWX Operator [is currently not supported](https://github.com/ansible/awx-operator#deploying-a-specific-version-of-awx). Conversely, if you want to upgrade AWX, you need to plan to upgrade AWX Operator first.

Expand Down
69 changes: 69 additions & 0 deletions tips/version-mapping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<!-- omit in toc -->
# Version Mapping between AWX Operator and AWX

- [Default version mapping betwern AWX Operator and AWX](#default-version-mapping-betwern-awx-operator-and-awx)
- [Appendix: Gather bundled AWX version from AWX Operator](#appendix-gather-bundled-awx-version-from-awx-operator)

## Default version mapping betwern AWX Operator and AWX

The table below maps the AWX Operator versions and bundled AWX versions.

| AWX Operator | AWX |
| - | - |
| 0.21.0 | 21.0.0 |
| 0.20.2 | 21.0.0 |
| 0.20.1 | 21.0.0 |
| 0.20.0 | 20.1.0 |
| 0.19.0 | 20.0.1 |
| 0.18.0 | 20.0.1 |
| 0.17.0 | 20.0.0 |
| 0.16.1 | 19.5.1 |
| 0.16.0 | 19.5.1 |
| 0.15.0 | 19.5.0 |
| 0.14.0 | 19.4.0 |
| 0.13.0 | 19.3.0 |
| 0.12.0 | 19.2.2 |
| 0.11.0 | 19.2.1 |
| 0.10.0 | 19.2.0 |
| 0.9.0 | 19.1.0 |
| 0.8.0 | 19.0.0 |
| 0.7.0 | 18.0.0 |
| 0.6.0 | 15.0.0 |

In the current version of AWX Operator, [there is `image_version` parameter for AWX resource to change which image will be used](https://github.com/ansible/awx-operator#deploying-a-specific-version-of-awx), but it appears that using a version of AWX other than the one bundled with the AWX Operator [is currently not supported](https://github.com/ansible/awx-operator#deploying-a-specific-version-of-awx).

## Appendix: Gather bundled AWX version from AWX Operator

- For AWX Operator **0.15.0 or later**

```bash
# Using Docker
docker run -it --rm --entrypoint /usr/bin/bash quay.io/ansible/awx-operator:${OPERATOR_VERSION} -c env | grep DEFAULT_AWX_VERSION

# Using Kubernetes
kubectl run awx-operator --restart=Never -it --rm --command /usr/bin/bash --image=quay.io/ansible/awx-operator:${OPERATOR_VERSION} -- -c "env" | grep DEFAULT_AWX_VERSION
```

- For AWX Operator **0.10.0 to 0.14.0**

```bash
curl -sf https://raw.githubusercontent.com/ansible/awx-operator/${OPERATOR_VERSION}/roles/installer/defaults/main.yml | egrep "^image_version:"
```

- For AWX Operator **0.9.0**

```bash
curl -sf https://raw.githubusercontent.com/ansible/awx-operator/${OPERATOR_VERSION}/roles/installer/defaults/main.yml | egrep "^tower_image_version:"
```

- For AWX Operator **0.7.0 and 0.8.0**

```bash
curl -sf https://raw.githubusercontent.com/ansible/awx-operator/${OPERATOR_VERSION}/roles/installer/defaults/main.yml | egrep "^tower_image:"
```

- For AWX Operator **0.6.0**

```bash
curl -sf https://raw.githubusercontent.com/ansible/awx-operator/${OPERATOR_VERSION}/roles/awx/defaults/main.yml | egrep "^tower_image:"
```

0 comments on commit eeaa026

Please sign in to comment.