Installation

Here we will summarize the bootstrapping of Ceph on bare metal utilizing the same ceph-ansible tools but without Vagrant orchestrating. If you're using for loops, like Jack Butler you're doing it wrong.

First, clone the ceph-ansible GitHub repo onto a system or VM that will serve as your admin node.

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

Next install Ansible via your Linux distribution's package manager, pip, or download from http://docs.ansible.com/ansible/latest/intro_installation.html . The latest stable release is suggested.

Next populate Ansible's inventory file with hosts and host groups using /etc/ansible/hosts as a starting point. You'll end up with a file resembling this example:

[mons]
ceph-mon01
ceph-mon02
ceph-mon03

[osds]
ceph-osd001
ceph-osd002
ceph-osd003
ceph-osd004 ceph-osd005 ceph-osd006
[rgws]
ceph-rgw01

[clients]
ceph-client-01

Next, follow your organization's usual process to populate SSH keys then use Ansible's handy ping module to verify that you can connect to each system without supplying a password.

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

If you experience difficulty with the above test, check the permissions on your .ssh directory and examine /etc/ansible/ansible.cfg.

Next customize the group_vars and site.yml files, just like we did in the previous chapter.

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

As you might surmise, next we must edit the group_vars/all.yml file to reflect our local conditions.

First, edit the entries for public_nework and monitor_interface as appropriate to your systems. Next consider where you wish to snag Ceph's installation package and configure the familiar ceph_origin line with distro, upstream, or local. When choosing the upstream package source you must designate how far upstream you wish to swim. The safe choice is ceph_stable, though ceph_rhcs is valid for RHEL deployments and the adventurous may skate with ceph_dev.

Our sandbox deployment did not touch on customization of OSD creation details, but for bare metal deployment you must edit group_vars/osds.yml and edit at the very least the osd_scenario line to select a strategy from among those presented: journal_collocation, bluestore, osd_directory, raw_multi_journal, dmcrypt_journal_collocation, dmcrypt_dedicated_journal. Note the spelling, collocation not colocation. It is worth reading through this entire file before proceeding. Note that osd_directory has been problematic in some ways and may be removed in the future.

Also, edit the devices and raw_journal_devices entries as appropriate for your deployment.

You're ready! Light the fuse by invoking

$ ansible-playbook site.yml

and enjoy the show as ceph-ansible does what in the bad old days we needed dozens of for loops and individual commands to accomplish. Remember earlier in this chapter when we advised unlimited scrollback history for your terminal application? And garlic fries? This is the time for both.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset