Migrating AWX-operator(0.11.0) from old k8s cluster to new k8s cluster

Hi Team,

How can I migrate my AWX-operator (version: 0.11.0) from a old k8s cluster to the latest version in a new k8s cluster?
I intend to backup and restore existing awx-operator data (including settings, templates, projects, and all other data) to a new cluster.

So, Could you guys kindly share helpful resources or step-by-step instructions to ensure a successful migration.

Thank you in Advance!!

hey @chandruv21 you can find some documentation on this topic here Upgrading - Ansible AWX Operator Documentation

Hey @thedoubl3j ,

I’m facing issue while migrating data from one cluster to another.

My awx-operator version: 0.11.0

On my env awx-operator is successfully installed and running in older k8s cluster. Now I’m planning to migrate it to new k8s cluster. How can I take a awx dump and restore it in new k8s cluster??

I’m still pretty new to everything AWX, but I’ve been doing all of my AWX configuration using awx.awx galaxy collection from command line Ansible and storing the configurations in version control (git). This way, every time I mess up my environment or want to move environments I just reset the server, run AWX operator on kubernetes to install AWX, and run my AWX configuration playbooks.

It is a LOT more work up front to understand how awx.awx.settings works and how to configuration everything using only Ansible to push configurations, but it helps me learn Ansible and keeps me ready to rebuild the entire environment if I have to.

@Dustin ,

If you don’t mind could you share me the steps you followed to migrate ?

I’m still pretty new to Ansible and AWX. So, take my advice at face value. I’m also still learning.

I use command line Ansible to configure my AWX instances. I put my AWX admin username and password into an ansible-vault file.

Use ansible-galaxy to install the awx.awx collection.

Then, I use playbooks to push the configurations to AWX.
Here’s a sample playbook to update AWX configurations (pb_inventories.yml). I use this playbook to create all of my inventories in AWX.

- name:  ========== Configure Inventories ==========
  connection: local
  hosts: lab
  gather_facts: no
  environment:
    CONTROLLER_USERNAME: "{{ vault_controller_username }}"
    CONTROLLER_PASSWORD: "{{ vault_controller_password }}"
    CONTROLLER_HOST: "{{ awx_url }}"

  tasks:
    - name: A10 Dev
      awx.awx.inventory:
        name: A10 Dev
        description: Non-production A10s
        organization: My Organization
        state: present

    - name: AWXLab
      awx.awx.inventory:
        name: AWXLab
        description: Lab AWX Instances
        organization: My Organization
        state: present

    - name: LocalHost
      awx.awx.inventory:
        name: localhost
        description: localhost for execution from the execution environment
        organization: My Organization
        state: present

What this allows me to do is configure AWX from code, instead of having to click around the GUI. When I want to upgrade, I just install the newer version of AWX on another system and run these playbooks against the new installation.

This method doesn’t allow you to carry over execution data (like job history), but it makes configuration a lot quicker.

So far, I have playbooks for configuring:

  • Generic settings like SSO, Base URL, etc.
  • Organizations
  • Teams
  • Credential Types
  • Credentials
  • Projects
  • Inventories
  • Hosts
  • Job Templates
  • Workflow Job Templates