From: Sébastien Han Date: Fri, 8 Sep 2017 07:51:03 +0000 (+0200) Subject: ci: deploy rbd mirror X-Git-Tag: v3.0.0rc7~1^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1878%2Fhead;p=ceph-ansible.git ci: deploy rbd mirror Deploy rbd mirorr in cluster scenario Signed-off-by: Sébastien Han --- diff --git a/Vagrantfile b/Vagrantfile index 0b09cfda0..5b0962ed9 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -363,7 +363,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 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, diff --git a/roles/ceph-rbd-mirror/tasks/docker/start_docker_rbd_mirror.yml b/roles/ceph-rbd-mirror/tasks/docker/start_docker_rbd_mirror.yml index afaffafe2..c86c84c18 100644 --- a/roles/ceph-rbd-mirror/tasks/docker/start_docker_rbd_mirror.yml +++ b/roles/ceph-rbd-mirror/tasks/docker/start_docker_rbd_mirror.yml @@ -10,7 +10,7 @@ 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 @@ -21,7 +21,7 @@ - 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 diff --git a/roles/ceph-rbd-mirror/tasks/pre_requisite.yml b/roles/ceph-rbd-mirror/tasks/pre_requisite.yml index 0d960c557..5b0ad3d8a 100644 --- a/roles/ceph-rbd-mirror/tasks/pre_requisite.yml +++ b/roles/ceph-rbd-mirror/tasks/pre_requisite.yml @@ -33,7 +33,7 @@ - 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 diff --git a/site-docker.yml.sample b/site-docker.yml.sample index 29272223c..2c10d937c 100644 --- a/site-docker.yml.sample +++ b/site-docker.yml.sample @@ -69,7 +69,7 @@ - ceph-config - ceph-nfs -- hosts: rbd_mirrors +- hosts: rbdmirrors become: True gather_facts: false roles: diff --git a/tests/functional/centos/7/cluster/hosts b/tests/functional/centos/7/cluster/hosts index 8ef58a403..71408cdef 100644 --- a/tests/functional/centos/7/cluster/hosts +++ b/tests/functional/centos/7/cluster/hosts @@ -20,3 +20,6 @@ ceph-mgr0 [nfss] ceph-nfs0 + +[rbdmirrors] +ceph-rbd-mirror0 diff --git a/tests/functional/centos/7/cluster/vagrant_variables.yml b/tests/functional/centos/7/cluster/vagrant_variables.yml index a711032a9..5fc482e98 100644 --- a/tests/functional/centos/7/cluster/vagrant_variables.yml +++ b/tests/functional/centos/7/cluster/vagrant_variables.yml @@ -9,7 +9,7 @@ osd_vms: 1 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 diff --git a/tests/functional/centos/7/docker/hosts b/tests/functional/centos/7/docker/hosts index 25807504d..fb646969c 100644 --- a/tests/functional/centos/7/docker/hosts +++ b/tests/functional/centos/7/docker/hosts @@ -17,3 +17,6 @@ mgr0 [clients] client0 ceph_origin="repository" ceph_repository="community" containerized_deployment="False" + +[rbdmirrors] +rbd-mirror0