Skip to content
Leseb edited this page Jan 30, 2015 · 12 revisions

Welcome to the ceph-ansible wiki!

Deploy without Vagrant

First install Ansible by using the bootstrap-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:

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.

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 roles/ceph-common/defaults/main.yml and edit the following:

  • monitor_interface: interface to listen on
  • journal_size: OSD journal size
  • cluster_network
  • public_network

Monitor

Go to roles/ceph-mon/defaults/main.yml and edit the following: Only one variable is required:

  • monitor_secret

If you don't have one you can either:

  • generate one with: ceph-authtool --gen-print-key. The tool comes with the ceph-common package, if it's not installed you might fallback to the second method
  • use the file monitor_keys_example where you can chose a key. To randomly get a key you can execute sort -R keys | head -n1. On Mac OS X the sort won't work however this will cat monitor_keys_example | awk 'BEGIN { srand() } rand() >= 0.5 { print; exit }'

OSD

Go to roles/ceph-osd/defaults/main.yml and edit the following:

  • devices

This will activate the collocation scenario (journal and osd data on the same disk). For more scenarios, read the file.

Clone this wiki locally