This repository is a consumer test harness for the upstream validated pattern validatedpatterns/ramendr-starter-kit.
It contains:
- Deployment automation (
scripts/redeploy.sh) that pins upstream tov1.1, applies the local customization overlays, and executes the same deployment flow currently used in theredeploy.shfrom the forked starter-kit. - Override values under
overrides/that are copied on top of the upstreamoverrides/directory before installing the pattern. - (Planned) UI tests using Playwright + Python (to be added later).
- RamenDR data validation — continuous timestamp writer + post-failover log checks (
dr-validation/README.md).
scripts/redeploy.sh will:
- Clone upstream
validatedpatterns/ramendr-starter-kitand check out refv1.1(branch in upstream) - Copy this repo's
overrides/*.yamlinto the cloned upstreamoverrides/, applyupstream-overrides/values-hub.patchon top of upstreamvalues-hub.yaml, and patch upstreampattern.shto runpodmanwithout a TTY (required for CI — upstream usespodman run -itwhich fails when stdin/stdout are not a terminal) - Provision hub + two spokes on AWS (BYOC spokes)
- Run the upstream pattern installation (ArgoCD/GitOps driven) via upstream
pattern.sh
The deployment script expects tools similar to the original flow:
ocopenshift-installawspodman— must be running when the pattern deploy starts (pattern.shuses a utility container). On macOS, start the VM before a long redeploy or rely onredeploy.shto auto-start it:podman machine startgitpython3
You will also need AWS credentials configured for the AWS account used for cluster installs and Route53 operations (the script uses the AWS CLI).
The redeploy flow requires three openshift-install directories containing install-config.yaml.bak:
~/git/hub-cluster-install/install-config.yaml.bak~/git/ocp-primary-install/install-config.yaml.bak~/git/ocp-secondary-install/install-config.yaml.bak
This repo provides examples with placeholders only under install-config-examples/.
Copy them into your install dirs and replace placeholders:
cp install-config-examples/hub/install-config.yaml.bak.example ~/git/hub-cluster-install/install-config.yaml.bak
cp install-config-examples/ocp-primary/install-config.yaml.bak.example ~/git/ocp-primary-install/install-config.yaml.bak
cp install-config-examples/ocp-secondary/install-config.yaml.bak.example ~/git/ocp-secondary-install/install-config.yaml.bakDo not commit real pullSecret or sshKey values.
Do not commit secrets to this repository.
- Provide
VALUES_SECRET(default:~/values-secret.yaml) locally/through CI secret injection. - Keep kubeconfigs and install dirs out of git (see
.gitignore). - Use the upstream template as a reference: values-secret.yaml.template
- For regional-dr cluster private-key ExternalSecrets, ensure
~/values-secret.yamlincludes hubprivatekeypaths (compare with your team's file via private DM), for example:
- name: privatekey
fields:
- name: ssh-privatekey
path: ~/.ssh/id_ed25519
- name: ssh-publickey
path: ~/.ssh/id_ed25519.pubUpstream v1.1 ships a stock values-hub.yaml. Your fork changes that file (for example ODF subscription channels stable-4.21, and including /overrides/values-aws-cost-optimized.yaml in the regional-dr app's extraValueFiles).
This repo reproduces that without forking upstream:
upstream-overrides/values-hub.patch— applied withgit applyto the upstream checkout's rootvalues-hub.yamlduringprepare_upstream(if the patch no longer applies after an upstream bump, regenerate it from a clean checkout as described inscripts/redeploy.sherror messages).overrides/values-cluster-names.yaml—byoc: trueand spoke metadata (same role as your fork's overrides for BYOC).
Replace placeholders in overrides/values-cluster-names.yaml under costManagement: (<OWNER_TAG>, etc.) with real tag values for your account policy.
Two environment variables are required and have no default values:
| Variable | Description |
|---|---|
BASE_DOMAIN |
Base DNS domain for the clusters (must be delegated to Route53 in your account) |
HOSTED_ZONE_ID |
Route53 hosted zone ID for that domain |
Export them before running the script:
export BASE_DOMAIN=your-domain.example.com
export HOSTED_ZONE_ID=Z0123456789ABCDEFGHIJThen from the repo root:
./scripts/redeploy.sh --helpRun either a full redeploy or pattern-only on an existing hub, depending on your workflow.
Local overlays live under overrides/ and are copied into the upstream checkout before install.
This keeps your changes reviewable and avoids long-lived forks of upstream.
This repo uses pre-commit to enforce linting and formatting on every commit (Python via ruff, shell via shellcheck, YAML via yamllint, plus general hygiene hooks).
pip install pre-commitOr, using the repo's virtual environment:
python3 -m venv .venv
source .venv/bin/activate
pip install pre-commitRun once after cloning to install the git hook:
pre-commit installAfter this, hooks run automatically on every git commit.
pre-commit run --all-filesIf a hook reformats files, stage the changes and commit again.
The same checks run automatically on every pull request via .github/workflows/pre-commit.yaml.
PRs that fail the checks cannot be merged.
A full ./scripts/redeploy.sh run ends with timestamp writers running on all edge VMs (one
record every 10 seconds) and a rolling baseline snapshot refreshed every 5 minutes (only the
latest snapshot is kept as the pre-failover baseline). After failover/relocate and the UI cleanup step, run:
./scripts/dr-validation/post-dr-automation.shThat single command runs cleanup (with safety guards), waits for healthy VMs, and validates data — no other manual steps.
Defaults enforce a 15-minute standard: DR_VALIDATION_MAX_RPO_SECONDS=900 and
RAMENDR_SANITY_MAX_RTO_SECONDS=900 (override via env vars if your target changes).
See docs/QA-DR-data-validation.md for the Jira-ready procedure.
Set SKIP_DR_VALIDATION=1 to skip writers and snapshots, or REQUIRE_DR_VALIDATION=1 to fail redeploy if writers are not recording.
If pattern deploy finished but timestamp bootstrap was skipped (e.g. interrupted redeploy), recover with:
export KUBECONFIG=~/git/hub-cluster-install/auth/kubeconfig
./scripts/redeploy.sh --dr-bootstrap-only
# or: ./scripts/dr-validation/bootstrap.sh && ./scripts/dr-validation/status.shSee dr-validation/README.md for the full workflow.