Skip to content

Commit dad0746

Browse files
authored
Merge pull request #673 from mhjacks/add_portworx_dr
Add portworx DR
2 parents 453ce71 + 09e7e26 commit dad0746

3 files changed

Lines changed: 317 additions & 0 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: Portworx DR
3+
date: 2026-04-24
4+
tier: sandbox
5+
summary: This pattern demonstrates the use of Red Hat Ansible Automation Platform to configure and execute Portworx Enterprise Disaster Recovery.
6+
rh_products:
7+
- Red Hat OpenShift Container Platform
8+
- Red Hat OpenShift Virtualization
9+
- Red Hat Enterprise Linux
10+
- Red Hat OpenShift Data Foundation
11+
- Red Hat OpenShift Data Foundation MultiCluster Orchestrator
12+
- Red Hat OpenShift Data Foundation DR Hub Operator
13+
- Red Hat Advanced Cluster Management
14+
industries: []
15+
aliases: /portworx-dr/
16+
pattern_logo: ansible-edge.png
17+
links:
18+
github: https://github.com/validatedpatterns-sandbox/portworx-dr/
19+
install: getting-started
20+
bugs: https://github.com/validatedpatterns-sandbox/portworx-dr/issues
21+
feedback: https://docs.google.com/forms/d/e/1FAIpQLScI76b6tD1WyPu2-d_9CCVDr3Fu5jYERthqLKJDUGwqBg7Vcg/viewform
22+
ci: portworx-dr
23+
---
24+
25+
:toc:
26+
:imagesdir: /images
27+
:_content-type: ASSEMBLY
28+
include::modules/comm-attributes.adoc[]
29+
30+
== Portworx Disaster Recovery
31+
32+
This pattern demonstrates the use of Ansible Automation Platform to orchestrate Portworx Disaster Recovery
33+
on AWS with a simple example application (boutique).
34+
35+
=== Background
36+
37+
It would be ideal if all applications in the world understood availability concepts natively and had their own
38+
integrated regional failover strategies. However, many workloads do not, and users who need regional disaster recovery
39+
capabilities need to solve this problem for the applications that cannot solve it for themselves.
40+
41+
==== Solution elements
42+
43+
==== Red Hat Technologies
44+
45+
* Red Hat OpenShift Container Platform (Kubernetes)
46+
* Red Hat Ansible Automation Platform
47+
* Red Hat Advanced Cluster Management (RHACM)
48+
* Red Hat OpenShift GitOps (ArgoCD)
49+
* Red Hat External Secrets Operator
50+
51+
==== Other technologies this pattern Uses
52+
53+
* HashiCorp Vault (Community Edition)
54+
* Portworx Enterprise
55+
56+
=== Architecture
57+
58+
Coming Soon
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: Cluster sizing
3+
weight: 50
4+
aliases: /portworx-dr/cluster-sizing/
5+
---
6+
7+
:toc:
8+
:imagesdir: /images
9+
:_content-type: ASSEMBLY
10+
11+
include::modules/comm-attributes.adoc[]
12+
include::modules/portworx-dr/metadata-portworx-dr.adoc[]
13+
14+
The OpenShift hub cluster is made of 3 Control Plane nodes and 3 Workers for the cluster; the 3 workers are standard
15+
compute nodes. For the node sizes we used the **m5.4xlarge** on AWS.
16+
17+
This pattern has only been tested on AWS only right now because of the integration of both Hive and OpenShift
18+
Virtualization. We may publish a later revision that supports more hyperscalers.
19+
20+
include::modules/cluster-sizing-template.adoc[]
21+
Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
---
2+
title: Getting Started
3+
weight: 10
4+
aliases: /portworx-dr/getting-started/
5+
---
6+
7+
:toc:
8+
:imagesdir: /images
9+
:_content-type: ASSEMBLY
10+
include::modules/comm-attributes.adoc[]
11+
12+
[id="deploying-portworx-dr-pattern"]
13+
== Deploying the Portworx DR Pattern
14+
15+
.Prerequisites
16+
17+
* An OpenShift cluster
18+
** To create an OpenShift cluster, go to the https://console.redhat.com/[Red Hat Hybrid Cloud console].
19+
** Select *OpenShift \-> Red Hat OpenShift Container Platform \-> Create cluster*.
20+
* A GitHub account with a personal access token that has repository read and write permissions.
21+
* The Helm binary, for instructions, see link:https://helm.sh/docs/intro/install/[Installing Helm]
22+
* Additional installation tool dependencies. For details, see link:https://validatedpatterns.io/learn/quickstart/[Patterns quick start].
23+
24+
It is desirable to have a cluster for deploying the GitOps management hub assets and a separate cluster(s) for the managed cluster(s).
25+
26+
[id="preparing-for-deployment"]
27+
== Preparing for deployment
28+
.Procedure
29+
30+
. Fork the link:https://github.com/validatedpatterns-sandbox/portworx-dr[portworx-dr] repository on GitHub. You must fork the repository because your fork is updated as part of the GitOps and DevOps processes.
31+
32+
. Clone the forked copy of this repository.
33+
+
34+
[source,terminal]
35+
----
36+
$ git clone git@github.com:your-username/portworx-dr.git
37+
----
38+
39+
. Go to your repository: Ensure you are in the root directory of your Git repository by using:
40+
+
41+
[source,terminal]
42+
----
43+
$ cd /path/to/your/repository
44+
----
45+
46+
. Run the following command to set the upstream repository:
47+
+
48+
[source,terminal]
49+
----
50+
$ git remote add -f upstream git@github.com:validatedpatterns-sandbox/portworx-dr.git
51+
----
52+
53+
. Verify the setup of your remote repositories by running the following command:
54+
+
55+
[source,terminal]
56+
----
57+
$ git remote -v
58+
----
59+
+
60+
.Example output
61+
+
62+
[source,terminal]
63+
----
64+
origin git@github.com:kquinn1204/portworx-dr.git (fetch)
65+
origin git@github.com:kquinn1204/portworx-dr.git (push)
66+
upstream git@github.com:validatedpatterns-sandbox/portworx-dr.git (fetch)
67+
upstream git@github.com:validatedpatterns-sandbox/portworx-dr.git (push)
68+
----
69+
70+
. Make a local copy of secrets template outside of your repository to hold credentials for the pattern.
71+
+
72+
[WARNING]
73+
====
74+
Do not add, commit, or push this file to your repository. Doing so may expose personal credentials to GitHub.
75+
====
76+
+
77+
Run the following commands:
78+
+
79+
[source,terminal]
80+
----
81+
$ cp values-secret.yaml.template ~/values-secret.yaml
82+
----
83+
84+
. Populate this file with secrets, or credentials, that are needed to deploy the pattern successfully:
85+
+
86+
[source,terminal]
87+
----
88+
$ vi ~/values-secret.yaml
89+
----
90+
91+
.. Edit the `aws` section to refer to the file containing your AWS credentials:
92+
+
93+
[source,yaml]
94+
----
95+
- name: aws
96+
fields:
97+
- name: aws_access_key_id
98+
ini_file: ~/.aws/credentials
99+
ini_key: aws_access_key_id
100+
- name: aws_secret_access_key
101+
ini_file: ~/.aws/credentials
102+
ini_key: aws_secret_access_key
103+
- name: baseDomain
104+
value: aws.example.com
105+
- name: pullSecret
106+
path: ~/pull_secret.json
107+
- name: ssh-privatekey
108+
path: ~/.ssh/privatekey
109+
- name: ssh-publickey
110+
path: ~/.ssh/publickey
111+
----
112+
113+
.. Add a Portworx Enterprise DR license:
114+
+
115+
[source,yaml]
116+
----
117+
- name: portworx
118+
vaultPrefixes:
119+
- global
120+
fields:
121+
- name: dr_license
122+
path: "/path/to/enterprise+dr/license"
123+
description: "The portworx dr license that can be activated with `pxctl license activate saas --key <license>`"
124+
----
125+
126+
.. Add the kubeconfigs for both clusters:
127+
+
128+
[source,yaml]
129+
----
130+
- name: kubeconfigs
131+
vaultPrefixes:
132+
- global
133+
fields:
134+
- name: primary_kubeconfig
135+
path: "/path/to/primary/cluster/kubeconfig"
136+
description: "path to the the kubeconfig for the primary cluster"
137+
- name: secondary_kubeconfig
138+
path: "/path/to/secondary/cluster/kubeconfig"
139+
description: "path to the the kubeconfig for the secondary (failover) cluster"
140+
----
141+
142+
.. Add an Ansible Automation Platform manifest:
143+
+
144+
[source,yaml]
145+
----
146+
- name: aap-manifest
147+
vaultPrefixes:
148+
- hub
149+
fields:
150+
- name: b64content
151+
path: '~/Downloads/<manifest_filename>.zip'
152+
base64: true
153+
description: "Manifest obtained from following https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/installing_on_openshift_container_platform/assembly-gateway-licensing-operator-copy#assembly-aap-obtain-manifest-files"
154+
----
155+
156+
.. Add an Ansible Automation Platform Automation Hub token:
157+
+
158+
[source,yaml]
159+
----
160+
- name: automation-hub-token
161+
vaultPrefixes:
162+
- hub
163+
fields:
164+
- name: token
165+
path: '/path/to/automation-hub-token'
166+
description: "Automation hub token obtained from https://console.redhat.com/ansible/automation-hub/token"
167+
----
168+
169+
.. Add an AGOF Vault File. Normally the content "---" is sufficient:
170+
+
171+
[source,yaml]
172+
----
173+
- name: agof-vault-file
174+
vaultPrefixes:
175+
- hub
176+
fields:
177+
- name: agof-vault-file
178+
value: '---'
179+
base64: true
180+
description: "Needed for AGOF, do not change!"
181+
----
182+
183+
. Create and switch to a new branch named `my-branch`, by running the following command:
184+
+
185+
[source,terminal]
186+
----
187+
$ git checkout -b my-branch
188+
----
189+
190+
. The pattern will infer the baseDomain of your cluster based on the clusterDomain which is tracked by the pattern
191+
operator. Previously, this required the pattern to be forked to be useful - but this is no longer the case (you may
192+
still wish to change other settings in the RDR chart's values file, such as `aws.region` settings. This file is at
193+
link:https://github.com/validatedpatterns/portworx-dr/blob/main/charts/hub/rdr/values.yaml[hub/rdr/values.yaml]. If you do make customizations to this or other files, it is necessary to fork the pattern so that the changes
194+
will be seen by ArgoCD. If you made any changes to this or any other files tracked by git, git add them and then commit the changes by running the following command:
195+
+
196+
[source,terminal]
197+
----
198+
$ git commit -m "any updates"
199+
----
200+
201+
. Push the changes to your forked repository:
202+
+
203+
[source,terminal]
204+
----
205+
$ git push origin my-branch
206+
----
207+
208+
The preferred way to install this pattern is by using the script `./pattern.sh` script.
209+
210+
[id="deploying-cluster-using-patternsh-file"]
211+
== Deploying the pattern by using the pattern.sh file
212+
213+
To deploy the pattern by using the `pattern.sh` file, complete the following steps:
214+
215+
. Log in to your cluster by following this procedure:
216+
217+
.. Obtain an API token by visiting link:https://oauth-openshift.apps.<your-cluster>.<domain>/oauth/token/request[https://oauth-openshift.apps.<your-cluster>.<domain>/oauth/token/request].
218+
219+
.. Log in to the cluster by running the following command:
220+
+
221+
[source,terminal]
222+
----
223+
$ oc login --token=<retrieved-token> --server=https://api.<your-cluster>.<domain>:6443
224+
----
225+
+
226+
Or log in by running the following command:
227+
+
228+
[source,terminal]
229+
----
230+
$ export KUBECONFIG=~/<path_to_kubeconfig>
231+
----
232+
233+
. Deploy the pattern to your cluster. Run the following command:
234+
+
235+
[source,terminal]
236+
----
237+
$ ./pattern.sh make install
238+
----

0 commit comments

Comments
 (0)