Ansible playbooks collecting vital information about Ceph nodes
ceph-checkupThe playbooks in this repository collect information about a Ceph
cluster in a non-destructive, read-only fashion.
These playbooks require at least Ansible version 2.2.
To use these playbooks, you must first clone this repository. Then,
create an Ansible
inventory file
(conventionally named hosts), optionally using the providedhosts.example file as a starting point.
The inventory file must define two groups, mon containing your Mon
nodes, and osd containing your OSD nodes. For example, your
inventory file might look like this:
[mon]# Mon hostsceph-node1ceph-node2ceph-node3[osd]# OSD hostsceph-node4ceph-node5ceph-node6
You must refer to your nodes by whatever name you use to connect to
them via SSH, including aliases defined with a Host <name> entry.
If you need to connect to your Ceph nodes via a jump host, use
the ProxyCommand ssh -W method.
In order to run the playbook, execute the following command:
ansible-playbook -i hosts checkup.yml
The playbooks use
Ansible’s become method
for privilege escalation. This means that you need not be able to
ssh into your Ceph nodes directly as root, but the user you connect
as must be able the become root once logged in, via sudo. If the
user you connect as needs to provide a password in order to usesudo, add the -K option to be prompted for that password:
ansible-playbook -i hosts -K checkup.yml
In order to minimize impact on a production cluster, the playbook’s
task run with theserial: 1
option, meaning your cluster nodes will be queried sequentially.
Once the playbook run is complete, you’ll find all collected
information in the status directory. You can then archive and
compress this directory, and share the archive with others as
necessary. Use of file encryption (like
GnuPG) is strongly
recommended.
You may want to override the following variables:
ceph_config_directory — if you keep your configuration in a/etc/cephceph_log_directory — if your Ceph daemons write their logs to a/var/log/cephbond_interfaces — if you want the playbooks to check the bondingbond0 and bond1.The playbook tries to be as platform-agnostic as possible, but is
being tested regularly on Ubuntu 16.04.
Copyright 2016-17 hastexo Professional Services GmbH
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.