Skip to content

Commit

Permalink
Add regional dr environment without a hub
Browse files Browse the repository at this point in the history
For testing kube object projection and recipes in an environment without
a hub. This is not really supported but we know about some users using
this topology, and having a test environment makes it easier to support
them and make sure we don't break them by mistake.

This environment is very similar to regional-dr.yaml, with these
changes:

- The hub cluster was removed
- ocm components were removed, since there is no hub
- submariner is deployed at the end instead of of running on the hub at
  the start of the deployment.

Because we run submariner at the end, and it takes about 140 seconds to
deploy and run the self test, starting this environment is slower than
the full regional-dr environment.

An alternative is to remove submariner and volsync from this
environment, and disable volsync in ramen config when a hub is not
available.

Example run:

    $ drenv start envs/regional-dr-hubless.yaml
    2023-07-10 00:24:52,538 INFO    [rdr-hubless] Starting environment
    2023-07-10 00:24:52,583 INFO    [dr1] Starting minikube cluster
    2023-07-10 00:24:53,617 INFO    [dr2] Starting minikube cluster
    2023-07-10 00:27:17,476 INFO    [dr1] Cluster started in 145.15 seconds
    2023-07-10 00:27:17,477 INFO    [dr1/0] Running addons/cert-manager/start
    2023-07-10 00:27:17,477 INFO    [dr1/1] Running addons/csi-addons/start
    2023-07-10 00:27:21,254 INFO    [dr2] Cluster started in 147.89 seconds
    2023-07-10 00:27:21,255 INFO    [dr2/0] Running addons/cert-manager/start
    2023-07-10 00:27:21,255 INFO    [dr2/1] Running addons/csi-addons/start
    2023-07-10 00:27:40,867 INFO    [dr1/0] addons/cert-manager/start completed in 23.39 seconds
    2023-07-10 00:27:40,867 INFO    [dr1/0] Running addons/rook-operator/start
    2023-07-10 00:27:44,417 INFO    [dr2/0] addons/cert-manager/start completed in 23.16 seconds
    2023-07-10 00:27:44,417 INFO    [dr2/0] Running addons/rook-operator/start
    2023-07-10 00:27:50,084 INFO    [dr1/1] addons/csi-addons/start completed in 32.61 seconds
    2023-07-10 00:27:50,084 INFO    [dr1/1] Running addons/olm/start
    2023-07-10 00:27:53,573 INFO    [dr2/1] addons/csi-addons/start completed in 32.32 seconds
    2023-07-10 00:27:53,573 INFO    [dr2/1] Running addons/olm/start
    2023-07-10 00:28:11,292 INFO    [dr1/0] addons/rook-operator/start completed in 30.42 seconds
    2023-07-10 00:28:11,292 INFO    [dr1/0] Running addons/rook-cluster/start
    2023-07-10 00:28:16,015 INFO    [dr2/0] addons/rook-operator/start completed in 31.60 seconds
    2023-07-10 00:28:16,016 INFO    [dr2/0] Running addons/rook-cluster/start
    2023-07-10 00:29:17,888 INFO    [dr1/1] addons/olm/start completed in 87.80 seconds
    2023-07-10 00:29:17,888 INFO    [dr1/1] Running addons/minio/start
    2023-07-10 00:29:21,088 INFO    [dr2/1] addons/olm/start completed in 87.51 seconds
    2023-07-10 00:29:21,088 INFO    [dr2/1] Running addons/minio/start
    2023-07-10 00:30:13,180 INFO    [dr2/0] addons/rook-cluster/start completed in 117.16 seconds
    2023-07-10 00:30:13,181 INFO    [dr2/0] Running addons/rook-pool/start
    2023-07-10 00:30:14,771 INFO    [dr1/1] addons/minio/start completed in 56.88 seconds
    2023-07-10 00:30:14,771 INFO    [dr1/1] Running addons/velero/start
    2023-07-10 00:30:31,209 INFO    [dr1/0] addons/rook-cluster/start completed in 139.92 seconds
    2023-07-10 00:30:31,209 INFO    [dr1/0] Running addons/rook-pool/start
    2023-07-10 00:30:42,475 INFO    [dr2/0] addons/rook-pool/start completed in 29.29 seconds
    2023-07-10 00:30:42,475 INFO    [dr2/0] Running addons/rook-toolbox/start
    2023-07-10 00:30:49,389 INFO    [dr1/1] addons/velero/start completed in 34.62 seconds
    2023-07-10 00:30:49,389 INFO    [dr1/1] Running addons/velero/test
    2023-07-10 00:30:59,842 INFO    [dr2/1] addons/minio/start completed in 98.75 seconds
    2023-07-10 00:30:59,843 INFO    [dr2/1] Running addons/velero/start
    2023-07-10 00:31:00,068 INFO    [dr1/0] addons/rook-pool/start completed in 28.86 seconds
    2023-07-10 00:31:00,068 INFO    [dr1/0] Running addons/rook-toolbox/start
    2023-07-10 00:31:03,056 INFO    [dr1/0] addons/rook-toolbox/start completed in 2.99 seconds
    2023-07-10 00:31:04,891 INFO    [dr2/0] addons/rook-toolbox/start completed in 22.42 seconds
    2023-07-10 00:31:24,670 INFO    [dr1/1] addons/velero/test completed in 35.28 seconds
    2023-07-10 00:31:32,393 INFO    [dr2/1] addons/velero/start completed in 32.55 seconds
    2023-07-10 00:31:32,393 INFO    [dr2/1] Running addons/velero/test
    2023-07-10 00:32:07,067 INFO    [dr2/1] addons/velero/test completed in 34.67 seconds
    2023-07-10 00:32:07,067 INFO    [rdr-hubless/0] Running addons/rbd-mirror/start
    2023-07-10 00:32:07,068 INFO    [rdr-hubless/1] Running addons/submariner/start
    2023-07-10 00:33:03,816 INFO    [rdr-hubless/0] addons/rbd-mirror/start completed in 56.75 seconds
    2023-07-10 00:33:03,816 INFO    [rdr-hubless/0] Running addons/rbd-mirror/test
    2023-07-10 00:33:20,852 INFO    [rdr-hubless/0] addons/rbd-mirror/test completed in 17.04 seconds
    2023-07-10 00:33:33,223 INFO    [rdr-hubless/1] addons/submariner/start completed in 86.16 seconds
    2023-07-10 00:33:33,223 INFO    [rdr-hubless/1] Running addons/submariner/test
    2023-07-10 00:34:28,427 INFO    [rdr-hubless/1] addons/submariner/test completed in 55.20 seconds
    2023-07-10 00:34:28,427 INFO    [rdr-hubless/1] Running addons/volsync/start
    2023-07-10 00:35:01,109 INFO    [rdr-hubless/1] addons/volsync/start completed in 32.68 seconds
    2023-07-10 00:35:01,109 INFO    [rdr-hubless/1] Running addons/volsync/test
    2023-07-10 00:36:40,248 INFO    [rdr-hubless/1] addons/volsync/test completed in 99.14 seconds
    2023-07-10 00:36:40,249 INFO    [rdr-hubless] Environment started in 707.96 seconds

