Deploy rbd mirorr in cluster scenario
Signed-off-by: Sébastien Han <seb@redhat.com>
end
(0..NRBD_MIRRORS - 1).each do |i|
- config.vm.define "#{LABEL_PREFIX}rbd_mirror#{i}" do |rbd_mirror|
+ config.vm.define "#{LABEL_PREFIX}rbd-mirror#{i}" do |rbd_mirror|
rbd_mirror.vm.hostname = "#{LABEL_PREFIX}rbd-mirror#{i}"
if ASSIGN_STATIC_IP
rbd_mirror.vm.network :private_network,
mode: "0644"
- name: enable systemd unit file for rbd mirror instance
- command: systemctl enable ceph-rbd-mirror@{{ ansible_hostname }}.service
+ command: systemctl enable ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}.service
failed_when: false
changed_when: false
- name: systemd start rbd mirror container
service:
- name: ceph-rbd-mirror@{{ ansible_hostname }}
+ name: ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}
state: started
enabled: yes
changed_when: false
- name: create rbd-mirror keyring
command: ceph --cluster {{ cluster }} --name client.bootstrap-rbd --keyring /var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring auth get-or-create client.rbd-mirror.{{ ansible_hostname }} mon 'profile rbd' osd 'profile rbd' -o /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}.keyring
args:
- creates: /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}/keyring
+ creates: /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}.keyring
changed_when: false
when:
- cephx
- ceph-config
- ceph-nfs
-- hosts: rbd_mirrors
+- hosts: rbdmirrors
become: True
gather_facts: false
roles:
[nfss]
ceph-nfs0
+
+[rbdmirrors]
+ceph-rbd-mirror0
mds_vms: 1
rgw_vms: 1
nfs_vms: 1
-rbd_mirror_vms: 0
+rbd_mirror_vms: 1
client_vms: 1
iscsi_gw_vms: 0
mgr_vms: 1
[clients]
client0 ceph_origin="repository" ceph_repository="community" containerized_deployment="False"
+
+[rbdmirrors]
+rbd-mirror0