Chapter 5. Migrating a non-containerized Red Hat Ceph Storage cluster to a containerized environment
To manually migrate a non-containerized, bare-metal, Red Hat Ceph Storage cluster to a containerized environment, use the ceph-ansible switch-from-non-containerized-to-containerized-ceph-daemons.yml
playbook.
If the storage cluster has an RBD mirror daemon not deployed by ceph-ansible
, you need to migrate the daemons prior to converting to a containerized cluster. For more details, see Migrating RBD mirroring daemons.
Prerequisites
- A running Red Hat Ceph Storage non-containerized, bare-metal, cluster.
- Access to the Ansible administration node.
- An ansible user account.
- Sudo access to the ansible user account.
Procedure
Edit the
group_vars/all.yml
file to include configuration for containers:Copy to Clipboard Copied! Toggle word wrap Toggle overflow ceph_docker_image_tag: "latest" ceph_docker_image: rhceph/rhceph-4-rhel8 containerized_deployment: true ceph_docker_registry: registry.redhat.io
ceph_docker_image_tag: "latest" ceph_docker_image: rhceph/rhceph-4-rhel8 containerized_deployment: true ceph_docker_registry: registry.redhat.io
ImportantFor the
ceph_docker_image_tag
, uselatest
if your current storage cluster is on latest version or use the appropriate image tag. See the What are the Red Hat Ceph Storage releases and corresponding Ceph package versions? for more information.Navigate to the
/usr/share/ceph-ansible
directory:Copy to Clipboard Copied! Toggle word wrap Toggle overflow cd /usr/share/ceph-ansible
[ansible@admin ~]$ cd /usr/share/ceph-ansible
On the Ansible administration node, run the Ansible migration playbook:
Syntax
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ansible-playbook ./infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml -i INVENTORY_FILE
ansible-playbook ./infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml -i INVENTORY_FILE
Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ansible-playbook ./infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml -i hosts
[ansible@admin ceph-ansible]$ ansible-playbook ./infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml -i hosts
Verify the cluster is switched to containerized environment.
On the monitor node, list all running containers:
Red Hat Enterprise Linux 7
Copy to Clipboard Copied! Toggle word wrap Toggle overflow sudo docker ps
[root@mon ~]$ sudo docker ps
Red Hat Enterprise Linux 8
Copy to Clipboard Copied! Toggle word wrap Toggle overflow sudo podman ps
[root@mon ~]$ sudo podman ps
Additional Resources
- See the Installing a Red Hat Ceph Storage cluster chapter in the Red Hat Ceph Storage Installation Guide for information on installation of a bare-metal storage cluster.
-
See the Creating an Ansible user with sudo access section in the Red Hat Ceph Storage Installation Guide for providing
sudo
access to the ansible user. - See the Configuring two-way mirroring using the command-line interface section in the Red Hat Ceph Storage Block Device Guide for more details.