Deploying Red Hat Ceph Storage 1.3 as a Container Image (Technology Preview)

Updated

You can deploy Red Hat Ceph Storage 1.3.2 and later as a container image. This article describes how to do that for Red Hat Ceph Storage 1.3. See Deploying Red Hat Ceph Storage 2 as a Container Image (Technology Preview) for details on deploying Red Hat Ceph Storage 2.

IMPORTANT

Deploying Red Hat Ceph Storage 1.3 as a Container Image

Use the Ansible application with the ceph-ansible playbook to deploy Red Hat Ceph Storage 2 as a Container Image.

NOTE

  • A Ceph cluster used in production usually consists of ten or more nodes. To deploy Red Hat Ceph Storage as a container image, Red Hat recommends to use a Ceph cluster that consists of at least three OSD and three monitor nodes.
  1. Clone the ceph-ansible repository:
   $ git clone https://github.com/ceph/ceph-ansible 
  1. Install Ansible. Either see the Content from docs.ansible.com is not included.Ansible Installation web page for details or use the install-ansible.sh script provided by the ceph-ansible repository.

  2. Change to the newly cloned repository:

   $ cd ceph-ansible
  1. Create a new copy of the site.yml.sample named site.yml:
   $ cp site.yml.sample site.yml                
  1. Create a new copy of the group_vars/all.docker.sample file named group_vars/all:
   $ cp group_vars/all.docker.sample group_vars/all
  1. Edit the group_vars/all file. Uncomment or add the following variables and set their appropriate values as follows:
   ceph_mon_docker_username: registry.access.redhat.com/rhceph
   ceph_mon_docker_imagename: rhceph-1.3-rhel7
   ceph_osd_docker_username: registry.access.redhat.com/rhceph
   ceph_osd_docker_imagename: rhceph-1.3-rhel7
   mon_containerized_deployment: 'true'
   osd_containerized_deployment: 'true'
   ceph_mon_docker_interface: [interface]
   ceph_mon_docker_subnet: [subnet]
   ceph_osd_docker_extra_env: "CEPH_DAEMON=OSD_CEPH_DISK,OSD_JOURNAL_SIZE=100"
   ceph_osd_docker_devices: "[ '/dev/sdb', '/dev/sdc' ]"
Replace `[interface]` with the interface that the monitor node listens to and `[subnet]` with the network to which the monitor node belongs to.

The `ceph_osd_docker_devices` option specifies which block devices will be used on the OSD nodes.

For additional details, see the `all.sample` file. 
  1. Edit the Ansible inventory file located by default at /etc/ansible/hosts. Add the monitor and OSD nodes, for example:
	[mons]
	ceph-monitor01
	ceph-monitor02
	ceph-monitor03

	[osds]
	ceph-osd01
	ceph-osd02
	ceph-osd03
  1. Run the ceph-ansible playbook by executing the following command:
   $ ansible-playbook --skip-tags=with_pkg site.yml

Upgrading to a Newer Version

For details on upgrading to a newer version of the Ceph container image, see Upgrading Red Hat Ceph Storage deployed as a Container Image.

Additional Information

Category
Article Type