Skip to content

ljishen/MBWU-Ceph

Repository files navigation

MBWU-Ceph

A collection of playbooks for evaluating Ceph performance with MBWU-based methodology.

The site.yml playbook uses ceph-deploy to install Ceph Nautilus.

Prerequisites

  1. 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 or python3-XXX depends on the python version of your ansible installer (ansible --version).

  2. 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:

    1. CREATE A CEPH DEPLOY USER
    2. ENABLE PASSWORD-LESS SSH

How to Run

  1. git clone https://github.com/ljishen/MBWU-Ceph.git
    cd MBWU-Ceph
  2. Edit or create hosts.yml to add hosts for osds, mons, mgrs, and admins. Make sure that the ansible_user is specified for each host and it meets the Prerequisites 2).

  3. Update playbooks/templates/ceph.conf.j2 to add any options that you may need (e.g. "public network" and "cluster network").

  4. 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.

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.

Troubleshooting

  • 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.

Releases

No releases published

Packages

No packages published

Languages