From 3a8bf18b0bdd5b39d8997bfb1c58701bc4b9e6b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Wed, 2 Aug 2017 10:35:26 +0200 Subject: [PATCH] generate_group_vars_sample: update for ceph-defaults MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- generate_group_vars_sample.sh | 19 +++++------- group_vars/all.yml.sample | 56 ++++++++++++++--------------------- group_vars/mons.yml.sample | 1 - group_vars/osds.yml.sample | 1 + 4 files changed, 31 insertions(+), 46 deletions(-) diff --git a/generate_group_vars_sample.sh b/generate_group_vars_sample.sh index 1e7bd07a4..bb26a229f 100755 --- a/generate_group_vars_sample.sh +++ b/generate_group_vars_sample.sh @@ -1,14 +1,13 @@ #!/usr/bin/env bash - set -euo pipefail + ############# # VARIABLES # ############# basedir=$(dirname "$0") -no_header="ceph-docker-common" # pipe separated list of roles with no header, MUST end with '$', e.g: 'foo$|bar$' -merge_in_all="ceph-common$|ceph-docker-common$" # pipe separated list of roles you want to merge in all.yml.sample, MUST end with '$', e.g: 'foo$|bar$' +do_not_generate="ceph-common$|ceph-docker-common$" # pipe separated list of roles we don't want to generate sample file, MUST end with '$', e.g: 'foo$|bar$' ############# @@ -52,7 +51,7 @@ generate_group_vars_file () { for role in "$basedir"/roles/ceph-*; do rolename=$(basename "$role") - if echo "$rolename" | grep -qE "$merge_in_all"; then + if [[ $rolename == "ceph-defaults" ]]; then output="all.yml.sample" elif [[ $rolename == "ceph-agent" ]]; then output="agent.yml.sample" @@ -62,17 +61,13 @@ for role in "$basedir"/roles/ceph-*; do output="${rolename:5}s.yml.sample" fi - - # Do not re-regenerate the header for certain roles - # since we merge them in all.yml.sample - if ! echo "$rolename" | grep -qE "$no_header"; then - populate_header - fi - defaults="$role"/defaults/main.yml if [[ ! -f $defaults ]]; then continue fi - generate_group_vars_file + if ! echo "$rolename" | grep -qE "$do_not_generate"; then + populate_header + generate_group_vars_file + fi done diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index 5466c4ce6..de54eca35 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -30,6 +30,12 @@ dummy: # INSTALL # ########### +# Set uid/gid to default '64045' for bootstrap directories. +# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros. +# These values have to be set according to the base OS used by the container image, NOT the host. +#bootstrap_dirs_owner: "64045" +#bootstrap_dirs_group: "64045" + #mon_group_name: mons #osd_group_name: osds #rgw_group_name: rgws @@ -197,9 +203,12 @@ dummy: # generated, you may find it useful to disable fsid generation to # avoid cluttering up your ansible repo. If you set `generate_fsid` to # false, you *must* generate `fsid` in another way. +# ACTIVATE THE FSID VARIABLE FOR NON-VAGRANT DEPLOYMENT #fsid: "{{ cluster_uuid.stdout }}" #generate_fsid: true +#ceph_conf_key_directory: /etc/ceph + #cephx: true #max_open_files: 131072 @@ -324,6 +333,14 @@ dummy: #handler_health_osd_check_delay: 30 #handler_health_osd_check: true +# Confiure the type of NFS gatway access. At least one must be enabled for an +# NFS role to be useful +# +# Set this to true to enable File access via NFS. Requires an MDS role. +#nfs_file_gw: true +# Set this to true to enable Object access via NFS. Requires an RGW role. +#nfs_obj_gw: false + ################### # CONFIG OVERRIDE # ################### @@ -358,7 +375,7 @@ dummy: ########## # DOCKER # ########## - +#docker_exec_cmd: #docker: false #ceph_docker_image: "ceph/daemon" #ceph_docker_image_tag: latest @@ -368,42 +385,10 @@ dummy: #containerized_deployment_with_kv: false #containerized_deployment: false #mon_containerized_default_ceph_conf_with_kv: false - -# Confiure the type of NFS gatway access. At least one must be enabled for an -# NFS role to be useful -# -# Set this to true to enable File access via NFS. Requires an MDS role. -#nfs_file_gw: true -# Set this to true to enable Object access via NFS. Requires an RGW role. -#nfs_obj_gw: false - -# this is only here for usage with the rolling_update.yml playbook -# do not ever change this here -#rolling_update: false - -#fsid: "{{ cluster_uuid.stdout }}" -#generate_fsid: true #ceph_docker_registry: docker.io #ceph_docker_enable_centos_extra_repo: false - #ceph_docker_on_openstack: false -#mon_use_fqdn: false # if set to true, the MON name used will be the fqdn - -# Set uid/gid to default '64045' for bootstrap directories. -# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros. -# These values have to be set according to the base OS used by the container image, NOT the host. -#bootstrap_dirs_owner: "64045" -#bootstrap_dirs_group: "64045" - -#ceph_conf_key_directory: /etc/ceph - -########### -# Network # -########### -#monitor_interface: 'interface' -#monitor_address: '0.0.0.0' -#monitor_address_block: [] ############ # KV store # @@ -413,3 +398,8 @@ dummy: #kv_port: 2379 #containerized_deployment_with_kv: false + +# this is only here for usage with the rolling_update.yml playbook +# do not ever change this here +#rolling_update: false + diff --git a/group_vars/mons.yml.sample b/group_vars/mons.yml.sample index e1eac739e..ab3b058c6 100644 --- a/group_vars/mons.yml.sample +++ b/group_vars/mons.yml.sample @@ -113,7 +113,6 @@ dummy: ########## # DOCKER # ########## -#docker_exec_cmd: #ceph_mon_docker_subnet: "{{ public_network }}"# subnet of the monitor_interface # ceph_mon_docker_extra_env: diff --git a/group_vars/osds.yml.sample b/group_vars/osds.yml.sample index 7b7234629..0a270399c 100644 --- a/group_vars/osds.yml.sample +++ b/group_vars/osds.yml.sample @@ -219,6 +219,7 @@ dummy: # Encrypted OSD with dedicated journal: ceph_osd_docker_prepare_env: -e CLUSTER={{ cluster }} -e OSD_JOURNAL_SIZE={{ journal_size }} -e OSD_FORCE_ZAP=1 -e OSD_DMCRYPT=1 -e OSD_JOURNAL={{ raw_journal_devices[0] }} -e OSD_FILESTORE=1 # # +#ceph_osd_docker_devices: "{{ devices }}" #ceph_osd_docker_prepare_env: -e CLUSTER={{ cluster }} -e OSD_JOURNAL_SIZE={{ journal_size }} -e OSD_FORCE_ZAP=1 # ACTIVATE DEVICE -- 2.39.5