Build Ceph Cluster with ceph-ansible

What is Ceph?

Ceph is opensource software defined storage platform. Ceph provides reliable and clustered storage solution. It is highly scalable to exabytelevel, operates without single point of failure and it is free. It also provides combined interface for block, object and file-level storage.

Ceph-ansible

There are different ways to build a ceph cluster, ceph-ansible is one of them. Ceph is installed on machines using ansible. With ceph-ansible there is one node called the “admin node” which uses Ansible to provision the other nodes, both monitors, and osds. To install ceph with ansible, we required password-less connection between admin node and other nodes. To do so generate the ssh keys on admin node and distribute them to other nodes.

$ssh-keygen 
$ssh-copy-id <hostname of other nodes>
  • stable-3.0 Supports Ceph versions jewel and luminous. This branch requires Ansible version 2.4.
  • stable-3.1 Supports Ceph versions luminous and mimic. This branch requires Ansible version 2.4.
  • stable-3.2 Supports Ceph versions luminous and mimic. This branch requires Ansible version 2.6.
  • stable-4.0 Supports Ceph version nautilus. This branch requires Ansible version 2.8.
  • stable-5.0 Supports Ceph version octopus. This branch requires Ansible version 2.9.
  • master Supports the master branch of Ceph. This branch requires Ansible version 2.9.
$git clone https://github.com/ceph/ceph-ansible.git 
$cd ceph-ansible
$git checkout stable-4.0
[mons] 
admin
node1
[osds]
admin
node1
node2
[mgrs]
node1
$cp site.yml.sample site.yml 
$cp group_vars/all.yml.sample group_vars/all.yml
ceph_origin: repository 
ceph_repository: community
ceph_stable_release: nautilus
public_network: "192.168.0.0/16"
cluster_network: "192.168.0.0/16"
monitor_interface: eth1
devices:
- '/dev/sda'
- '/dev/sdb'

OSD Configuration

OSD configuration was used to be set by selecting an OSD scenario and providing the configuration needed for that scenario. As of nautilus in stable-4.0, the only scenarios available is lvm. If you preferred stable branch prior to 4.0 then collocated and non-collocated scenarios are available. But these are deprecated.

$ansible-playbook site.yml