]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
containerized mon: create restapi keyring
authorHuamin Chen <hchen@redhat.com>
Thu, 21 Jan 2016 19:54:41 +0000 (19:54 +0000)
committerSébastien Han <seb@redhat.com>
Thu, 24 Mar 2016 15:09:02 +0000 (16:09 +0100)
add sample config for containerized deployment

group_vars/all.docker [new file with mode: 0644]
roles/ceph-mon/tasks/ceph_keys.yml
roles/ceph-mon/tasks/docker/main.yml

diff --git a/group_vars/all.docker b/group_vars/all.docker
new file mode 100644 (file)
index 0000000..67f9958
--- /dev/null
@@ -0,0 +1,25 @@
+---
+dummy:
+cephx_require_signatures: false # Kernel RBD does NOT support signatures!
+cephx_cluster_require_signatures: false
+restapi_group_name: restapis
+fetch_directory: fetch/
+mon_containerized_deployment: true
+ceph_mon_docker_username: hchen
+ceph_mon_docker_imagename: rhceph
+ceph_mon_docker_interface: "{{ monitor_interface }}"
+ceph_mon_docker_subnet: "{{ public_network }}" # subnet of the ceph_mon_docker_interface
+ceph_mon_extra_envs: "MON_NAME={{ ansible_hostname }}" # comma separated variables
+osd_containerized_deployment: true
+ceph_osd_docker_username: hchen
+ceph_osd_docker_imagename: rhceph
+ceph_osd_docker_extra_env: "CEPH_DAEMON=OSD_CEPH_DISK,OSD_FORCE_ZAP=1" # comma separated variables
+ceph_osd_docker_devices:
+ - /dev/sdb
+rgw_containerized_deployment: true
+ceph_rgw_docker_username: hchen
+ceph_rgw_docker_imagename: rhceph
+ceph_rgw_civetweb_port: 80
+ceph_rgw_docker_extra_env: "RGW_CIVETWEB_PORT={{ ceph_rgw_civetweb_port }}" # comma separated variables
+rbd_client_directories: false
+ceph_stable_release: hammer
index f2d33f4675f148832c62905a5c8f8b280a4a70a2..f5eba729b3494876be5c8ea78772da2482ac4e9b 100644 (file)
@@ -5,13 +5,24 @@
   wait_for:
     path: /etc/ceph/ceph.client.admin.keyring
 
-- name: create ceph rest api keyring
+- name: create ceph rest api keyring when mon is not containerized
   command: ceph auth get-or-create client.restapi osd 'allow *' mon 'allow *' -o /etc/ceph/ceph.client.restapi.keyring
   args:
     creates: /etc/ceph/ceph.client.restapi.keyring
   changed_when: false
   when:
     cephx and
+    not mon_containerized_deployment and
+    groups[restapi_group_name] is defined
+
+- name: create ceph rest api keyring when mon is containerized
+  command: docker exec {{ ansible_hostname }} ceph auth get-or-create client.restapi osd 'allow *' mon 'allow *' -o /etc/ceph/ceph.client.restapi.keyring
+  args:
+     creates: /etc/ceph/ceph.client.restapi.keyring
+  changed_when: false
+  when:
+    cephx and
+    mon_containerized_deployment and
     groups[restapi_group_name] is defined
 
 - include: openstack_config.yml
index 22489ff99921b230f8839537802850846b1fefd0..e2d02ba205d248ebec55e4583302dd486b4ab77a 100644 (file)
@@ -15,3 +15,4 @@
 - include: fetch_configs.yml
 - include: start_docker_monitor.yml
 - include: copy_configs.yml
+- include: ../ceph_keys.yml