-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the ceph-ansible wiki!
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 :).
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:
- decide from which source you want to install ceph, so choose between:
- ceph_stable
- ceph_stable_ice (old enterprise version)
- ceph_stable_rh_storage (enterprise version)
- fsid: kinda optional but you can set a new one
- monitor_interface: interface to listen on
- journal_size: OSD journal size
- public_network
Go to group_vars/mons
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 theceph-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 executesort -R keys | head -n1
. On Mac OS X the sort won't work however this willcat monitor_keys_example | awk 'BEGIN { srand() } rand() >= 0.5 { print; exit }'
- on linux
shuf
is awesome for this with:shuf monitor_keys_example | head -1
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
For more scenarios, read the file.