mirror of
https://github.com/Expand-sys/awx-on-k3s
synced 2025-12-15 21:42:15 +11:00
feat: bump operator version to 2.8.0
This commit is contained in:
parent
daa1b0177c
commit
e415236fd1
11 changed files with 26 additions and 33 deletions
20
README.md
20
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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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`<br>`backup_pvc: awx-backup-claim`<br>`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`<br>`backup_pvc: awx-backup-claim`<br>`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` |
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ secretGenerator:
|
|||
|
||||
images:
|
||||
- name: gitea/gitea
|
||||
newTag: "1.20"
|
||||
newTag: "1.21"
|
||||
|
||||
resources:
|
||||
- namespace.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
|
||||
|
|
|
|||
|
|
@ -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/<backup directory>` (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/<backup directory>` (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 👈👈👈
|
||||
...
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Since this can be referenced from other namespaces, in this guide it will be cre
|
|||
|
||||
```bash
|
||||
cat <<EOF > 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
|
||||
|
|
|
|||
|
|
@ -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.**
|
||||
|
||||
<!-- omit in toc -->
|
||||
## Table of Contents
|
||||
|
||||
|
|
|
|||
|
|
@ -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 |
|
||||
|
|
|
|||
Loading…
Reference in a new issue