Appendix E. Importing an Existing Ceph Cluster to Ansible
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 ssh access to all Ceph nodes in the cluster. See Section 3.9, "Enabling password-less SSH for Ansible" for more details. As root , create a symbolic link to the Ansible group_vars directory in the /etc/ansible/ directory: As root , create an all.yml file from the all.yml.sample file and open it for editing: Set the generate_fsid setting to false in group_vars/all.yml . Get the current cluster fsid by executing ceph fsid . Set the retrieved fsid in group_vars/all.yml . Modify the Ansible inventory in /etc/ansible/hosts to 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. Make sure ceph_conf_overrides is updated with the original ceph.conf options used for [global] , [osd] , [mon] , and [client] sections in the all.yml file. Options like osd journal , public_network and cluster_network should not be added in ceph_conf_overrides because they are already part of all.yml . Only the options that are not part of all.yml and are in the original ceph.conf should be added to ceph_conf_overrides . From the /usr/share/ceph-ansible/ directory run the playbook.
ln -s /usr/share/ceph-ansible/group_vars /etc/ansible/group_vars cd /etc/ansible/group_vars cp all.yml.sample all.yml vim all.yml cd /usr/share/ceph-ansible/ ansible-playbook infrastructure-playbooks/take-over-existing-cluster.yml -u <username> -i hosts