config_file=File.expand_path(File.join(File.dirname(__FILE__), 'vagrant_variables.yml'))
settings=YAML.load_file(config_file)
-NMONS = settings['mon_vms']
-NOSDS = settings['osd_vms']
-NMDSS = settings['mds_vms']
-NRGWS = settings['rgw_vms']
-CLIENTS = settings['client_vms']
-SUBNET = settings['subnet']
-BOX = settings['vagrant_box']
+NMONS = settings['mon_vms']
+NOSDS = settings['osd_vms']
+NMDSS = settings['mds_vms']
+NRGWS = settings['rgw_vms']
+CLIENTS = settings['client_vms']
+SUBNET = settings['subnet']
+BOX = settings['vagrant_box']
MEMORY = settings['memory']
ansible_provision = proc do |ansible|
# these aren't supported by Vagrant, see
# https://github.com/mitchellh/vagrant/issues/3539
ansible.groups = {
- 'mons' => (0..NMONS - 1).map { |j| "mon#{j}" },
- 'osds' => (0..NOSDS - 1).map { |j| "osd#{j}" },
- 'mdss' => (0..NMDSS - 1).map { |j| "mds#{j}" },
- 'rgws' => (0..NRGWS - 1).map { |j| "rgw#{j}" },
- 'clients' => (0..CLIENTS - 1).map { |j| "client#{j}" }
+ 'mons' => (0..NMONS - 1).map { |j| "mon#{j}" },
+ 'restapis' => (0..NMONS - 1).map { |j| "mon#{j}" },
+ 'osds' => (0..NOSDS - 1).map { |j| "osd#{j}" },
+ 'mdss' => (0..NMDSS - 1).map { |j| "mds#{j}" },
+ 'rgws' => (0..NRGWS - 1).map { |j| "rgw#{j}" },
+ 'clients' => (0..CLIENTS - 1).map { |j| "client#{j}" }
}
# In a production deployment, these should be secret
- 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
- 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
- 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
- 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",
- }
- end
+ 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",
+ }
ansible.limit = 'all'
end
#osd_group_name: osds
#rgw_group_name: rgws
#mds_group_name: mdss
+#restapi_group_name: restapis
# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_dev /!\
#rbd_client_directories: false # this will create rbd_client_log_path and rbd_client_admin_socket_path directories with proper permissions, this WON'T work if libvirt and kvm are installed
#rbd_client_log_file: /var/log/rbd-clients/qemu-guest-$pid.log # must be writable by QEMU and allowed by SELinux or AppArmor
#rbd_client_log_path: /var/log/rbd-clients/
-#rbd_client_admin_socket_path: /var/run/ceph/rbd-clients/$cluster-$type.$id.$pid.$cctid.asok
+#rbd_client_admin_socket_path: /var/run/ceph/rbd-clients/
## Monitor options
#
#osd_scrub_chunk_max: 5
#osd_deep_scrub_stride: 1048576
-## MDS options
-#
-#mds: false # disable mds configuration in ceph.conf
-
# Rados Gateway options
#
-#radosgw: false # referenced in monitor role too.
#radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls
#radosgw_frontend: civetweb # supported options are 'apache' or 'civetweb', also edit roles/ceph-radosgw/defaults/main.yml
#radosgw_civetweb_port: 80
## REST API options
#
-#restapi: false # disable restapi configuration in ceph.conf
-#restapi_public_addr: 0.0.0.0:5000
+#restapi_interface: "{{ monitor_interface }}"
+#restapi_port: 5000
#restapi_base_url: /api/v0.1
#restapi_log_level: warning
osd_group_name: osds\r
rgw_group_name: rgws\r
mds_group_name: mdss\r
+restapi_group_name: restapis\r
\r
# /!\ EITHER ACTIVE ceph_stable OR ceph_stable_ice OR ceph_dev /!\\r
\r
osd_scrub_chunk_max: 5\r
osd_deep_scrub_stride: 1048576\r
\r
-## MDS options\r
-#\r
-mds: false # disable mds configuration in ceph.conf\r
-\r
## Rados Gateway options\r
#\r
-radosgw: false # referenced in monitor role too.\r
#radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls\r
radosgw_frontend: civetweb # supported options are 'apache' or 'civetweb', also edit roles/ceph-radosgw/defaults/main.yml\r
radosgw_civetweb_port: 80\r
\r
## REST API options\r
#\r
-restapi: false # disable restapi configuration in ceph.conf\r
-restapi_interface: eth1\r
+restapi_interface: "{{ monitor_interface }}"\r
restapi_port: 5000\r
restapi_base_url: /api/v0.1\r
restapi_log_level: warning # available level are: critical, error, warning, info, debug\r