From 1d2a66666f22c009551cd471ecd359be113e301a Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Wed, 25 Jun 2014 16:51:28 +0200 Subject: [PATCH] Moved variables into "defaults" directory of each role, and commented the ones in group_vars. --- group_vars/all | 55 ++++++++++++++++----------------- group_vars/mons | 2 +- group_vars/osds | 12 +++---- roles/common/defaults/main.yml | 50 ++++++++++++++++++++++++++++++ roles/haproxy/defaults/main.yml | 6 ++++ roles/mds/defaults/main.yml | 7 +++++ roles/mon/defaults/main.yml | 10 ++++++ roles/osd/defaults/main.yml | 55 +++++++++++++++++++++++++++++++++ roles/radosgw/defaults/main.yml | 12 +++++++ 9 files changed, 174 insertions(+), 35 deletions(-) create mode 100644 roles/common/defaults/main.yml create mode 100644 roles/haproxy/defaults/main.yml create mode 100644 roles/mds/defaults/main.yml create mode 100644 roles/mon/defaults/main.yml create mode 100644 roles/osd/defaults/main.yml create mode 100644 roles/radosgw/defaults/main.yml diff --git a/group_vars/all b/group_vars/all index 81773d3cf..70384a32c 100644 --- a/group_vars/all +++ b/group_vars/all @@ -3,52 +3,51 @@ ## Setup options # -distro_release: "{{ facter_lsbdistcodename }}" -ceph_release: firefly -redhat_distro: el6 # supported distros are el6, rhel6, f18, f19, opensuse12.2, sles11 +#ceph_release: firefly +#redhat_distro: el6 # supported distros are el6, rhel6, f18, f19, opensuse12.2, sles11 ## Ceph options # -cephx: true -fsid: # /!\ GENERATE ONE WITH 'uuidgen -r' /!\ +#cephx: true +#fsid: # /!\ GENERATE ONE WITH 'uuidgen -r' /!\ ## Monitor options # -monitor_interface: eth1 -mon_osd_down_out_interval: 600 -mon_osd_min_down_reporters: 7 # number of OSDs per host + 1 +#monitor_interface: eth1 +#mon_osd_down_out_interval: 600 +#mon_osd_min_down_reporters: 7 # number of OSDs per host + 1 ## MDS options # -mds: true # disable mds configuration in ceph.conf +#mds: true # disable mds configuration in ceph.conf # Rados Gateway options -radosgw: true -redhat_distro_ceph_extra: centos6.4 # supported distros are centos6.3, centos6.4, centos6, fedora18, fedora19, opensuse12.2, rhel6.3, rhel6.4, rhel6.5, rhel6, sles11sp2 -radosgw_interface: eth1 # the public interface which the radosgw talks to the world with, this variable is used in the haproxy role, this does not need to be set if haproxy is not used. +#radosgw: true +#redhat_distro_ceph_extra: centos6.4 # supported distros are centos6.3, centos6.4, centos6, fedora18, fedora19, opensuse12.2, rhel6.3, rhel6.4, rhel6.5, rhel6, sles11sp2 +#radosgw_interface: eth1 # the public interface which the radosgw talks to the world with, this variable is used in the haproxy role, this does not need to be set if haproxy is not used. #radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls -email_address: foo@bar.com +#email_address: foo@bar.com ## OSD options # -journal_size: 100 -pool_default_pg_num: 128 -pool_default_pgp_num: 128 -pool_default_size: 2 -cluster_network: 192.168.0.0/24 -public_network: 192.168.0.0/24 -osd_mkfs_type: xfs -osd_mon_heartbeat_interval: 30 +#journal_size: 100 +#pool_default_pg_num: 128 +#pool_default_pgp_num: 128 +#pool_default_size: 2 +#cluster_network: 192.168.0.0/24 +#public_network: 192.168.0.0/24 +#osd_mkfs_type: xfs +#osd_mon_heartbeat_interval: 30 # Performance tuning -filestore_merge_threshold: 40 -filestore_split_multiple: 8 -osd_op_threads: 8 +#filestore_merge_threshold: 40 +#filestore_split_multiple: 8 +#osd_op_threads: 8 # Recovery tuning -osd_recovery_max_active: 5 -osd_max_backfills: 2 -osd_recovery_op_priority: 2 +#osd_recovery_max_active: 5 +#osd_max_backfills: 2 +#osd_recovery_op_priority: 2 ## Testing mode # enable this mode _only_ when you have a single node -common_single_host_mode: true +#common_single_host_mode: true diff --git a/group_vars/mons b/group_vars/mons index 401c8a8d1..bb1ae7285 100644 --- a/group_vars/mons +++ b/group_vars/mons @@ -2,4 +2,4 @@ # Variables here are applicable to all host groups NOT roles # Monitor options -monitor_secret: # /!\ GENERATE ONE WITH 'ceph-authtool --gen-print-key' /!\ +#monitor_secret: # /!\ GENERATE ONE WITH 'ceph-authtool --gen-print-key' /!\ diff --git a/group_vars/osds b/group_vars/osds index 4468f8341..6e4272254 100644 --- a/group_vars/osds +++ b/group_vars/osds @@ -19,7 +19,7 @@ # Declare devices # All the scenarii inherit from the following device declaration # -devices: [ '/dev/sdb', '/dev/sdc', '/dev/sdd', '/dev/sde'] +#devices: [ '/dev/sdb', '/dev/sdc', '/dev/sdd', '/dev/sde'] # I. First scenario: journal and osd_data on the same device @@ -27,14 +27,14 @@ devices: [ '/dev/sdb', '/dev/sdc', '/dev/sdd', '/dev/sde'] # This will collocate both journal and data on the same disk # creating a partition at the beginning of the device # -journal_collocation: true +#journal_collocation: true # II. Second scenario: single journal device for N OSDs # Use 'true' to enable this scenario # -raw_journal: false -raw_journal_device: /dev/sdb +#raw_journal: false +#raw_journal_device: /dev/sdb # III. Third scenario: N journal devices for N OSDs @@ -47,8 +47,8 @@ raw_journal_device: /dev/sdb # 1. Pre-allocate all the devices # 2. Progressively add new devices -raw_multi_journal: false -raw_journal_devices: [ '/dev/sdb', '/dev/sdb', '/dev/sdc', '/dev/sdc' ] +#raw_multi_journal: false +#raw_journal_devices: [ '/dev/sdb', '/dev/sdb', '/dev/sdc', '/dev/sdc' ] # IV. Fourth scenario: use directory instead of disk for OSDs diff --git a/roles/common/defaults/main.yml b/roles/common/defaults/main.yml new file mode 100644 index 000000000..66eb2dd0f --- /dev/null +++ b/roles/common/defaults/main.yml @@ -0,0 +1,50 @@ +--- +# Variables here are applicable to the current role + +## Setup options +# +distro_release: "{{ facter_lsbdistcodename }}" # Seems to be not used. +apt_key: http://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc +ceph_release: emperor +redhat_distro: el6 # supported distros are el6, rhel6, f18, f19, opensuse12.2, sles11 + +## Ceph options +# +cephx: true +## Monitor options +# +monitor_interface: eth1 +mon_osd_down_out_interval: 600 +mon_osd_min_down_reporters: 7 # number of OSDs per host + 1 + +## MDS options +# +mds: true # disable mds configuration in ceph.conf + +# Rados Gateway options +# +radosgw: true # referenced in mon role too. +#radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls + +## OSD options +# +journal_size: 100 +pool_default_pg_num: 128 +pool_default_pgp_num: 128 +pool_default_size: 2 +cluster_network: 192.168.0.0/24 +public_network: 192.168.0.0/24 +osd_mkfs_type: xfs +osd_mon_heartbeat_interval: 30 +# Performance tuning +filestore_merge_threshold: 40 +filestore_split_multiple: 8 +osd_op_threads: 8 +# Recovery tuning +osd_recovery_max_active: 5 +osd_max_backfills: 2 +osd_recovery_op_priority: 2 + +## Testing mode +# enable this mode _only_ when you have a single node +common_single_host_mode: true diff --git a/roles/haproxy/defaults/main.yml b/roles/haproxy/defaults/main.yml new file mode 100644 index 000000000..ef3489d53 --- /dev/null +++ b/roles/haproxy/defaults/main.yml @@ -0,0 +1,6 @@ +--- +# Variables here are applicable to the current role + +# Rados Gateway options +radosgw_interface: eth1 # the public interface which the radosgw talks to the world with, this variable is used in the haproxy role, this does not need to be set if haproxy is not used. + diff --git a/roles/mds/defaults/main.yml b/roles/mds/defaults/main.yml new file mode 100644 index 000000000..5cba76de9 --- /dev/null +++ b/roles/mds/defaults/main.yml @@ -0,0 +1,7 @@ +--- +# Variables here are applicable to the current role + +## Ceph options +# +cephx: true + diff --git a/roles/mon/defaults/main.yml b/roles/mon/defaults/main.yml new file mode 100644 index 000000000..889bb8f2d --- /dev/null +++ b/roles/mon/defaults/main.yml @@ -0,0 +1,10 @@ +--- +# Variables here are applicable to the current role + +## Ceph options +# +cephx: true + +# Rados Gateway options +# referenced in common role too. +radosgw: true diff --git a/roles/osd/defaults/main.yml b/roles/osd/defaults/main.yml new file mode 100644 index 000000000..1cd76e3db --- /dev/null +++ b/roles/osd/defaults/main.yml @@ -0,0 +1,55 @@ +--- +# Variables here are applicable to the current role +# + +## Ceph options +# +cephx: true + +# Devices to be used as OSDs +# You can pre-provision disks that are not present yet. +# Ansible will just skip them. Newly added disk will be +# automatically configured during the next run. +# + + +# !! WARNING !! +# +# /!\ ENABLE ONLY ONE SCENARIO AT A TIME /!\ +# +# !! WARNING !! + + +# Declare devices +# All the scenarii inherit from the following device declaration +# +devices: [ '/dev/sdb', '/dev/sdc', '/dev/sdd', '/dev/sde'] + + +# I. First scenario: journal and osd_data on the same device +# Use 'true' to enable this scenario +# This will collocate both journal and data on the same disk +# creating a partition at the beginning of the device +# +journal_collocation: true + + +# II. Second scenario: single journal device for N OSDs +# Use 'true' to enable this scenario +# +raw_journal: false +raw_journal_device: /dev/sdb + + +# III. Third scenario: N journal devices for N OSDs +# Use 'true' to enable this scenario +# +# In the following example: +# * sdd and sde will get sdb as a journal +# * sdf and sdg will get sdc as a journal +# While starting you have 2 options: +# 1. Pre-allocate all the devices +# 2. Progressively add new devices + +raw_multi_journal: false +raw_journal_devices: [ '/dev/sdb', '/dev/sdb', '/dev/sdc', '/dev/sdc' ] diff --git a/roles/radosgw/defaults/main.yml b/roles/radosgw/defaults/main.yml new file mode 100644 index 000000000..3ab4caedd --- /dev/null +++ b/roles/radosgw/defaults/main.yml @@ -0,0 +1,12 @@ +--- +# Variables here are applicable to the current role + + +## Ceph options +# +cephx: true + +# Rados Gateway options +redhat_distro_ceph_extra: centos6.4 # supported distros are centos6.3, centos6.4, centos6, fedora18, fedora19, opensuse12.2, rhel6.3, rhel6.4, rhel6.5, rhel6, sles11sp2 +email_address: foo@bar.com +