Hi
When I first setup awx-operator and awx 7 months ago, I used to deal with Helm charts, awx-operator that deployed an awx instance.
I used to configured my AWX instance using an ansible playbook I made that set all settings i need (i.e. LDAP, organization, projects, templates etc…)
Now, i plan to upgrade my current AWX setup :
- awx-operator from 2.9.0 to 2.19.0
- awx from 23.5.1 from to 24.6.0
Upgrade will be done still using Helm charts but I got several questions as it’s the first time I’ll do that :
- if everything runs fine, does my AWX data should be kept as-is or will it be replaced as it was a new instance ?
- from a configuration perspective, I know how to perform configuration through ansible-playbook, but is there any way to dump current AWX configuration I could use in case of failure ?
- I saw
awx
cli is able to export settings in json, is it the best way to dump all my AWX data in case of failures ?
Thanks a lot for your precious advices.
Gael
Hi @mikemorency thanks for your answers.
I already get a .json from awx-cli that’s a good start.
When you say “backup the db” it means from a Kubernetes perspective that you backup your PV right ? (note : i’m a beginner with K8s)
Yes, ive only ever used dedicated DBs so I cant give you exact steps. But that sounds right, just the PV matters.
AWX uses a postgres db, so you can also connect to the db and do a pg_dump and then later a pg_restore. Thats usually what I do. Either way id recommend testing the backup if you can before you do the upgrade
1 Like
pg_dump/restore is a great idea.
Thanks a lot for your help, it helps me to secure my setup before upgrading ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=12)
Fingercross !
2 Likes
In addition, for newbies like me who need to perform a dump from embedded Postgre DB, the easiest way is :
Create a temporary port-forward between AWX postgre DB and your computer with :
- Get information about Postgre DB with :
# retrieve your secret's name, something like awx-postgres-configuration
kubectl get secrets
# show secrets
kubectl get secrets awx-your-instance-postgres-configuration -o yaml
- Decode with a base64 decoder the following datas ( ’ | base64’ if you use Linux, else use an online decoder)
data:
database: xxxxx
host: xxxxx
password: xxxxx
port: xxxxx
type: xxxx
username: xxxx
- Create a temporary port-forward between your postgre pod and your computer
kubectl port-forward awx-your-postgre-pod 5432:5432
- Finally, you can access the DB with any tools you got, in my case DBeaver, then perform a Backup.
![image](https://redhat.discourse-cdn.com/ansible/original/2X/7/70490e6c91e4b1df612c77fc6300e4190ef3c42b.png)
2 Likes