Red Hat Training
A Red Hat training course is available for Red Hat Ceph Storage
Appendix I. 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 2.11, “Enabling Password-less SSH for Ansible” for more details. As
root
, create a symbolic link to the Ansiblegroup_vars
directory in the/etc/ansible/
directory:# ln -s /usr/share/ceph-ansible/group_vars /etc/ansible/group_vars
As
root
, create anall.yml
file from theall.yml.sample
file and open it for editing:# cd /etc/ansible/group_vars # cp all.yml.sample all.yml # vim all.yml
-
Set the
generate_fsid
setting tofalse
ingroup_vars/all.yml
. -
Get the current cluster
fsid
by executingceph fsid
. -
Set the retrieved
fsid
ingroup_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 originalceph.conf
options used for[global]
,[osd]
,[mon]
, and[client]
sections in theall.yml
file.Options like
osd journal
,public_network
andcluster_network
should not be added inceph_conf_overrides
because they are already part ofall.yml
. Only the options that are not part ofall.yml
and are in the originalceph.conf
should be added toceph_conf_overrides
.From the
/usr/share/ceph-ansible/
directory run the playbook.# cd /usr/share/ceph-ansible/ # cp infrastructure-playbooks/take-over-existing-cluster.yml . $ ansible-playbook take-over-existing-cluster.yml -u <username>