ci: deploy rbd mirror

Deploy rbd mirorr in cluster scenario

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/1878/head
Sébastien Han 2017-09-08 09:51:03 +02:00
parent 4f325c7ebe
commit 7054615551
7 changed files with 12 additions and 6 deletions

2
Vagrantfile vendored
View File

@ -363,7 +363,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end end
(0..NRBD_MIRRORS - 1).each do |i| (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}" rbd_mirror.vm.hostname = "#{LABEL_PREFIX}rbd-mirror#{i}"
if ASSIGN_STATIC_IP if ASSIGN_STATIC_IP
rbd_mirror.vm.network :private_network, rbd_mirror.vm.network :private_network,

View File

@ -10,7 +10,7 @@
mode: "0644" mode: "0644"
- name: enable systemd unit file for rbd mirror instance - 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 failed_when: false
changed_when: false changed_when: false
@ -21,7 +21,7 @@
- name: systemd start rbd mirror container - name: systemd start rbd mirror container
service: service:
name: ceph-rbd-mirror@{{ ansible_hostname }} name: ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}
state: started state: started
enabled: yes enabled: yes
changed_when: false changed_when: false

View File

@ -33,7 +33,7 @@
- name: create rbd-mirror keyring - 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 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: args:
creates: /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}/keyring creates: /etc/ceph/{{ cluster }}.client.rbd-mirror.{{ ansible_hostname }}.keyring
changed_when: false changed_when: false
when: when:
- cephx - cephx

View File

@ -69,7 +69,7 @@
- ceph-config - ceph-config
- ceph-nfs - ceph-nfs
- hosts: rbd_mirrors - hosts: rbdmirrors
become: True become: True
gather_facts: false gather_facts: false
roles: roles:

View File

@ -20,3 +20,6 @@ ceph-mgr0
[nfss] [nfss]
ceph-nfs0 ceph-nfs0
[rbdmirrors]
ceph-rbd-mirror0

View File

@ -9,7 +9,7 @@ osd_vms: 1
mds_vms: 1 mds_vms: 1
rgw_vms: 1 rgw_vms: 1
nfs_vms: 1 nfs_vms: 1
rbd_mirror_vms: 0 rbd_mirror_vms: 1
client_vms: 1 client_vms: 1
iscsi_gw_vms: 0 iscsi_gw_vms: 0
mgr_vms: 1 mgr_vms: 1

View File

@ -17,3 +17,6 @@ mgr0
[clients] [clients]
client0 ceph_origin="repository" ceph_repository="community" containerized_deployment="False" client0 ceph_origin="repository" ceph_repository="community" containerized_deployment="False"
[rbdmirrors]
rbd-mirror0