Skip to content

Commit 530da6c

Browse files
author
Martin Jackson
committed
Initial docs for RamenDR Starter Kit
1 parent 8c7ad07 commit 530da6c

13 files changed

+363
-0
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: RamenDR Starter Kit
3+
date: 2025-11-13
4+
tier: sandbox
5+
summary: This pattern demonstrates the use of Red Hat OpenShift Data Foundations for Virtualization Regional 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: /ramendr-starter-kit/
16+
pattern_logo: ansible-edge.png
17+
links:
18+
github: https://github.com/validatedpatterns-sandbox/ramendr-starter-kit/
19+
install: getting-started
20+
bugs: https://github.com/validatedpatterns-sandbox/ramendr-starter-kit/issues
21+
feedback: https://docs.google.com/forms/d/e/1FAIpQLScI76b6tD1WyPu2-d_9CCVDr3Fu5jYERthqLKJDUGwqBg7Vcg/viewform
22+
ci: ramendr-starter-kit
23+
---
24+
25+
:toc:
26+
:imagesdir: /images
27+
:_content-type: ASSEMBLY
28+
include::modules/comm-attributes.adoc[]
29+
30+
== RamenDR Regional Disaster Recovery with Virtualization Starter Kit
31+
32+
This pattern sets up three clusters as recommended for OpenShift Data Foundations Regional Disaster Recovery as
33+
documented here(https://docs.redhat.com/en/documentation/red_hat_openshift_data_foundation/4.18/html-single/configuring_openshift_data_foundation_disaster_recovery_for_openshift_workloads/index).
34+
35+
Of additional interest is that the workload that it sets up protection for and can failover involves running virtual
36+
machines.
37+
38+
The setup process is relatively intricate; the goal of this pattern is to handle all the intricate parts and present
39+
a functional DR-capable starting point for Virtual Machine workloads. In particular this pattern takes care to sequence
40+
installations and validate pre-requisites for all of the core components of the Disaster Recovery system.
41+
42+
=== Background
43+
44+
It would be ideal if all applications in the world understood availability concepts natively and had their own
45+
integrated regional failover strategies. However, many workloads do not, and users who need regional disaster recovery
46+
capabilities need to solve this problem for the applications that cannot solve it for themselves.
47+
48+
This pattern uses OpenShift Virtualization (the productization of Kubevirt) to simulate the Edge environment for VMs.
49+
50+
==== Solution elements
51+
52+
==== Red Hat Technologies
53+
54+
* Red Hat OpenShift Container Platform (Kubernetes)
55+
* Red Hat Advanced Cluster Management (RHACM)
56+
* Red Hat OpenShift Data Foundations (ODF, including Multicluster Orchestrator)
57+
* Submariner (VPN)
58+
* Red Hat OpenShift GitOps (ArgoCD)
59+
* OpenShift Virtualization (Kubevirt)
60+
* Red Hat Enterprise Linux 9 (on the VMs)
61+
62+
==== Other technologies this pattern Uses
63+
64+
* HashiCorp Vault (Community Edition)
65+
* External Secrets Operator (Community Edition)
66+
67+
=== Architecture
68+
69+
Similar to other Validated Patterns, this pattern starts with a central management hub. The hub cluster then builds
70+
two managed clusters using Hive, which are in different regions as usually required for Regional Disaster Recovery.
71+
72+
==== Logical architecture
73+
74+
TBD
75+
76+
==== Physical architecture
77+
78+
TBD
79+
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: /ramendr-starter-kit/cluster-sizing/
5+
---
6+
7+
:toc:
8+
:imagesdir: /images
9+
:_content-type: ASSEMBLY
10+
11+
include::modules/comm-attributes.adoc[]
12+
include::modules/ramendr-starter-kit/metadata-ramendr-starter-kit.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: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
---
2+
title: Getting Started
3+
weight: 10
4+
aliases: /ramendr-starter-kit/getting-started/
5+
---
6+
7+
:toc:
8+
:imagesdir: /images
9+
:_content-type: ASSEMBLY
10+
include::modules/comm-attributes.adoc[]
11+
12+
[id="deploying-ramendr-starter-kit-pattern"]
13+
== Deploying the RamenDR Starter Kit 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/ramendr-starter-kit[ramendr-starter-kit] 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 [email protected]:your-username/ramendr-starter-kit.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 [email protected]:validatedpatterns/ramendr-starter-kit.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 [email protected]:kquinn1204/ramendr-starter-kit.git (fetch)
65+
origin [email protected]:kquinn1204/ramendr-starter-kit.git (push)
66+
upstream [email protected]:validatedpatterns-sandbox/ramendr-starter-kit.git (fetch)
67+
upstream [email protected]:validatedpatterns-sandbox/ramendr-starter-kit.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 `vm-ssh` section to include the username, private key, and public key. To ensure the seamless flow of the pattern, the value associated with the `privatekey` and `publickey` has been updated with `path`. For example:
92+
+
93+
[source,yaml]
94+
----
95+
- name: vm-ssh
96+
vaultPrefixes:
97+
- global
98+
fields:
99+
- name: username
100+
value: 'cloud-user'
101+
- name: privatekey
102+
path: '/path/to/private-ssh-key'
103+
- name: publickey
104+
path: '/path/to/public-ssh-key'
105+
----
106+
+
107+
Paste the path to your locally stored private and public keys. If you do not have a key pair, generate one using `ssh-keygen`.
108+
109+
.. Edit the `cloud-init` section to include the `userData` block to use with cloud-init. For example:
110+
+
111+
[source,yaml]
112+
----
113+
- name: cloud-init
114+
vaultPrefixes:
115+
- global
116+
fields:
117+
- name: userData
118+
value: |-
119+
#cloud-config
120+
user: 'cloud-user'
121+
password: 'cloud-user'
122+
chpasswd: { expire: False }
123+
----
124+
125+
.. Edit the `aws` section to refer to the file containing your AWS credentials:
126+
+
127+
[source,yaml]
128+
----
129+
- name: aws
130+
fields:
131+
- name: aws_access_key_id
132+
ini_file: ~/.aws/credentials
133+
ini_key: aws_access_key_id
134+
- name: aws_secret_access_key
135+
ini_file: ~/.aws/credentials
136+
ini_key: aws_secret_access_key
137+
- name: baseDomain
138+
value: aws.example.com
139+
- name: pullSecret
140+
path: ~/pull_secret.json
141+
- name: ssh-privatekey
142+
path: ~/.ssh/privatekey
143+
- name: ssh-publickey
144+
path: ~/.ssh/publickey
145+
----
146+
147+
.. Edit the `openshiftPullSecret` section to refer to the file containing your OpenShift pull secret:
148+
+
149+
[source,yaml]
150+
----
151+
- name: openshiftPullSecret
152+
fields:
153+
- name: .dockerconfigjson
154+
path: ~/pull_secret.json
155+
----
156+
157+
. Create and switch to a new branch named `my-branch`, by running the following command:
158+
+
159+
[source,terminal]
160+
----
161+
$ git checkout -b my-branch
162+
----
163+
164+
. If you made any changes to files tracked by git, git add them and then commit the changes by running the following command:
165+
+
166+
[source,terminal]
167+
----
168+
$ git commit -m "any updates"
169+
----
170+
171+
. Push the changes to your forked repository:
172+
+
173+
[source,terminal]
174+
----
175+
$ git push origin my-branch
176+
----
177+
178+
The preferred way to install this pattern is by using the script `./pattern.sh` script.
179+
180+
[id="deploying-cluster-using-patternsh-file"]
181+
== Deploying the pattern by using the pattern.sh file
182+
183+
To deploy the pattern by using the `pattern.sh` file, complete the following steps:
184+
185+
. Log in to your cluster by following this procedure:
186+
187+
.. 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].
188+
189+
.. Log in to the cluster by running the following command:
190+
+
191+
[source,terminal]
192+
----
193+
$ oc login --token=<retrieved-token> --server=https://api.<your-cluster>.<domain>:6443
194+
----
195+
+
196+
Or log in by running the following command:
197+
+
198+
[source,terminal]
199+
----
200+
$ export KUBECONFIG=~/<path_to_kubeconfig>
201+
----
202+
203+
. Deploy the pattern to your cluster. Run the following command:
204+
+
205+
[source,terminal]
206+
----
207+
$ ./pattern.sh make install
208+
----
209+
210+
.Verification
211+
212+
. Verify that the Operators have been installed on the hub cluster. Navigate to *Operators → Installed Operators* page in the OpenShift Container Platform web console on the Hub cluster (in the "local-cluster" view),
213+
+
214+
.ramendr-starter-kit-operators
215+
image::/images/ramendr-starter-kit/ramendr-hub-operators.png[ramendr-starter-kit-operators,title="RamenDR Hub Operators"]
216+
217+
218+
. Verify that the primary and secondary managed clusters have been built. This can take close to an hour on AWS. On the hub cluster, navigate to *All Clusters* in the OpenShift Container Plaform web console:
219+
+
220+
.ramendr-starter-kit-clusters
221+
image::/images/ramendr-starter-kit/ramendr-clusters-built.png[ramendr-starter-kit-operators,title="RamenDR Clusters"]
222+
. Wait some time for everything to deploy to all the clusters. It might take up to another hour from when the managed clusters finish building. You can track the progress through the `Hub ArgoCD` UI from the nines menu, especially the "opp-policy" and the "regional-dr" applications. Most of the critical resources are in the regional-dr application (at present, the opp-policy app may show missing/out-of-sync, and the regional-dr app may show OutOfSync - even when both are healthy. We are working on a fix, track bug progress link:https://github.com/validatedpatterns-sandbox/ramendr-starter-kit/issues/4[here]):
223+
+
224+
.ramendr-starter-kit-operators-applications
225+
image::/images/ramendr-starter-kit/ramendr-starter-kit-hub-applications.png[ramendr-starter-kit-hub-applications,title="RamenDR Starter Kit Applications"]
226+
. Eventually, the Virtual Machines will be deployed and the Disaster Recovery Placement Control (DRPC) will show that resources are now protected. This screen can be reached via *All Clusters → Data Services → Disaster Recovery → Protected Applications* on the hub cluster. Normally it will be faster to synchronize Kubernetes objects than Application volumes. When these indicators both show Healthy it is safe to trigger a failover:
227+
+
228+
.ramendr-starter-kit-trigger-failover
229+
image::/images/ramendr-starter-kit/ramendr-starter-kit-trigger-failover-1.png[ramendr-starter-kit-trigger-failover-1,title="RamenDR Starter Kit Trigger Failover, part 1"]
230+
. Clicking the "Failover" option will bring up a modal dialog that indicates where the failover will move the workload, and when the last known good state of the workload is. Click on the "Initiate" button to begin the failover:
231+
+
232+
.ramendr-starter-kit-trigger-failover-part-2
233+
image::/images/ramendr-starter-kit/ramendr-starter-kit-trigger-failover-2.png[ramendr-starter-kit-trigger-failover-2,title="RamenDR Starter Kit Trigger Failover, part 2"]
234+
. While the failover is happening, you can watch the progress of it in the activity area. When it is done, it will say (with a discovered application) that it is necessary to clean up application resources to allow replication to start in the other direction. Notice that the primary cluster should have changed:
235+
+
236+
.ramendr-starter-kit-trigger-failover-cleanup
237+
image::/images/ramendr-starter-kit/ramendr-starter-kit-failover-cleanup.png[ramendr-starter-kit-failover-cleanup,title="RamenDR Starter Kit Failover Cleanup"]
238+
. The pattern provides a script to do this cleanup. Invoke it with your Hub cluster KUBECONFIG set and running `./pattern.sh scripts/cleanup-gitops-vms-non-primary.sh`:
239+
+
240+
.ramendr-starter-kit-failover-cleanup-script
241+
image::/images/ramendr-starter-kit/ramendr-starter-kit-failover-cleanup-script.png[ramendr-starter-kit-failover-cleanup-script,title="RamenDR Starter Kit Failover Cleanup"]
242+
. After a few minutes, the resources should show healthy and protected again (the PVCs take a few minutes to synchronize):
243+
+
244+
.ramendr-starter-kit-failover-reprotected
245+
image::/images/ramendr-starter-kit/ramendr-starter-kit-failover-reprotected.png[ramendr-starter-kit-failover-cleanup-reprotected,title="RamenDR Starter Kit Reprotected"]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Installation Details
3+
weight: 20
4+
aliases: /ansible-edge-gitops/installation-details/
5+
---
6+
7+
:toc:
8+
:imagesdir: /images
9+
:_content-type: ASSEMBLY
10+
include::modules/comm-attributes.adoc[]
11+
12+
== Installation Steps
13+
14+
=== Major Validation Scripts
15+
16+
== Triggering a Failover
17+
18+
=== How to Run Manual Cleanup
144 KB
Loading
256 KB
Loading
789 KB
Loading
96.9 KB
Loading
254 KB
Loading
100 KB
Loading

0 commit comments

Comments
 (0)