Skip to content

RamenDR/ramenctl

Repository files navigation

ramenctl

Command line tool and Go module for managing and troubleshooting Ramen.

Overview

Working with a complicated Kubernetes cluster is not easy. In a typical disaster recovery environment we have at least 3 connected Kubernetes clusters with many components. The ramenctl project aims to make it easier to manage and troubleshoot this challenging environment.

Features

The project provides:

  • The ramenctl command line tool, managing and troubleshooting ramen.
  • The ramenctl Go module for integrating the ramenctl commands in other projects. This module is used to implement the odf dr command.

Installing

Download the ramenctl executable for your operating system and architecture and install in the PATH.

To install the latest release on Linux and macOS, run:

tag="$(curl -fsSL https://api.github.com/repos/ramendr/ramenctl/releases/latest | jq -r .tag_name)"
os="$(uname | tr '[:upper:]' '[:lower:]')"
machine="$(uname -m)"
if [ "$machine" = "aarch64" ]; then machine="arm64"; fi
if [ "$machine" = "x86_64" ]; then machine="amd64"; fi
curl --location --fail --silent --show-error --output ramenctl \
    https://github.com/ramendr/ramenctl/releases/download/$tag/ramenctl-$tag-$os-$machine
sudo install ramenctl /usr/local/bin/
rm ramenctl

Examples

Create a configuration file for Regional DR test environment:

$ ramenctl init --envfile ramen/test/envs/regional-dr.yaml

Run disaster recovery tests:

$ ramenctl test run -o rdr-test
⭐ Using report "rdr-test"
⭐ Using config "config.yaml"

🔎 Validate config ...
   ✅ Config validated

🔎 Setup environment ...
   ✅ Environment setup

🔎 Run tests ...
   ✅ Application "appset-deploy-rbd" deployed
   ✅ Application "appset-deploy-rbd" protected
   ✅ Application "appset-deploy-rbd" failed over
   ✅ Application "appset-deploy-rbd" relocated
   ✅ Application "appset-deploy-rbd" unprotected
   ✅ Application "appset-deploy-rbd" undeployed

✅ passed (1 passed, 0 failed, 0 skipped)

Your system is ready for disaster recovery!

Please see Documentation to learn more.

Documentation

Visit the docs below to learn about ramenctl commands:

Contributing

  • For reporting bugs, suggesting improvements, or requesting new features, please open an issue.
  • For implementing features or fixing bugs, please see the ramenctl contribution guide

License

ramenctl is under the Apache 2.0 license.