forked from RamenDR/ramen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change the way we to deploy to match how we deploy in OpenShift: deploy the channel and the subscription, and then assign drpolicy. With this change we test now enable and disable DR. The basic test test only disable DR after relocate. We will add more tests later to cover more scenarios. There are 2 new trivial scripts for enabling and disabling DR, that can be used to test various flows manually like: env=$PWD/test/envs/regional-dr.yaml cd test/basic-test ./deploy $env ./enable-dr $env ./failover $env ./disable-dr $env ./enable-dr $env ./relocate $env Deploying and undeploying is much simpler now, using the kustomization from the samples repo directly. Deploying the drpc was simplified to use a yaml template instead of kustomization template. Because we don't have any rule in the sample placementrule, we don't control now the deployment cluster, and the --cluster argument was removed. This change should be merged together with this ocm-ramen-samrples PR: RamenDR/ocm-ramen-samples#35 Signed-off-by: Nir Soffer <nsoffer@redhat.com>
- Loading branch information
Showing
5 changed files
with
130 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# SPDX-FileCopyrightText: The RamenDR authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
from drenv import test | ||
|
||
test.start("disable-dr", __file__) | ||
args = test.parse_args() | ||
|
||
test.info("Disable DR") | ||
test.disable_dr() | ||
test.info("DR was disabled") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# SPDX-FileCopyrightText: The RamenDR authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
from drenv import test | ||
|
||
test.start("enable-dr", __file__) | ||
args = test.parse_args() | ||
|
||
test.info("Enable DR") | ||
test.enable_dr() | ||
test.wait_for_drpc_status() | ||
test.wait_until_drpc_is_stable() | ||
test.info("DR enabled") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters