Skip to content

Commit

Permalink
Rename ramenctl to ramendev for future debugging tool
Browse files Browse the repository at this point in the history
Signed-off-by: Oded Viner <[email protected]>
  • Loading branch information
OdedViner authored and nirs committed Feb 19, 2025
1 parent a7ca2eb commit 1d9c318
Show file tree
Hide file tree
Showing 24 changed files with 47 additions and 47 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Deploy ramen
run: |
source venv
ramenctl deploy test/envs/regional-dr.yaml
ramendev deploy test/envs/regional-dr.yaml
- name: Configure ramen
uses: nick-fields/retry@v3
Expand All @@ -73,7 +73,7 @@ jobs:
max_attempts: 3
command: |
source venv
ramenctl config test/envs/regional-dr.yaml
ramendev config test/envs/regional-dr.yaml
- name: Run e2e tests
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ jobs:
run: make coverage
working-directory: test

ramenctl:
name: ramenctl
ramendev:
name: ramendev
strategy:
matrix:
os:
Expand Down Expand Up @@ -179,12 +179,12 @@ jobs:

- name: Run flake8
run: make flake8
working-directory: ramenctl
working-directory: ramendev

- name: Run pylint
run: make pylint
working-directory: ramenctl
working-directory: ramendev

- name: Run black
run: make black
working-directory: ramenctl
working-directory: ramendev
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test/addons/kubevirt/vm/id_rsa.pub
*.egg-info/
__pycache__/
test/build
ramenctl/build
ramendev/build

# Generated disk images
*.qcow2
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ test-cephfs-cg: generate manifests envtest ## Run util-pvc tests.
test-drenv: ## Run drenv tests.
$(MAKE) -C test

test-ramenctl: ## Run ramenctl tests.
$(MAKE) -C ramenctl
test-ramendev: ## Run ramendev tests.
$(MAKE) -C ramendev

e2e-rdr: generate manifests ## Run rdr-e2e tests.
cd e2e && ./run.sh
Expand Down
18 changes: 9 additions & 9 deletions docs/devel-quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,24 +101,24 @@ This builds the image `quay.io/ramendr/ramen-operator:latest`
## Deploying the ramen operator

You can either deploy the *Ramen* operator using the make targets or use the
`ramenctl` tool. For more info on the `ramenctl` tool see
[ramenctl/README.md](../ramenctl/README.md).
`ramendev` tool. For more info on the `ramendev` tool see
[ramendev/README.md](../ramendev/README.md).

- Using `ramenctl`
- Using `ramendev`

Ensure python virtual environment is active as `ramenctl` is a python tool.
Ensure python virtual environment is active as `ramendev` is a python tool.

- Deploy the *Ramen* operator in the environment using `ramenctl`.
- Deploy the *Ramen* operator in the environment using `ramendev`.

```sh
ramenctl deploy test/envs/regional-dr.yaml
ramendev deploy test/envs/regional-dr.yaml
```

- Ramen needs to be configured to know about the managed clusters and the s3
endpoints. Configure the ramen operator for environment.

```sh
ramenctl config test/envs/regional-dr.yaml
ramendev config test/envs/regional-dr.yaml
```

## Testing Ramen
Expand All @@ -131,6 +131,6 @@ If you want to clean up your environment, you can unconfigure *Ramen* and
undeploy it.

```sh
ramenctl unconfig test/envs/regional-dr.yaml
ramenctl undeploy test/envs/regional-dr.yaml
ramendev unconfig test/envs/regional-dr.yaml
ramendev undeploy test/envs/regional-dr.yaml
```
8 changes: 4 additions & 4 deletions docs/user-quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,17 +356,17 @@ This builds the image `quay.io/ramendr/ramen-operator:latest`
To deploy the *Ramen* operator in the test environment:

```
ramenctl deploy test/envs/regional-dr.yaml
ramendev deploy test/envs/regional-dr.yaml
```

For more info on the `ramenctl` tool see
[ramenctl/README.md](../ramenctl/README.md).
For more info on the `ramendev` tool see
[ramendev/README.md](../ramendev/README.md).

Ramen now needs to be configured to know about the managed clusters and the
s3 endpoints. To configure the ramen operator for test environment:

```
ramenctl config test/envs/regional-dr.yaml
ramendev config test/envs/regional-dr.yaml
```

## Running system tests
Expand Down
4 changes: 2 additions & 2 deletions hack/make-venv
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ $venv/bin/pip install --upgrade pip
echo "Installing drenv..."
$venv/bin/pip install -e test

