]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
docker: simplify variable declaration 1840/head
authorSébastien Han <seb@redhat.com>
Thu, 31 Aug 2017 10:04:40 +0000 (12:04 +0200)
committerSébastien Han <seb@redhat.com>
Fri, 8 Sep 2017 23:22:06 +0000 (01:22 +0200)
Less configuration for the user, the container inherit from the global
variables. No more container specific variables.

Signed-off-by: Sébastien Han <seb@redhat.com>
16 files changed:
group_vars/mdss.yml.sample
group_vars/mgrs.yml.sample
group_vars/mons.yml.sample
group_vars/nfss.yml.sample
group_vars/restapis.yml.sample
group_vars/rgws.yml.sample
roles/ceph-mds/defaults/main.yml
roles/ceph-mds/templates/ceph-mds.service.j2
roles/ceph-mgr/defaults/main.yml
roles/ceph-mgr/templates/ceph-mgr.service.j2
roles/ceph-mon/defaults/main.yml
roles/ceph-mon/templates/ceph-mon.service.j2
roles/ceph-nfs/defaults/main.yml
roles/ceph-rbd-mirror/templates/ceph-rbd-mirror.service.j2
roles/ceph-restapi/defaults/main.yml
roles/ceph-rgw/defaults/main.yml

index 4dbf4e795acedf41a2bcf5a7748183a88d3521c1..3bfab976943294d58dfc84d3946e1e31c56de1c8 100644 (file)
@@ -13,8 +13,6 @@ dummy:
 # GENERAL #
 ###########
 
-#fetch_directory: fetch/
-
 # Even though MDS nodes should not have the admin key
 # at their disposal, some people might want to have it
 # distributed on MDS nodes. Setting 'copy_admin_key' to 'true'
@@ -32,7 +30,10 @@ dummy:
 #ceph_mds_docker_memory_limit: 1g
 #ceph_mds_docker_cpu_limit: 1
 
-#ceph_mds_docker_extra_env: -e CLUSTER={{ cluster }} -e MDS_NAME={{ ansible_hostname }}
+# we currently for MDS_NAME to hostname because of a bug in ceph-docker
+# fix here: https://github.com/ceph/ceph-docker/pull/770
+# this will go away soon.
+#ceph_mds_docker_extra_env: -e MDS_NAME={{ ansible_hostname }}
 #ceph_config_keys: [] # DON'T TOUCH ME
 
 
index d82d3b0674c15d3f1c00b9d631f778947cc4fd7e..a7f10dbef57769446e97894dd45c38347aec42dd 100644 (file)
@@ -18,7 +18,7 @@ dummy:
 #ceph_mgr_docker_memory_limit: 1g
 #ceph_mgr_docker_cpu_limit: 1
 
-#ceph_mgr_docker_extra_env: -e CLUSTER={{ cluster }} -e MGR_NAME={{ ansible_hostname }}
+#ceph_mgr_docker_extra_env:
 #ceph_config_keys: [] # DON'T TOUCH ME
 
 
index ccdaa177d75a9ee7137b42a648c7948cbbc83e9c..2f73d2b8262c486fbb9a6ab7dfe168bad29830e7 100644 (file)
@@ -113,7 +113,6 @@ dummy:
 ##########
 # DOCKER #
 ##########
-#ceph_mon_docker_subnet: "{{ public_network }}"# subnet of the monitor_interface
 
 # Resource limitation
 # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
@@ -122,12 +121,10 @@ dummy:
 #ceph_mon_docker_memory_limit: 1g
 #ceph_mon_docker_cpu_limit: 1
 
-# ceph_mon_docker_extra_env:
-#
 # Use this variable to add extra env configuration to run your mon container.
 # If you want to set a custom admin keyring you can set this variable like following:
-# ceph_mon_docker_extra_env: -e CLUSTER={{ cluster }} -e FSID={{ fsid }} -e MON_NAME={{ monitor_name }} -e ADMIN_SECRET={{ admin_secret }}
-#ceph_mon_docker_extra_env: -e CLUSTER={{ cluster }} -e FSID={{ fsid }} -e MON_NAME={{ monitor_name }}
+# ceph_mon_docker_extra_env: -e ADMIN_SECRET={{ admin_secret }}
+#ceph_mon_docker_extra_env:
 #mon_docker_privileged: false
 #mon_docker_net_host: true
 #ceph_config_keys: [] # DON'T TOUCH ME
index af8dfafa0b63e1e3733031a4f0b31f52f8b2f82a..556501c2d70c4eb2f8b203e0ead1542106176300 100644 (file)
@@ -13,8 +13,6 @@ dummy:
 # GENERAL #
 ###########
 
