Skip to main content

Use Rookify: Migrate to Rook from Ceph Ansible (Technical Preview)

warning

Rookify is developed to migrate from Ceph-Ansible to Rook in place and without downtime. Nevertheless, it is strongly advised to test Rookify in a controlled environment first, such as the OSISM testbed. Additionally ensure that precautionary backups are made and all other necessary safety measures are in place.

For a condensed summary of the information covered here, refer to the Rookify GitHub repository.

Consider Using a Pickle File

To track the migration, you can add a pickle file. Specify this option in the config.yaml:

config.example.yaml
general:
machine_pickle_file: data.pickle

You can then view the migration progress by running rookify --show-states.

warning

Rookify treats the pickle file as a source of truth for its operations. If you want to start a clean migration, ensure you delete the file first.

Rookify CLI

Run

note

By default, Rookify runs in preflight mode (--dry-run).

Rookify runs in preflight mode by default, meaning it performs all preflight checks on the modules and their dependent modules, as configured in config.yaml, without executing the migration.

--dry-run

tip

Run preflight-mode to ensure Rookify can connect to your target systems.

Rookify's preflight-mode allows you to verify that basic commands and connections to the target systems are functioning correctly. Running --dry-run or -d mode ensures no migration processes are executed.

--migrate

tip

Ensure that you use the correct data.pickle file. If you used the pickle file for other setups previously, be sure to delete it.

Rookify's execution-mode allows you to run the migration. This is a point of no (easy) return. Be sure to check all your configurations. Run --migrate or -m to execute the migration process.

--help

Run rookify --help to view the various CLI options available.

--show-states

Run --show-states or -s to display the status of your migration process. Note that if you specified a pickle file, Rookify will use it to determine the state of migration.

Debugging and Testing

If you encounter issues with Rookify, you can start by setting the logging level to DEBUG. If further troubleshooting is needed, you can run the tests included in the Rookify code.

Set logging to debug level

Edit the config.yaml and set the logging level to "DEBUG":

config.example.yaml
logging:
level: DEBUG
format:
time: "%Y-%m-%d %H:%M.%S" # other example: "iso"
renderer: console # or: json

You can also customize other formatting options, as shown in the comments. For more details, refer to the structlog.

Run tests

To run tests on Rookify, ensure you have access to the Rookify code on your system. Then:

  1. Run make run-tests-locally from the working directory of the Rookify repository. If you prefer a containerized setup, use make run-tests.
  2. Alternatively, run .venv/bin/python -m pytest from the virtual environment of your installation.