echo "Installing ramenctl..."
$venv/bin/pip install -e ./ramenctl
echo "Installing ramendev..."
$venv/bin/pip install -e ./ramendev

echo "Installing development tools"
$venv/bin/pip install -r requirements.txt
Expand Down
1 change: 0 additions & 1 deletion ramenctl/MANIFEST.in

This file was deleted.

1 change: 1 addition & 0 deletions ramendev/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-include ramendev/resources *
2 changes: 1 addition & 1 deletion ramenctl/Makefile → ramendev/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

sources := $(wildcard \
ramenctl \
ramendev \
*.py \
)

Expand Down
24 changes: 12 additions & 12 deletions ramenctl/README.md → ramendev/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# The ramenctl tool
# The ramendev tool

The `ramenctl` tool deploys and configures *ramen* on your development
The `ramendev` tool deploys and configures *ramen* on your development
clusters.

## Installing

The ramenctl tool is installed when creating the python virtual
The ramendev tool is installed when creating the python virtual
environment.

To update existing virtual environment run this in the root directory:
Expand All @@ -20,7 +20,7 @@ Deploy *ramen* from source using `quay.io/ramendr/ramen-operator:latest`
on the hub and managed clusters specified in FILENAME.

```
ramenctl deploy FILENAME
ramendev deploy FILENAME
```

## Configure ramen hub operator
Expand All @@ -29,34 +29,34 @@ After deploying *ramen* we need to configure it for the environment. The
configuration depends on the topology specified in the environment file.

```
ramenctl config FILENAME
ramendev config FILENAME
```

## Unconfigure ramen hub operator

Before undeploying *ramen* unconfigure it so undo the changes made by
`ramenctl config`.
`ramendev config`.

```
ramenctl unconfig FILENAME
ramendev unconfig FILENAME
```

## Undeploying ramen on the hub and managed clusters

Delete resources deployed by `ramenctl deploy` on the hub and managed
Delete resources deployed by `ramendev deploy` on the hub and managed
clusters.

```
ramenctl undeploy FILENAME
ramendev undeploy FILENAME
```

## Using isolated environments

If we started a `drenv` environment using `--name-prefix` we must use
the same argument when using `ramenctl`:
the same argument when using `ramendev`:

```
drenv start --name-prefix test- envs/regional-dr.yaml
ramenctl deploy --name-prefix test- envs/regional-dr.yaml
ramenctl config --name-prefix test- envs/regional-dr.yaml
ramendev deploy --name-prefix test- envs/regional-dr.yaml
ramendev config --name-prefix test- envs/regional-dr.yaml
```
Empty file added ramendev/__init__.py
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
unconfig,
]

log = logging.getLogger("ramenctl")
log = logging.getLogger("ramendev")


def main():
parser = argparse.ArgumentParser(
prog="ramenctl",
prog="ramendev",
description="Control ramen clusters",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
RAMEN_NAMESPACE = "ramen-system"
SOURCE_DIR = "."

log = logging.getLogger("ramenctl")
log = logging.getLogger("ramendev")


def resource(name):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def run(args):

def load_image(args):
command.info("Loading image '%s'", args.image)
with tempfile.TemporaryDirectory(prefix="ramenctl-deploy-") as tmpdir:
with tempfile.TemporaryDirectory(prefix="ramendev-deploy-") as tmpdir:
tar = os.path.join(tmpdir, "image.tar")
command.watch("podman", "save", args.image, "-o", tar)
cmd = ["drenv", "load", f"--image={tar}"]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions ramenctl/setup.py → ramendev/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
long_description = f.read()

setuptools.setup(
name="ramenctl",
name="ramendev",
version="0.1.0",
author="Nir Soffer",
author_email="[email protected]",
description="Tool for developing ramen",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/RamenDR/ramen/ramenctl",
packages=["ramenctl", "ramenctl.resources"],
url="https://github.com/RamenDR/ramen/ramendev",
packages=["ramendev", "ramendev.resources"],
include_package_data=True,
install_requires=[
"PyYAML",
Expand All @@ -33,6 +33,6 @@
"Topic :: Software Development :: Testing",
],
entry_points={
"console_scripts": ["ramenctl=ramenctl.__main__:main"],
"console_scripts": ["ramendev=ramendev.__main__:main"],
},
)

0 comments on commit 1d9c318

Please sign in to comment.