mirror of
https://github.com/Expand-sys/awx-on-k3s
synced 2025-12-15 21:42:15 +11:00
feat: bump awx operator version to 0.27.0
This commit is contained in:
parent
c7eaa38dcf
commit
272dd1d1c8
12 changed files with 74 additions and 69 deletions
64
README.md
64
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 <none> 8443/TCP 7m43s
|
||||
service/awx-postgres-13 ClusterIP None <none> 5432/TCP 4m6s
|
||||
service/awx-service ClusterIP 10.43.232.137 <none> 80/TCP 4m
|
||||
service/awx-operator-controller-manager-metrics-service ClusterIP 10.43.229.20 <none> 8443/TCP 5m45s
|
||||
service/awx-postgres-13 ClusterIP None <none> 5432/TCP 4m46s
|
||||
service/awx-service ClusterIP 10.43.135.205 <none> 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 <none> awx.example.com 192.168.0.100 80, 443 4m
|
||||
NAME CLASS HOSTS ADDRESS PORTS AGE
|
||||
ingress.networking.k8s.io/awx-ingress <none> 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.
|
||||
|
|
|
|||
|
|
@ -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`<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/0.27.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` |
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
<!-- omit in toc -->
|
||||
## 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
|
||||
...
|
||||
|
|
|
|||
|
|
@ -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 <none> galaxy.example.com 192.168.0.100 80, 443 4m19s
|
||||
NAME CLASS HOSTS ADDRESS PORTS AGE
|
||||
ingress.networking.k8s.io/galaxy-ingress <none> 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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <none> 3000/TCP,22/TCP 11s
|
||||
service/git-service ClusterIP 10.43.134.80 <none> 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 <none> git.example.com 192.168.0.100 80, 443 11s
|
||||
NAME CLASS HOSTS ADDRESS PORTS AGE
|
||||
ingress.networking.k8s.io/git-ingress <none> 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.
|
||||
|
|
|
|||
|
|
@ -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 <none> 5000/TCP 9s
|
||||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
|
||||
service/registry-service ClusterIP 10.43.15.228 <none> 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 <none> registry.example.com 192.168.0.100 80, 443 9s
|
||||
NAME CLASS HOSTS ADDRESS PORTS AGE
|
||||
ingress.networking.k8s.io/registry-ingress <none> 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.
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ One easy way to do this is to use `dnsmasq`.
|
|||
|
||||
```bash
|
||||
sudo tee -a /etc/hosts <<EOF
|
||||
192.168.0.100 awx.example.com
|
||||
192.168.0.100 registry.example.com
|
||||
192.168.0.100 git.example.com
|
||||
192.168.0.100 galaxy.example.com
|
||||
192.168.0.219 awx.example.com
|
||||
192.168.0.219 registry.example.com
|
||||
192.168.0.219 git.example.com
|
||||
192.168.0.219 galaxy.example.com
|
||||
EOF
|
||||
```
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ One easy way to do this is to use `dnsmasq`.
|
|||
|
||||
```bash
|
||||
sudo tee /etc/rancher/k3s/resolv.conf <<EOF
|
||||
nameserver 192.168.0.100
|
||||
nameserver 192.168.0.219
|
||||
EOF
|
||||
```
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ One easy way to do this is to use `dnsmasq`.
|
|||
Address 1: 10.43.0.10 kube-dns.kube-system.svc.cluster.local
|
||||
|
||||
Name: git.example.com
|
||||
Address 1: 192.168.0.100
|
||||
Address 1: 192.168.0.219
|
||||
pod "busybox" deleted
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -179,7 +179,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.26.0/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.27.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
|
||||
|
|
@ -261,7 +261,7 @@ To solve this, check or try the following:
|
|||
|
||||
- Ensure your PostgreSQL (typically the Pod named `awx-postgres-0` or `awx-postgres-13-0`) is in `Running` state.
|
||||
- Ensure `host` under `awx-postgres-configuration` in `base/kustomization.yaml` has correct value.
|
||||
- Specify `awx-postgres` for AWX Operator 0.25.0 or earlier, `awx-postgres-13` for `0.26.0`.
|
||||
- Specify `awx-postgres` for AWX Operator 0.25.0 or earlier, `awx-postgres-13` for `0.26.0` or later.
|
||||
- Ensure your `firewalld`, `ufw` or any kind of firewall has been disabled on your K3s host.
|
||||
- Ensure your `nm-cloud-setup` service on your K3s host is disabled if exists.
|
||||
- Ensure your `awx-postgres-configuration` has correct values, especially if you're using external PostgreSQL.
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ The table below maps the AWX Operator versions and bundled AWX versions.
|
|||
|
||||
| AWX Operator | AWX |
|
||||
| - | - |
|
||||
| 0.27.0 | 21.5.0 |
|
||||
| 0.26.0 | 21.4.0 |
|
||||
| 0.25.0 | 21.3.0 |
|
||||
| 0.24.0 | 21.3.0 |
|
||||
|
|
|
|||
Loading…
Reference in a new issue