-#fetch_directory: fetch/
-
 # Even though NFS nodes should not have the admin key
 # at their disposal, some people might want to have it
 # distributed on RGW nodes. Setting 'copy_admin_key' to 'true'
index 034b936cc0b51bb8387104bd115d113fd5396fc8..a7b935eb0acd5d23744687a649756ed1bd26c473 100644 (file)
@@ -12,8 +12,6 @@ dummy:
 # GENERAL #
 ###########
 
-#fetch_directory: fetch/
-
 ##########
 # DOCKER #
 ##########
index 164e51016acac96da44d7b977228c19eda97690d..38b7e3cf7368fa68b4a16996ebf947c10f4eab2d 100644 (file)
@@ -13,8 +13,6 @@ dummy:
 # GENERAL #
 ###########
 
-#fetch_directory: fetch/
-
 # Even though RGW nodes should not have the admin key
 # at their disposal, some people might want to have it
 # distributed on RGW nodes. Setting 'copy_admin_key' to 'true'
index 9d8fbbd43570300c22582d8cdff6067a91ff3c80..b065bc7b62e0baf5ed9b05407b695f3f3a05385c 100644 (file)
@@ -5,8 +5,6 @@
 # GENERAL #
 ###########
 
-fetch_directory: fetch/
-
 # Even though MDS nodes should not have the admin key
 # at their disposal, some people might want to have it
 # distributed on MDS nodes. Setting 'copy_admin_key' to 'true'
@@ -24,7 +22,10 @@ copy_admin_key: false
 ceph_mds_docker_memory_limit: 1g
 ceph_mds_docker_cpu_limit: 1
 
-ceph_mds_docker_extra_env: -e CLUSTER={{ cluster }} -e MDS_NAME={{ ansible_hostname }}
+# we currently for MDS_NAME to hostname because of a bug in ceph-docker
+# fix here: https://github.com/ceph/ceph-docker/pull/770
+# this will go away soon.
+ceph_mds_docker_extra_env: -e MDS_NAME={{ ansible_hostname }}
 ceph_config_keys: [] # DON'T TOUCH ME
 
 
index 0d99e5314e103e9128dd037588568f792a0bb0b1..48e4e561b168a411cb57ce4b7d909ed9dc470a27 100644 (file)
@@ -22,8 +22,9 @@ ExecStart=/usr/bin/docker run --rm --net=host \
   -e KV_PORT={{kv_port}} \
   {% endif -%}
   -v /etc/localtime:/etc/localtime:ro \
-  -e CEPH_DAEMON=MDS \
+  -e CLUSTER={{ cluster }} \
   -e CEPHFS_CREATE=1 \
