Merge pull request #262 from leseb/vagrant-vars

Fix multiple things
pull/263/head
Leseb 2015-05-15 14:45:31 +02:00
commit c030786db1
5 changed files with 41 additions and 12 deletions

21
Vagrantfile vendored
View File

@ -30,23 +30,35 @@ ansible_provision = proc do |ansible|
}
# In a production deployment, these should be secret
if NMDSS != '0' && NRGWS != '0'
if NMDSS != 0 && NRGWS != 0
ansible.extra_vars = {
fsid: '4a158d27-f750-41d5-9e7f-26ce4c9d2d45',
monitor_secret: 'AQAWqilTCDh7CBAAawXt6kyTgLFCxSvJhTEmuw==',
journal_size: 100,
monitor_interface: 'eth1',
cluster_network: "#{SUBNET}.0/24",
public_network: "#{SUBNET}.0/24",
radosgw: 'true',
mds: 'true',
}
elsif NMDSS != '0'
elsif NMDSS != 0
ansible.extra_vars = {
fsid: '4a158d27-f750-41d5-9e7f-26ce4c9d2d45',
monitor_secret: 'AQAWqilTCDh7CBAAawXt6kyTgLFCxSvJhTEmuw==',
journal_size: 100,
monitor_interface: 'eth1',
cluster_network: "#{SUBNET}.0/24",
public_network: "#{SUBNET}.0/24",
mds: 'true',
}
elsif NRGWS != '0'
elsif NRGWS != 0
ansible.extra_vars = {
fsid: '4a158d27-f750-41d5-9e7f-26ce4c9d2d45',
monitor_secret: 'AQAWqilTCDh7CBAAawXt6kyTgLFCxSvJhTEmuw==',
journal_size: 100,
monitor_interface: 'eth1',
cluster_network: "#{SUBNET}.0/24",
public_network: "#{SUBNET}.0/24",
radosgw: 'true',
}
else
@ -54,6 +66,9 @@ ansible_provision = proc do |ansible|
fsid: '4a158d27-f750-41d5-9e7f-26ce4c9d2d45',
monitor_secret: 'AQAWqilTCDh7CBAAawXt6kyTgLFCxSvJhTEmuw==',
journal_size: 100,
monitor_interface: 'eth1',
cluster_network: "#{SUBNET}.0/24",
public_network: "#{SUBNET}.0/24",
}
end
ansible.limit = 'all'

View File

@ -61,7 +61,7 @@ dummy:
## Monitor options
#
#monitor_interface: eth1
#monitor_interface: interface
#mon_osd_down_out_interval: 600
#mon_osd_min_down_reporters: 7 # number of OSDs per host + 1
#mon_clock_drift_allowed: .15
@ -77,8 +77,8 @@ dummy:
#pool_default_pgp_num: 128
#pool_default_size: 2
#pool_default_min_size: 1
#cluster_network: 192.168.42.0/24
#public_network: 192.168.42.0/24
#cluster_network: 0.0.0.0/0
#public_network: 0.0.0.0/0
#osd_mkfs_type: xfs
#osd_mkfs_options_xfs: -f -i size=2048
#osd_mount_options_xfs: noatime

View File

@ -72,7 +72,7 @@ debug_mds_level: 20
## Monitor options
#
monitor_interface: eth1
monitor_interface: interface
mon_osd_down_out_interval: 600
mon_osd_min_down_reporters: 7 # number of OSDs per host + 1
mon_clock_drift_allowed: .15
@ -88,8 +88,8 @@ pool_default_pg_num: 128
pool_default_pgp_num: 128
pool_default_size: 2
pool_default_min_size: 1
cluster_network: 192.168.42.0/24
public_network: 192.168.42.0/24
cluster_network: 0.0.0.0/0
public_network: 0.0.0.0/0
osd_mkfs_type: xfs
osd_mkfs_options_xfs: -f -i size=2048
osd_mount_options_xfs: noatime,largeio,inode64,swalloc

View File

@ -0,0 +1,16 @@
---
- name: Make sure journal_size configured
fail: msg="journal_size must be configured. See http://ceph.com/docs/master/rados/configuration/osd-config-ref/"
when: journal_size|int == 0
- name: Make sure monitor_interface configured
fail: msg="monitor_interface must be configured. Interface for the monitor to listen on"
when: monitor_interface == 'interface'
- name: Make sure cluster_network configured
fail: msg="cluster_network must be configured. Ceph replication network"
when: cluster_network == '0.0.0.0/0'
- name: Make sure public_network configured
fail: msg="public_network must be configured. Ceph public network"
when: public_network == '0.0.0.0/0'

View File

@ -35,9 +35,7 @@
register: cluster_uuid
changed_when: False
- name: Make sure journal_size configured
fail: msg="journal_size must be configured. See http://ceph.com/docs/master/rados/configuration/osd-config-ref/"
when: journal_size|int == 0
- include: check-mandatory-vars.yml
- name: Generate Ceph configuration file
template: >