Part-of: #902
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
  • Loading branch information
nirs committed Jul 26, 2023
1 parent f42c1a8 commit fbc13da
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,9 @@ The environments files are located in the `envs` directory.
- `regional-dr.yaml` - for testing regional DR using a hub cluster and 2
managed clusters with Ceph storage.

- `regional-dr-hubless.yaml` - for testing regional DR using a setup
without a hub.

- `regional-dr-external.yaml.example` - A starting point for creating
environment for testing regional DR using with external storage.

Expand Down
51 changes: 51 additions & 0 deletions test/envs/regional-dr-hubless.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0

# Enviroment for testing Regional-DR in a setup without a hub.
---
name: "rdr-hubless"

ramen:
hub: null
clusters: [dr1, dr2]
topology: regional-dr

templates:
- name: "dr-cluster"
driver: kvm2
container_runtime: containerd
network: default
memory: "6g"
extra_disks: 1
disk_size: "50g"
addons:
- volumesnapshots
- csi-hostpath-driver
workers:
- addons:
- name: cert-manager
- name: rook-operator
- name: rook-cluster
- name: rook-pool
- name: rook-toolbox
- addons:
- name: csi-addons
- name: olm
- name: minio
- name: velero

profiles:
- name: "dr1"
template: "dr-cluster"
- name: "dr2"
template: "dr-cluster"

workers:
- addons:
- name: rbd-mirror
args: ["dr1", "dr2"]
- addons:
- name: submariner
args: ["dr1", "dr1", "dr2"]
- name: volsync
args: ["dr1", "dr2"]

0 comments on commit fbc13da

Please sign in to comment.