Skip to content
Leseb edited this page Feb 29, 2016 · 12 revisions

Welcome to the ceph-ansible wiki!

Deploy without Vagrant

First clone the repo:

$ git clone https://github.com/ceph/ceph-ansible/

Then install Ansible by using the install-ansible.sh script. Now setup your Ansible inventory file, usually an example exists in /etc/ansible/hosts.

You can use it or produce a new one like this, this file assumes that you can resolve each hostname:

[mons]
ceph-monitor01
ceph-monitor02
ceph-monitor03

[osds]
ceph-osd01
ceph-osd02
ceph-osd03
...
...

[mdss]
ceph-mds01

[rgws]
ceph-rgw01

Now make sure that you can ssh passwordless to every node, by copying your SSH key on all the server where Ceph will be deployed:

$ ansible all -m ping
192.168.0.1 | success >> {
    "changed": false,
    "ping": "pong"
}

192.168.0.2 | success >> {
    "changed": false,
    "ping": "pong"
}

192.168.0.3 | success >> {
    "changed": false,
    "ping": "pong"
}

192.168.0.4 | success >> {
    "changed": false,
    "ping": "pong"
}

All the pings must succeed, if not check your /etc/ansible/ansible.cfg and make sure that the proper user and key are used.

Now enable the site.yml and group_vars files:

$ cp site.yml.sample site.yml
$ cp group_vars/all.sample group_vars/all
$ cp group_vars/mons.sample group_vars/mons
$ cp group_vars/osds.sample group_vars/osds
...
...

You're all set and almost ready to deploy :).

Common

Now a couple of critical variables must be applied in order to successfully deploy your cluster.

Go to group_vars/all and edit the following:

  • ceph_origin: Where to get Ceph packages from. Two values are recognized:
    • "upstream": Get the packages from some upstream or third-party source. Options for that are listed below.
    • "distro": Get the packages from the distro itself, without adding any additional repos. Note that RHEL/CentOS do not include Ceph packages, but ceph_origin: distro can be used on those distros to simply install the Ceph packages without adding a repository, under the assumption that the administrator has added packages to the repos already existing on the box.
  • If you selected ceph_origin: upstream, you must decide from which source you want to install Ceph. Set one of the following variables to true:
    • ceph_dev: Use the upstream ceph development repository
    • ceph_stable: Use the upstream ceph stable repository
    • ceph_stable_ice: Use the old Inktank enterprise repository. Only valid on RHEL/CentOS.
    • ceph_stable_rh_storage: Use the new Red Hat enterprise repository. Only valid on RHEL.
  • monitor_interface: interface to listen on
  • journal_size: OSD journal size
  • public_network

OSD

Go to group_vars/osds and edit the following:

  • choose a scenario between:
    • journal_collocation
    • raw_multi_journal
    • osd_directory
  • edit the devices depending on the scenario

Deploy

Simply run:

$ ansible-playbook site.yml
Clone this wiki locally