Appendix E. Importing an Existing Ceph Cluster to Ansible
You can configure Ansible to use a cluster deployed without Ansible. For example, if you upgraded Red Hat Ceph Storage 1.3 clusters to version 2 manually, configure them to use Ansible by following this procedure:
- After manually upgrading from version 1.3 to version 2, install and configure Ansible on the administration node.
Ensure that the Ansible administration node has passwordless
sshaccess to all Ceph nodes in the cluster. See Section 3.9, “Enabling password-less SSH for Ansible” for more details.
root, create a symbolic link to the Ansible
group_varsdirectory in the
# ln -s /usr/share/ceph-ansible/group_vars /etc/ansible/group_vars
root, create an
all.ymlfile from the
all.yml.samplefile and open it for editing:
# cd /etc/ansible/group_vars # cp all.yml.sample all.yml # vim all.yml
Get the current cluster
Set the retrieved
Modify the Ansible inventory in
/etc/ansible/hoststo include Ceph hosts. Add monitors under a
[mons]section, OSDs under an
[osds]section and gateways under an
[rgws]section to identify their roles to Ansible.
ceph_conf_overridesis updated with the original
ceph.confoptions used for
[client]sections in the
cluster_networkshould not be added in
ceph_conf_overridesbecause they are already part of
all.yml. Only the options that are not part of
all.ymland are in the original
ceph.confshould be added to
/usr/share/ceph-ansible/directory run the playbook.
# cd /usr/share/ceph-ansible/ # ansible-playbook infrastructure-playbooks/take-over-existing-cluster.yml -u <username> -i hosts