oasis_roles.prepare_ceph_adm

Build Status

prepare_ceph_adm

This follows the documentation steps for deploying the Red Hat Ceph Storage. This role applies specifically to a deploy host that will drive the deployment and yet not become part of the cluster.

After invoking this role, the adm host will be ready for invoking the ceph-ansible playbooks against the other hosts in the cluster. An invocation such as the following should do the trick:

cd /usr/share/ceph-ansible
# export ANSIBLE_CONFIG=/etc/ansible/ansible.cfg
ansible-playbook site.yml

Substitute in the location of {{ prepare_ceph_adm_destination }}/ansible.cfg in the above execution, and all the other components of this role should automatically be configured. If you use the default value for desination than you can skip the export step, as /etc/ansible/ansible.cfg is the default location Ansible will search in for a config file. If you change the location of destination, then you will need to export the environment variable.

Requirements

Ansible 2.8 or higher

Red Hat Enterprise Linux 7 or equivalent

Valid Red Hat Subscriptions

Role Variables

Currently the following variables are supported:

General

  • prepare_ceph_adm_inventory_file - Default: hosts. This should point to the inventory file for the cluster that will be uploaded to the adm host after it is configured.
  • prepare_ceph_adm_destination - Default: /etc/ansible. Path to the folder where inventory file, group vars, ansible.cfg, ssh key, etc will be uploaded.
  • prepare_ceph_adm_target_user - Default: root. The user who will be running the eventual install of Ceph. This user needs to have write privileges to the
  • prepare_ceph_adm_ssh_private_key_file - Default: ~/.ssh/id_rsa. This is the private SSH key that the adm role will use to connect to the rest of the cluster during Ceph installation.
  • prepare_ceph_adm_group_vars_dir - Default: prepare_ceph_adm/group_vars. This is the local directory from which Ansible group_vars will be copied to the remote system.
  • prepare_ceph_adm_ansible_cfg. A dictionary of ansible.cfg key:value pairs that will be set in the ansible.cfg file added to the destination. While it is not imperative to invoke Ansible with this file, doing so will automatically point your playbook to the uploaded inventory file, private key file, and logs directory on the adm host.
  • prepare_ceph_adm_ceph_ansible_keys_dir.Default: ~/ceph-ansible-keys. Directory to store keys generated by ceph-ansible.
  • prepare_ceph_adm_become - Default: true. If this role needs administrator privileges, then use the Ansible become functionality (based off sudo).
  • prepare_ceph_adm_become_user - Default: root. If the role uses the become functionality for privilege escalation, then this is the name of the target user to change to.

Dependencies

The adm system needs to already be configured with subscription-manager to include the necessary repositories as described in the documentation. Additionally the local Ansible inventory and group_vars folders need to already exist on the local system so that they can be uploaded to the remote target. This role will install the "ceph-ansible" package, so whichever repositories provide the particular version of that package to correspond with the version of Ceph you are trying to deploy.

Additionally, you need to have a local copy of the SSH private key file that will be used to log in to the remote hosts, if these are not explicitly defined elsewhere in group_vars and the inventory file. Obviously, if other methods of authentication are in use, then those are outside of the scope of this role.

Example Playbook

- hosts: prepare_ceph_adm-servers
  roles:
    - role: oasis_roles.prepare_ceph_adm

License

GPLv3

Author Information

David Roble droble@redhat.com

About

Prepares a node to serve as the "adm" base for a Red Hat Ceph Storage deployment

Install
ansible-galaxy install oasis_roles.prepare_ceph_adm
GitHub repository
License
gpl-3.0
Downloads
243