项目作者: hastexo

项目描述 :
Ansible playbooks collecting vital information about Ceph nodes
高级语言:
项目地址: git://github.com/hastexo/ceph-checkup.git
创建时间: 2017-06-12T12:46:24Z
项目社区:https://github.com/hastexo/ceph-checkup

开源协议:Apache License 2.0

下载


ceph-checkup

Ansible playbooks collecting vital information about Ceph nodes

The playbooks in this repository collect information about a Ceph
cluster in a non-destructive, read-only fashion.

Minimum Ansible version

These playbooks require at least Ansible version 2.2.

Inventory

To use these playbooks, you must first clone this repository. Then,
create an Ansible
inventory file
(conventionally named hosts), optionally using the provided
hosts.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:

  1. [mon]
  2. # Mon hosts
  3. ceph-node1
  4. ceph-node2
  5. ceph-node3
  6. [osd]
  7. # OSD hosts
  8. ceph-node4
  9. ceph-node5
  10. ceph-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.

Running the playbooks

In order to run the playbook, execute the following command:

  1. 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 use
sudo, add the -K option to be prompted for that password:

  1. ansible-playbook -i hosts -K checkup.yml

In order to minimize impact on a production cluster, the playbook’s
task run with the
serial: 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.

Variables

You may want to override the following variables:

  • ceph_config_directory — if you keep your configuration in a
    directory other than /etc/ceph
  • ceph_log_directory — if your Ceph daemons write their logs to a
    directory different from /var/log/ceph
  • bond_interfaces — if you want the playbooks to check the bonding
    state of interfaces other than bond0 and bond1.

Supported platforms

The playbook tries to be as platform-agnostic as possible, but is
being tested regularly on Ubuntu 16.04.

License

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

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