cancel
Showing results for 
Search instead for 
Did you mean: 
dkcbk
Flight Engineer
Flight Engineer
  • 2,399 Views

AWX projects persistence

Jump to solution
Hi.
I have a question regarding the persistence of AWX projects. In the documentation, I found that project persistence can be configured (https://github.com/ansible/awx-operator/blob/devel/docs/user-guide/advanced-configuration/persisting...). Does this mean that projects in AWX are not persistent by default? If a pod is deleted, do the projects also get deleted?
Labels (2)
1 Solution

Accepted Solutions
Travis
Moderator
Moderator
  • 2,069 Views

@dkcbk -

So you are referring to OpenShift and the AWX operator that installs AWX as a containerized environment. Since this is an operator installing AWX in a containerized environment it will install pods with one or more containers inside the pods (depending on how things are configured and setup) just like any other OCP deployment. 

Since Pods are essentially containers, it should be known that the containers in the pods are using ephemeral storage unless otherwise specified and told to be persistent storage. 

What does this mean ...?

Simply put, if the Pod/Container which is running AWX is removed and a new Pod/Container is launched ... all data from the Pod that was removed is lost (because of ephemeral storage). So Projects, Job Template Workflows, Configurations, etc. would all be lost if they were contained on the Ephemeral storage. So if you were expecting the content to be there when a new AWX pod spins up on another Node, you will not have the projects directory.

The operator does allow you to configure Project persistence as @Chetan_Tiwary_ mentioned with the documentation, but it is turned off by default.

Keep in mind though ... the local copy of the projects get deleted, the content of the projects come from an external repository so it is possible to re-create the Project and allow the content to be synchronized once again to AWX.

I actually have a playbook that can create a Project on AWX/Ansible Automation Controller that I use when teaching the course since I start with a new classroom environment each time.

https://github.com/tmichett/AAP2_Controller_Demo/blob/main/Setup_Controller/Create_Project.yml

Using a playbook along with Configuration as Code (CaC) for everything you are doing you can quickly recover and provision a new AWX environment even if the cluster completely dies.

 

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training

View solution in original post

2 Replies
Chetan_Tiwary_
Community Manager
Community Manager
  • 2,075 Views

Hello @dkcbk !

I think yes , projects_persistence is false by default, which gives volume is of type emptyDir in the pod definition - if project persistence is not defined in the awx.spec .

You'll need to create a PersistentVolume and PersistentVolumeClaim, and then configure the operator to use the PVC as given here :

Chetan_Tiwary__0-1700602204491.png

 

https://docs.ansible.com/automation-controller/4.0.0/html_zh/administration/operator_advanced_config... 

Cc:  @Travis to provide inputs 

0 Kudos
Travis
Moderator
Moderator
  • 2,070 Views

@dkcbk -

So you are referring to OpenShift and the AWX operator that installs AWX as a containerized environment. Since this is an operator installing AWX in a containerized environment it will install pods with one or more containers inside the pods (depending on how things are configured and setup) just like any other OCP deployment. 

Since Pods are essentially containers, it should be known that the containers in the pods are using ephemeral storage unless otherwise specified and told to be persistent storage. 

What does this mean ...?

Simply put, if the Pod/Container which is running AWX is removed and a new Pod/Container is launched ... all data from the Pod that was removed is lost (because of ephemeral storage). So Projects, Job Template Workflows, Configurations, etc. would all be lost if they were contained on the Ephemeral storage. So if you were expecting the content to be there when a new AWX pod spins up on another Node, you will not have the projects directory.

The operator does allow you to configure Project persistence as @Chetan_Tiwary_ mentioned with the documentation, but it is turned off by default.

Keep in mind though ... the local copy of the projects get deleted, the content of the projects come from an external repository so it is possible to re-create the Project and allow the content to be synchronized once again to AWX.

I actually have a playbook that can create a Project on AWX/Ansible Automation Controller that I use when teaching the course since I start with a new classroom environment each time.

https://github.com/tmichett/AAP2_Controller_Demo/blob/main/Setup_Controller/Create_Project.yml

Using a playbook along with Configuration as Code (CaC) for everything you are doing you can quickly recover and provision a new AWX environment even if the cluster completely dies.

 

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
Join the discussion
You must log in to join this conversation.