This pattern uses Portworx and AAP to automate the creation of a DR backup of the Boutique chart in a secondary OpenShift cluster as well as including the ansible job to spin up and tear down a bubble test environment to ensure the validity of the backed up data without disrupting regular DR migrations between the primary and secondary cluster.
Before you can use this pattern you will need:
- Two AWS OpenShift clusters.
- AWS credentials with privileges for setting IAM policies on EC2 instances and updating EC2 security groups.
- A Portworx Enterprise DR License
- An AAP manifest file
- An automation hub token
- A Podman installation
First, you'll need to copy the secrets template to your home directory with the correct name:
cp values-secret.yaml.template ~/values-secret-portworx-dr.yamlUpdate the aws-creds secret with AWS credentials with the requisite privileges for updating EC2 nodes and their
security groups. This is necessary because the worker nodes of your clusters will not have all the ports open
and permissions needed by Portworx by default.
Update the portworx secret with your Portworx Enterprise DR license. You can provide a path, like in the template,
or a value directly. Just make sure there's no extra spaces or newlines in your license or Portworx will fail to
recognize it.
In the kubeconfigs secret, add your local paths to the primary and secondary cluster kubeconfigs.
Update the aap-manifest and automation-hub-token secrets after following along the documentation in
the Prerequisites section.
Export the KUBECONFIG environment variable to point to the path of your primary cluster's kubeconfig:
export KUBECONFIG="/path/to/primary/cluster/kubeconfig"Then, all you need to do is install the pattern itself with the command below:
./pattern.sh make installThe pattern will automatically add your secondary cluster via ACM and set up the async Portworx cluster pairing for the boutique namespace. A migration schedule will also be started with an interval of 5 minutes. This whole process will take up to an hour. The clusters are fully set up when the Argo apps on primary and secondary clusters are healthy and synced and the jobs in AAP all succeed.
This repo contains the controller configuration used for the jobs, schedules, inventories, credentials and related resources inside of AAP.
This repo contains the playbooks and roles that are utilized in AAP for automatically configuring the license activation, ACM import, cluster pairing and all the other automagic operations that happen as part of this pattern.