Skip to content

Commit f57cc7a

Browse files
committed
feat: bump operator version to 2.13.1
1 parent 165eeff commit f57cc7a

File tree

11 files changed

+84
-77
lines changed

11 files changed

+84
-77
lines changed

README.md

+38-36
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ An example implementation of AWX on single node K3s using AWX Operator, with eas
3131
- CentOS Stream 8 (Minimal)
3232
- K3s v1.28.7+k3s1
3333
- Products that will be deployed:
34-
- AWX Operator 2.13.0
34+
- AWX Operator 2.13.1
3535
- AWX 24.0.0
3636
- PostgreSQL 15
3737

3838
## References
3939

4040
- [K3s - Lightweight Kubernetes](https://docs.k3s.io/)
4141
- [INSTALL.md on ansible/awx](https://github.com/ansible/awx/blob/24.0.0/INSTALL.md) @24.0.0
42-
- [README.md on ansible/awx-operator](https://github.com/ansible/awx-operator/blob/2.13.0/README.md) @2.13.0
42+
- [README.md on ansible/awx-operator](https://github.com/ansible/awx-operator/blob/2.13.1/README.md) @2.13.1
4343

4444
## Requirements
4545

@@ -85,9 +85,6 @@ curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.28.7+k3s1 sh -s - --write-
8585

8686
### Install AWX Operator
8787

88-
> [!CAUTION]
89-
> AWX Operator 2.13.0 has [a bug that potentially causes data loss](https://forum.ansible.com/t/attention-do-not-upgrade-to-awx-operator-to-2-13-0/4363/3), and its image is already removed from `quay.io`. Use AWX Operator 2.13.1 or later instead.
90-
9188
> [!NOTE]
9289
> From AWX Operator 2.13.0, Default PostgreSQL version is bumped from 13 to 15. If you have a plan to upgrade existing AWX Operator and AWX, refer to [📝Tips: Upgrade AWX Operator and AWX](tips/upgrade-operator.md) to perform additional tasks to database migration.
9390
@@ -99,7 +96,7 @@ If you want to use files suitable for a specific version of AWX Operator, [refer
9996
cd ~
10097
git clone https://github.com/kurokobo/awx-on-k3s.git
10198
cd awx-on-k3s
102-
git checkout 2.13.0
99+
git checkout 2.13.1
103100
```
104101

105102
Then invoke `kubectl apply -k operator` to deploy AWX Operator.
@@ -171,9 +168,10 @@ Modify the two `password` entries in `base/kustomization.yaml`. Note that the `p
171168
Prepare directories for Persistent Volumes defined in `base/pv.yaml`. These directories will be used to store your databases and project files. Note that the size of the PVs and PVCs are specified in some of the files in this repository, but since their backends are `hostPath`, its value is just like a label and there is no actual capacity limitation.
172169

173170
```bash
174-
sudo mkdir -p /data/postgres-15
171+
sudo mkdir -p /data/postgres-15/data
175172
sudo mkdir -p /data/projects
176-
sudo chmod 755 /data/postgres-15
173+
sudo chmod 700 /data/postgres-15/data
174+
sudo chown 26:0 /data/postgres-15/data
177175
sudo chown 1000:0 /data/projects
178176
```
179177

@@ -198,53 +196,57 @@ $ kubectl -n awx logs -f deployments/awx-operator-controller-manager
198196
...
199197
----- Ansible Task Status Event StdOut (awx.ansible.com/v1beta1, Kind=AWX, awx/awx) -----
200198
PLAY RECAP *********************************************************************
201-
localhost : ok=85 changed=1 unreachable=0 failed=0 skipped=78 rescued=0 ignored=1
199+
localhost : ok=90 changed=0 unreachable=0 failed=0 skipped=81 rescued=0 ignored=1
202200
```
203201

204202
The required objects should now have been deployed next to AWX Operator in the `awx` namespace.
205203

206204
```bash
207205
$ kubectl -n awx get awx,all,ingress,secrets
208206
NAME AGE
209-
awx.awx.ansible.com/awx 6m15s
207+
awx.awx.ansible.com/awx 6m48s
210208

211-
NAME READY STATUS RESTARTS AGE
212-
pod/awx-operator-controller-manager-57867569c4-ggl29 2/2 Running 0 6m50s
213-
pod/awx-postgres-15-0 1/1 Running 0 5m56s
214-
pod/awx-task-5d8cd9b6b9-8ptjt 4/4 Running 0 5m25s
215-
pod/awx-web-66f89bc9cf-6zck5 3/3 Running 0 4m39s
209+
NAME READY STATUS RESTARTS AGE
210+
pod/awx-operator-controller-manager-59b86c6fb-4zz9r 2/2 Running 0 7m22s
211+
pod/awx-postgres-15-0 1/1 Running 0 6m33s
212+
pod/awx-web-549f7fdbc5-htpl9 3/3 Running 0 6m5s
213+
pod/awx-migration-24.0.0-kglht 0/1 Completed 0 4m36s
214+
pod/awx-task-7d4fcdd449-mqkp2 4/4 Running 0 6m4s
216215

217216
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
218-
service/awx-operator-controller-manager-metrics-service ClusterIP 10.43.18.30 <none> 8443/TCP 7m
219-
service/awx-postgres-15 ClusterIP None <none> 5432/TCP 5m55s
220-
service/awx-service ClusterIP 10.43.237.218 <none> 80/TCP 5m28s
217+
service/awx-operator-controller-manager-metrics-service ClusterIP 10.43.58.194 <none> 8443/TCP 7m33s
218+
service/awx-postgres-15 ClusterIP None <none> 5432/TCP 6m33s
219+
service/awx-service ClusterIP 10.43.180.226 <none> 80/TCP 6m7s
221220

222221
NAME READY UP-TO-DATE AVAILABLE AGE
223-
deployment.apps/awx-operator-controller-manager 1/1 1 1 7m
224-
deployment.apps/awx-task 1/1 1 1 5m25s
225-
deployment.apps/awx-web 1/1 1 1 4m39s
222+
deployment.apps/awx-operator-controller-manager 1/1 1 1 7m33s
223+
deployment.apps/awx-web 1/1 1 1 6m5s
224+
deployment.apps/awx-task 1/1 1 1 6m4s
226225

227-
NAME DESIRED CURRENT READY AGE
228-
replicaset.apps/awx-operator-controller-manager-57867569c4 1 1 1 6m50s
229-
replicaset.apps/awx-task-5d8cd9b6b9 1 1 1 5m25s
230-
replicaset.apps/awx-web-66f89bc9cf 1 1 1 4m39s
226+
NAME DESIRED CURRENT READY AGE
227+
replicaset.apps/awx-operator-controller-manager-59b86c6fb 1 1 1 7m22s
228+
replicaset.apps/awx-web-549f7fdbc5 1 1 1 6m5s
229+
replicaset.apps/awx-task-7d4fcdd449 1 1 1 6m4s
231230

232231
NAME READY AGE
233-
statefulset.apps/awx-postgres-15 1/1 5m56s
232+
statefulset.apps/awx-postgres-15 1/1 6m33s
233+
234+
NAME COMPLETIONS DURATION AGE
235+
job.batch/awx-migration-24.0.0 1/1 2m4s 4m36s
234236

235237
NAME CLASS HOSTS ADDRESS PORTS AGE
236-
ingress.networking.k8s.io/awx-ingress traefik awx.example.com 192.168.0.219 80, 443 5m27s
238+
ingress.networking.k8s.io/awx-ingress traefik awx.example.com 192.168.0.219 80, 443 6m6s
237239

238240
NAME TYPE DATA AGE
239-
secret/redhat-operators-pull-secret Opaque 1 7m11s
240-
secret/awx-admin-password Opaque 1 6m15s
241-
secret/awx-postgres-configuration Opaque 6 6m15s
242-
secret/awx-secret-tls kubernetes.io/tls 2 6m15s
243-
secret/awx-app-credentials Opaque 3 5m30s
244-
secret/awx-secret-key Opaque 1 6m6s
245-
secret/awx-broadcast-websocket Opaque 1 6m2s
246-
secret/awx-receptor-ca kubernetes.io/tls 2 5m37s
247-
secret/awx-receptor-work-signing Opaque 2 5m33s
241+
secret/redhat-operators-pull-secret Opaque 1 7m33s
242+
secret/awx-admin-password Opaque 1 6m48s
243+
secret/awx-postgres-configuration Opaque 6 6m48s
244+
secret/awx-secret-tls kubernetes.io/tls 2 6m48s
245+
secret/awx-app-credentials Opaque 3 6m9s
246+
secret/awx-secret-key Opaque 1 6m41s
247+
secret/awx-broadcast-websocket Opaque 1 6m38s
248+
secret/awx-receptor-ca kubernetes.io/tls 2 6m14s
249+
secret/awx-receptor-work-signing Opaque 2 6m12s
248250
```
249251

250252
Now your AWX is available at `https://awx.example.com/` or the hostname you specified.

backup/README.md

+8-9
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ This guide is specifically designed to use with the AWX which deployed using [th
77

88
You can also refer [the official instructions](https://github.com/ansible/awx-operator/tree/devel/roles/backup) for more information.
99

10-
> [!WARNING]
11-
> AWX Operator 2.12.2 can not create any backup due to [a known issue](https://github.com/ansible/awx-operator/issues/1734).
12-
1310
<!-- omit in toc -->
1411
## Table of Contents
1512

@@ -26,6 +23,8 @@ Prepare directories for Persistent Volumes to store backup files that defined in
2623

2724
```bash
2825
sudo mkdir -p /data/backup
26+
sudo chmod 700 /data/backup
27+
sudo chown 26:0 /data/backup
2928
```
3029

3130
Then deploy Persistent Volume and Persistent Volume Claim.
@@ -78,15 +77,15 @@ awxbackup-2021-06-06 6m47s
7877
```
7978

8079
```bash
81-
$ ls -l /data/backup/
80+
$ sudo ls -l /data/backup/
8281
total 0
83-
drwxr-xr-x. 2 root root 59 Jun 5 06:51 tower-openshift-backup-2021-06-06-105149
82+
drwxr-xr-x. 2 26 26 59 Jun 5 06:51 tower-openshift-backup-2021-06-06-105149
8483

85-
$ ls -l /data/backup/tower-openshift-backup-2021-06-06-105149/
84+
$ sudo ls -l /data/backup/tower-openshift-backup-2021-06-06-105149/
8685
total 736
87-
-rw-------. 1 1001 root 1093 Jun 6 06:51 awx_object
88-
-rw-------. 1 1001 root 17085 Jun 6 06:51 secrets.yml
89-
-rw-rw----. 1 root root 833184 Jun 6 06:51 tower.db
86+
-rw-------. 1 26 26 1093 Jun 6 06:51 awx_object
87+
-rw-------. 1 26 26 17085 Jun 6 06:51 secrets.yml
88+
-rw-r--r--. 1 26 26 833184 Jun 6 06:51 tower.db
9089
```
9190

9291
## Appendix: Back up AWX using Ansible

backup/ansible/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ An example simple playbook for Ansible is also provided in this repository. This
3232
| - | - | - |
3333
| `awxbackup_namespace` | The name of the NameSpace where the `AWXBackup` resource will be created. | `awx` |
3434
| `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') }}` |
35-
| `awxbackup_spec` | The `spec` of the `AWXBackup` resource. Refer [official documentation](https://github.com/ansible/awx-operator/tree/2.13.0/roles/backup) for acceptable fields. | `deployment_name: awx`<br>`backup_pvc: awx-backup-claim`<br>`clean_backup_on_delete: true` |
35+
| `awxbackup_spec` | The `spec` of the `AWXBackup` resource. Refer [official documentation](https://github.com/ansible/awx-operator/tree/2.13.1/roles/backup) for acceptable fields. | `deployment_name: awx`<br>`backup_pvc: awx-backup-claim`<br>`clean_backup_on_delete: true` |
3636
| `awxbackup_timeout` | Time to wait for backup to complete, in seconds. If exceeded, the playbook will fail. | `600` |
3737
| `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` |
3838

containergroup/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Prepare directories for Persistent Volumes defined in `containergroup/case1/pv.y
3535

3636
```bash
3737
sudo mkdir -p /data/work
38-
sudo chmod 755 /data/work
38+
sudo chmod 700 /data/work
3939
sudo chown 1000:0 /data/work
4040
```
4141

@@ -188,7 +188,7 @@ Prepare directories for Persistent Volumes defined in `containergroup/case2/pv.y
188188

189189
```bash
190190
sudo mkdir -p /data/demo
191-
sudo chmod 755 /data/demo
191+
sudo chmod 700 /data/demo
192192
sudo chown 1000:0 /data/demo
193193
```
194194

galaxy/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Prepare directories for Persistent Volumes defined in `galaxy/galaxy/pv.yaml`.
123123
sudo mkdir -p /data/galaxy/postgres-13
124124
sudo mkdir -p /data/galaxy/redis
125125
sudo mkdir -p /data/galaxy/file
126-
sudo chmod 755 /data/galaxy/postgres-13
126+
sudo chmod 700 /data/galaxy/postgres-13
127127
sudo chown 1000:0 /data/galaxy/file
128128
```
129129

operator/kustomization.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ secretGenerator:
1212
- operator=awx
1313

1414
resources:
15-
- github.com/ansible/awx-operator/config/default?ref=2.13.0
15+
- github.com/ansible/awx-operator/config/default?ref=2.13.1
1616

1717
images:
1818
- name: quay.io/ansible/awx-operator
19-
newTag: 2.13.0
19+
newTag: 2.13.1

restore/README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ sudo rm -rf /data/postgres-15
3939
Then prepare directories for your PVs. `/data/projects` is required if you are restoring the entire AWX to a new environment.
4040

4141
```bash
42-
sudo mkdir -p /data/postgres-15
42+
sudo mkdir -p /data/postgres-15/data
4343
sudo mkdir -p /data/projects
44-
sudo chmod 755 /data/postgres-15
44+
sudo chmod 700 /data/postgres-15/data
45+
sudo chown 26:0 /data/postgres-15/data
4546
sudo chown 1000:0 /data/projects
4647
```
4748

@@ -102,7 +103,7 @@ $ kubectl -n awx logs -f deployments/awx-operator-controller-manager
102103
...
103104
----- Ansible Task Status Event StdOut (awx.ansible.com/v1beta1, Kind=AWX, awx/awx) -----
104105
PLAY RECAP *********************************************************************
105-
localhost : ok=87 changed=1 unreachable=0 failed=0 skipped=76 rescued=0 ignored=1
106+
localhost : ok=92 changed=0 unreachable=0 failed=0 skipped=79 rescued=0 ignored=1
106107
```
107108

108109
This will create AWXRestore object in the namespace, and now your AWX is restored.

rulebooks/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Prepare directories for Persistent Volumes defined in `base/pv.yaml`. This direc
117117

118118
```bash
119119
sudo mkdir -p /data/eda/postgres-13/data
120-
sudo chmod 755 /data/eda/postgres-13/data
120+
sudo chmod 700 /data/eda/postgres-13/data
121121
sudo chown 26:0 /data/eda/postgres-13/data
122122
```
123123

tips/troubleshooting.md

+18-12
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,11 @@ Typical solutions are one of the following:
184184
web_resource_requirements: {} 👈👈👈
185185
task_resource_requirements: {} 👈👈👈
186186
ee_resource_requirements: {} 👈👈👈
187+
init_container_resource_requirements: {} 👈👈👈
188+
postgres_init_container_resource_requirements: {} 👈👈👈
189+
postgres_resource_requirements: {} 👈👈👈
190+
redis_resource_requirements: {} 👈👈👈
191+
rsyslog_resource_requirements: {} 👈👈👈
187192
```
188193
189194
- You can specify more specific value for each containers. Refer [official documentation](https://ansible.readthedocs.io/projects/awx-operator/en/latest/user-guide/advanced-configuration/containers-resource-requirements.html) for details.
@@ -286,53 +291,54 @@ awx-postgres-13-0 1/1 CrashLoopBackOff 5
286291
awx-task-5d8cd9b6b9-8ptjt 0/4 Running 0 6m55s
287292
awx-web-66f89bc9cf-6zck5 0/3 Running 0 6m9s
288293
289-
$ kubectl -n awx logs statefulset/awx-postgres
294+
# On PostgreSQL 13
295+
$ kubectl -n awx logs statefulset/awx-postgres-13
290296
mkdir: cannot create directory '/var/lib/postgresql/data': Permission denied
297+
298+
# On PostgreSQL 15
299+
$ kubectl -n awx logs statefulset/awx-postgres-13
300+
mkdir: cannot create directory '/var/lib/pgsql/data/userdata': Permission denied
291301
```
292302

293303
You should check the permissions and the owner of directories where used as PV on your K3s host.
294304

295-
For the PostgreSQL that deployed by **AWX Operator 2.12.2 or earlier**, if you followed my guide, it would be `/data/postgres-13`. There is additional `data` directory created by K3s under `/data/postgres-13`.
305+
For the PostgreSQL 13 that deployed by **AWX Operator 2.12.2 or earlier**, if you followed my guide, it would be `/data/postgres-13`. There is additional `data` directory created by K3s under `/data/postgres-13`.
296306

297307
```bash
298308
$ ls -ld /data/postgres-13 /data/postgres-13/data
299309
drwxr-xr-x. 2 root root 18 Aug 20 10:09 /data/postgres-13
300310
drwxr-xr-x. 3 root root 20 Aug 20 10:09 /data/postgres-13/data
301311
```
302312

303-
In my environment, `755` and `root:root` (`0:0`) works correctly. So you can try:
313+
In my environment, `755` and `root:root` (`0:0`) works correctly. So you can try following commands.
304314

305315
```bash
306316
sudo chmod 755 /data/postgres-13 /data/postgres-13/data
307317
sudo chown 0:0 /data/postgres-13 /data/postgres-13/data
308318
```
309319

310-
Or, you can also try `` as owner/group for the directory.
320+
Or, you can also try `999:0` as owner/group for the directory. `999` is [the UID of the `postgres` user which used in the container](https://github.com/docker-library/postgres/blob/master/13/bullseye/Dockerfile#L13).
311321

312322
```bash
313323
sudo chmod 755 /data/postgres-13 /data/postgres-13/data
314324
sudo chown 999:0 /data/postgres-13 /data/postgres-13/data
315325
```
316326

317-
`999` is [the UID of the `postgres` user which used in the container](https://github.com/docker-library/postgres/blob/master/13/bullseye/Dockerfile#L13).
318-
319-
For the PostgreSQL that deployed by **AWX Operator 2.13.0 or later**, if you followed my guide, it would be `/data/postgres-15`. There is additional `data` directory created by K3s under `/data/postgres-15`.
327+
For the PostgreSQL 15 that deployed by **AWX Operator 2.13.0 or later**, if you followed my guide, it would be `/data/postgres-15`. There is additional `data` directory created by K3s under `/data/postgres-15`.
320328

321329
```bash
322330
$ ls -ld /data/postgres-15 /data/postgres-15/data
323331
drwxr-xr-x. 2 root root 18 Aug 20 10:09 /data/postgres-15
324-
drwxr-xr-x. 3 root root 20 Aug 20 10:09 /data/postgres-15/data
332+
drwxr-xr-x. 3 26 root 20 Aug 20 10:09 /data/postgres-15/data
325333
```
326334

327-
In my environment, `755` and `26:0` works correctly. So you can try:
335+
In my environment, `700` and `26:0` works correctly. So you can try following commands. `26` is [the UID of the user which used in the container](https://github.com/sclorg/postgresql-container/blob/master/15/Dockerfile.c9s#L86).
328336

329337
```bash
330-
sudo chmod 755 /data/postgres-15 /data/postgres-15/data
338+
sudo chmod 700 /data/postgres-15 /data/postgres-15/data
331339
sudo chown 26:0 /data/postgres-15 /data/postgres-15/data
332340
```
333341

334-
`26` is [the UID of the user which used in the container](https://github.com/sclorg/postgresql-container/blob/master/15/Dockerfile.c9s#L86).
335-
336342
## Troubles during Daily Use
337343

338344
### Job failed with no output

0 commit comments

Comments
 (0)