A collection of playbooks for evaluating Ceph performance with MBWU-based methodology.
The site.yml playbook uses ceph-deploy to install Ceph Nautilus.
-
The control node (on which the playbook will be run) has the following packages installed:
- ansible >= 2.9.0
- python3-apt or python-apt
- python3-netaddr or python-netaddr
python-XXX
orpython3-XXX
depends on the python version of your ansible installer (ansible --version
). -
The control node can password-less ssh to all ceph nodes with users have password-less sudo privilege (including root, although this is NOT recommended). You can follow these sections to create a ceph deploy user:
-
git clone https://github.com/ljishen/MBWU-Ceph.git cd MBWU-Ceph
-
Edit or create
hosts.yml
to add hosts forosds
,mons
,mgrs
, andadmins
. Make sure that theansible_user
is specified for each host and it meets the Prerequisites 2). -
Update
playbooks/templates/ceph.conf.j2
to add any options that you may need (e.g. "public network" and "cluster network"). -
Now you can run:
ansible-playbook playbooks/site.yml [-v] [--tags teardown[,cleanup]]
- Providing
-v
to the command if you want to observe verbose outputs. --tags teardown
is used for cleaning up Ceph installation and configurations.--tags teardown,cleanup
is used for cleaning up Ceph installation, dependent pakcages, and configurations.
- Providing
You can use the replace_disk.yml playbook to replace the disks for any OSDs:
ansible-playbook playbooks/replace_osd.yml --extra-vars "osd_id=<osd_id> new_data_disk=<new_data_disk>" [-v]
For example, to replace the disks of OSD 0 with disk /dev/sda
, you can use
ansible-playbook playbooks/replace_osd.yml --extra-vars "osd_id=0 new_data_disk=/dev/sda" -v
At the end of the plays, check the message as to what pools are affected by this replacement.
-
msg: 'Could not import python modules: apt, apt_pkg. Please install python3-apt package.'
1. Check if you have installed the python3-apt package. 2. If you are uring `virtualenv`, make sure to create the virtual environment with `--system-site-packages`.
For more information, check out this ansible issue #14468.