+  -e CEPH_DAEMON=MDS \
   {{ ceph_mds_docker_extra_env }} \
   --name=ceph-mds-{{ ansible_hostname }} \
   {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
index 78a83fd35925fe2984660282d9225b25f8a91c7b..57300559b5791343c921f215436839260f852263 100644 (file)
@@ -10,7 +10,7 @@
 ceph_mgr_docker_memory_limit: 1g
 ceph_mgr_docker_cpu_limit: 1
 
-ceph_mgr_docker_extra_env: -e CLUSTER={{ cluster }} -e MGR_NAME={{ ansible_hostname }}
+ceph_mgr_docker_extra_env:
 ceph_config_keys: [] # DON'T TOUCH ME
 
 
index 5aecf4ce31831325e56baf551a21d7bb258df96b..981289199ccc657504b061b45f483b1dfb81e213 100644 (file)
@@ -22,6 +22,7 @@ ExecStart=/usr/bin/docker run --rm --net=host \
   -e KV_PORT={{kv_port}} \
   {% endif -%}
   -v /etc/localtime:/etc/localtime:ro \
+  -e CLUSTER={{ cluster }} \
   -e CEPH_DAEMON=MGR \
   {{ ceph_mgr_docker_extra_env }} \
   --name=ceph-mgr-{{ ansible_hostname }} \
index 88e0d80fbba6e44e12bca8dcbdae8d78a256ced8..ca3c07d9513796864017d3142447bac606d127a6 100644 (file)
@@ -105,7 +105,6 @@ openstack_keys:
 ##########
 # DOCKER #
 ##########
-ceph_mon_docker_subnet: "{{ public_network }}"# subnet of the monitor_interface
 
 # Resource limitation
 # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
@@ -114,12 +113,10 @@ ceph_mon_docker_subnet: "{{ public_network }}"# subnet of the monitor_interface
 ceph_mon_docker_memory_limit: 1g
 ceph_mon_docker_cpu_limit: 1
 
-# ceph_mon_docker_extra_env:
-#
 # Use this variable to add extra env configuration to run your mon container.
 # If you want to set a custom admin keyring you can set this variable like following:
-# ceph_mon_docker_extra_env: -e CLUSTER={{ cluster }} -e FSID={{ fsid }} -e MON_NAME={{ monitor_name }} -e ADMIN_SECRET={{ admin_secret }}
-ceph_mon_docker_extra_env: -e CLUSTER={{ cluster }} -e FSID={{ fsid }} -e MON_NAME={{ monitor_name }}
+# ceph_mon_docker_extra_env: -e ADMIN_SECRET={{ admin_secret }}
+ceph_mon_docker_extra_env:
 mon_docker_privileged: false
 mon_docker_net_host: true
 ceph_config_keys: [] # DON'T TOUCH ME
index 07c776a2c022a79b680f6b0cec7086fb56e38754..490d5973cda3d92a383a445c40f3d64926c56c08 100644 (file)
@@ -28,8 +28,6 @@ ExecStart=/usr/bin/docker run --rm --name ceph-mon-%i --net=host \
   {% if mon_docker_net_host -%}
   --net=host \
   {% endif -%}
-  -e CEPH_DAEMON=MON \
-  -e CEPH_PUBLIC_NETWORK={{ ceph_mon_docker_subnet }} \
   -e IP_VERSION={{ ip_version[-1:] }} \
   {% if monitor_address is defined and monitor_address != '0.0.0.0' %}
     {% if ip_version == 'ipv4' -%}
@@ -42,6 +40,10 @@ ExecStart=/usr/bin/docker run --rm --name ceph-mon-%i --net=host \
   {% elif ip_version =='ipv6' -%}
   -e MON_IP=[{{ hostvars[inventory_hostname]['ansible_' + monitor_interface][ip_version][0]['address'] }}] \
   {% endif -%}
+  -e CLUSTER={{ cluster }} \
+  -e FSID={{ fsid }} \
+  -e CEPH_PUBLIC_NETWORK={{ public_network }} \
+  -e CEPH_DAEMON=MON \
   {{ ceph_mon_docker_extra_env }} \
   {{ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
 ExecStopPost=-/usr/bin/docker stop ceph-mon-%i
index 786099d279630a61fc663e7d1412fe366cb66268..2e4c8bfff8f368727c105d198d96ba3a8976f767 100644 (file)
@@ -5,8 +5,6 @@
 # GENERAL #
 ###########
 
-fetch_directory: fetch/
-
 # Even though NFS nodes should not have the admin key
 # at their disposal, some people might want to have it
 # distributed on RGW nodes. Setting 'copy_admin_key' to 'true'
index 48b448bb1f20ee9e81a7aa7f872bc857ddb6e2ef..9be66e5d6e36108ddeb6a214c69df3db3c215498 100644 (file)
@@ -14,6 +14,7 @@ ExecStart=/usr/bin/docker run --rm --net=host \
   --cpu-quota={{ ceph_rbd_mirror_docker_cpu_limit * 100000 }} \
   {% endif -%}
   {% if not containerized_deployment_with_kv -%}
+  -v /var/lib/ceph:/var/lib/ceph \
   -v /etc/ceph:/etc/ceph \
   {% else -%}
   -e KV_TYPE={{kv_type}} \
@@ -21,6 +22,7 @@ ExecStart=/usr/bin/docker run --rm --net=host \
   -e KV_PORT={{kv_port}} \
   {% endif -%}
   -v /etc/localtime:/etc/localtime:ro \
+  -e CLUSTER={{ cluster }} \
   -e CEPH_DAEMON=RBD_MIRROR \
   --name=ceph-rbd-mirror-{{ ansible_hostname }} \
   {{ ceph_rbd_mirror_docker_extra_env }} \
index 4152ee73018a6da166ac926569f47615c8242fd5..2c88d3c67eeb837853d5be86ea6036cb5a7e57b8 100644 (file)
@@ -4,8 +4,6 @@
 # GENERAL #
 ###########
 
-fetch_directory: fetch/
-
 ##########
 # DOCKER #
 ##########
index 7f0a8aa4c47fe35011fbdd26aa1adced4c84a084..d8587fa4634e09223ac05964a9e98c2008734acc 100644 (file)
@@ -5,8 +5,6 @@
 # GENERAL #
 ###########
 
-fetch_directory: fetch/
-
 # Even though RGW nodes should not have the admin key
 # at their disposal, some people might want to have it
 # distributed on RGW nodes. Setting 'copy_admin_key' to 'true'