devices: settings['disks'],
ceph_docker_on_openstack: BOX == 'openstack',
ceph_rgw_civetweb_port: 8080,
+ radosgw_interface: ETH,
generate_fsid: 'true',
})
else
devices: settings['disks'],
osd_scenario: 'collocated',
monitor_interface: ETH,
+ radosgw_interface: ETH,
os_tuning_params: settings['os_tuning_params'],
pool_default_size: '2',
})
ansible.sudo = true
# Use monitor_address_block instead of monitor_interface:
ansible.extra_vars.delete(:monitor_interface)
+ # Use radosgw_address_block instead of radosgw_interface:
+ ansible.extra_vars.delete(:radosgw_interface)
ansible.extra_vars = ansible.extra_vars.merge({
cluster_network: "#{CLUSTER_SUBNET}.0/16",
devices: ['/dev/sdc'], # hardcode leftover disk
osd_scenario: 'collocated',
monitor_address_block: "#{PUBLIC_SUBNET}.0/16",
+ radosgw_address_block: "#{PUBLIC_SUBNET}.0/16",
public_network: "#{PUBLIC_SUBNET}.0/16",
})
end
# For additional civetweb configuration options available such as SSL, logging,
# keepalive, and timeout settings, please see the civetweb docs at
# https://github.com/civetweb/civetweb/blob/master/docs/UserManual.md
-#radosgw_civetweb_options: "port={{ radosgw_civetweb_bind_ip }}:{{ radosgw_civetweb_port }} num_threads={{ radosgw_civetweb_num_threads }}"
+#radosgw_civetweb_options: "num_threads={{ radosgw_civetweb_num_threads }}"
+# You must define either radosgw_interface, radosgw_address.
+# These variables must be defined at least in all.yml and overrided if needed (inventory host file or group_vars/*.yml).
+# Eg. If you want to specify for each radosgw node which address the radosgw will bind to you can set it in your **inventory host file** by using 'radosgw_address' variable.
+# Preference will go to radosgw_address if both radosgw_address and radosgw_interface are defined.
+# To use an IPv6 address, use the radosgw_address setting instead (and set ip_version to ipv6)
+#radosgw_interface: interface
+#radosgw_address: 0.0.0.0
+#radosgw_address_block: []
#radosgw_keystone: false # activate OpenStack Keystone options full detail here: http://ceph.com/docs/master/radosgw/keystone/
# Rados Gateway options
#email_address: foo@bar.com
#ceph_mds_docker_extra_env: -e CLUSTER={{ cluster }} -e MDS_NAME={{ ansible_hostname }}
#ceph_config_keys: [] # DON'T TOUCH ME
+
###########
# SYSTEMD #
###########
#ceph_mgr_docker_extra_env: -e CLUSTER={{ cluster }} -e MGR_NAME={{ ansible_hostname }}
#ceph_config_keys: [] # DON'T TOUCH ME
+
###########
# SYSTEMD #
###########
#mon_docker_net_host: true
#ceph_config_keys: [] # DON'T TOUCH ME
+
###########
# SYSTEMD #
###########
#ceph_osd_docker_extra_env: -e CLUSTER={{ cluster }} -e OSD_JOURNAL_SIZE={{ journal_size }}
#ceph_osd_docker_run_script_path: "/usr/share" # script called by systemd to run the docker command
+
###########
# SYSTEMD #
###########
#ceph_config_keys: [] # DON'T TOUCH ME
#rgw_config_keys: "/" # DON'T TOUCH ME
+
###########
# SYSTEMD #
###########
# GENERAL #
###########
-fetch_directory: ~/ceph-ansible-keys
+#fetch_directory: fetch/
# The 'cluster' variable determines the name of the cluster.
# Changing the default value to something else means that you will
# Commit 492518a2 changed variable names of rhcs installations
# to not break backward compatiblity we re-declare these variables
# with the content of the new variable
-ceph_rhcs: true
+#ceph_rhcs: "{{ ceph_stable_rh_storage | default(false) }}"
# This will affect how/what repositories are enabled depending on the desired
# version. The previous version was 1.3. The current version is 2.
#ceph_rhcs_version: "{{ ceph_stable_rh_storage_version | default(2) }}"
# For additional civetweb configuration options available such as SSL, logging,
# keepalive, and timeout settings, please see the civetweb docs at
# https://github.com/civetweb/civetweb/blob/master/docs/UserManual.md
-#radosgw_civetweb_options: "port={{ radosgw_civetweb_bind_ip }}:{{ radosgw_civetweb_port }} num_threads={{ radosgw_civetweb_num_threads }}"
+#radosgw_civetweb_options: "num_threads={{ radosgw_civetweb_num_threads }}"
+# You must define either radosgw_interface, radosgw_address.
+# These variables must be defined at least in all.yml and overrided if needed (inventory host file or group_vars/*.yml).
+# Eg. If you want to specify for each radosgw node which address the radosgw will bind to you can set it in your **inventory host file** by using 'radosgw_address' variable.
+# Preference will go to radosgw_address if both radosgw_address and radosgw_interface are defined.
+# To use an IPv6 address, use the radosgw_address setting instead (and set ip_version to ipv6)
+#radosgw_interface: interface
+#radosgw_address: 0.0.0.0
+#radosgw_address_block: []
#radosgw_keystone: false # activate OpenStack Keystone options full detail here: http://ceph.com/docs/master/radosgw/keystone/
# Rados Gateway options
#email_address: foo@bar.com
- monitor_interface == 'interface'
- monitor_address == "0.0.0.0"
- mon_group_name in group_names
+
+- name: make sure radosgw_interface or radosgw_address is defined
+ fail:
+ msg: "you must set radosgw_interface or radosgw_address"
+ when:
+ - radosgw_interface == 'interface'
+ - radosgw_address == "0.0.0.0"
+ - rgw_group_name in group_names
rgw socket path = /tmp/radosgw-{{ hostvars[host]['ansible_hostname'] }}.sock
log file = /var/log/ceph/{{ cluster }}-rgw-{{ hostvars[host]['ansible_hostname'] }}.log
rgw data = /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ hostvars[host]['ansible_hostname'] }}
-rgw frontends = civetweb port={{ radosgw_civetweb_bind_ip }}:{{ radosgw_civetweb_port }} num_threads={{ radosgw_civetweb_num_threads }}
+{% if radosgw_address_block | length > 0 %}
+ {% if ip_version == 'ipv4' -%}
+ rgw frontends = civetweb port={{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(radosgw_address_block) | first }}:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
+ {%- elif ip_version == 'ipv6' -%}
+ rgw frontends = civetweb port=[{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(radosgw_address_block) | first }}]:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
+ {%- endif %}
+{% elif hostvars[host]['radosgw_address'] is defined and hostvars[host]['radosgw_address'] != '0.0.0.0' -%}
+ {% if ip_version == 'ipv4' -%}
+ rgw frontends = civetweb port={{ hostvars[host]['radosgw_address'] }}:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
+ {%- elif ip_version == 'ipv6' -%}
+ rgw frontends = civetweb port=[{{ hostvars[host]['radosgw_address'] }}]:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
+ {% endif %}
+{%- else -%}
+ {% set interface = ["ansible_",radosgw_interface]|join %}
+ {% if ip_version == 'ipv6' -%}
+ rgw frontends = civetweb port=[{{ hostvars[host][interface][ip_version][0]['address'] }}]:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
+ {%- elif ip_version == 'ipv4' -%}
+ rgw frontends = civetweb port={{ hostvars[host][interface][ip_version]['address'] }}:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
+ {% endif %}
+{%- endif %}
{% endif %}
{% endfor %}
{% endif %}
# For additional civetweb configuration options available such as SSL, logging,
# keepalive, and timeout settings, please see the civetweb docs at
# https://github.com/civetweb/civetweb/blob/master/docs/UserManual.md
-radosgw_civetweb_options: "port={{ radosgw_civetweb_bind_ip }}:{{ radosgw_civetweb_port }} num_threads={{ radosgw_civetweb_num_threads }}"
+radosgw_civetweb_options: "num_threads={{ radosgw_civetweb_num_threads }}"
+# You must define either radosgw_interface, radosgw_address.
+# These variables must be defined at least in all.yml and overrided if needed (inventory host file or group_vars/*.yml).
+# Eg. If you want to specify for each radosgw node which address the radosgw will bind to you can set it in your **inventory host file** by using 'radosgw_address' variable.
+# Preference will go to radosgw_address if both radosgw_address and radosgw_interface are defined.
+# To use an IPv6 address, use the radosgw_address setting instead (and set ip_version to ipv6)
+radosgw_interface: interface
+radosgw_address: 0.0.0.0
+radosgw_address_block: []
radosgw_keystone: false # activate OpenStack Keystone options full detail here: http://ceph.com/docs/master/radosgw/keystone/
# Rados Gateway options
email_address: foo@bar.com
ceph_stable: True
cluster: test
monitor_interface: eth1
+radosgw_interface: eth1
public_network: "192.168.1.0/24"
cluster_network: "192.168.2.0/24"
journal_size: 100
cluster_network: "192.168.12.0/24"
journal_size: 100
monitor_interface: eth1
+radosgw_interface: eth1
osd_scenario: non-collocated
dmcrypt: true
osd_objectstore: "bluestore"
cluster_network: "192.168.14.0/24"
journal_size: 100
monitor_interface: eth1
+radosgw_interface: eth1
osd_scenario: collocated
dmcrypt: true
osd_objectstore: "bluestore"
cluster_network: "192.168.24.0/24"
journal_size: 100
monitor_interface: eth1
+radosgw_interface: eth1
osd_scenario: collocated
dmcrypt: true
osd_objectstore: "bluestore"
containerized_deployment: True
cluster: test
monitor_interface: eth1
+radosgw_interface: eth1
ceph_mon_docker_subnet: "{{ public_network }}"
journal_size: 100
ceph_docker_on_openstack: False
containerized_deployment: True
cluster: test
monitor_interface: eth1
+radosgw_interface: eth1
ceph_mon_docker_subnet: "{{ public_network }}"
journal_size: 100
ceph_docker_on_openstack: False
ceph_stable: True
cluster: test
monitor_interface: eth1
+radosgw_interface: eth1
public_network: "192.168.3.0/24"
cluster_network: "192.168.4.0/24"
journal_size: 100
public_network: "192.168.1.0/24"
cluster_network: "192.168.2.0/24"
journal_size: 100
+radosgw_interface: eth1
osd_objectstore: "filestore"
devices:
- '/dev/sda'
cluster_network: "192.168.12.0/24"
journal_size: 100
monitor_interface: eth1
+radosgw_interface: eth1
osd_scenario: non-collocated
osd_objectstore: "filestore"
devices:
cluster_network: "192.168.14.0/24"
journal_size: 100
monitor_interface: eth1
+radosgw_interface: eth1
osd_scenario: collocated
osd_objectstore: "filestore"
devices:
containerized_deployment: True
cluster: ceph
monitor_interface: eth1
+radosgw_interface: eth1
ceph_mon_docker_subnet: "{{ public_network }}"
journal_size: 100
ceph_docker_on_openstack: False
containerized_deployment: True
cluster: test
monitor_interface: eth1
+radosgw_interface: eth1
ceph_mon_docker_subnet: "{{ public_network }}"
journal_size: 100
ceph_docker_on_openstack: False
containerized_deployment: True
cluster: test
monitor_interface: eth1
+radosgw_interface: eth1
ceph_mon_docker_subnet: "{{ public_network }}"
journal_size: 100
ceph_docker_on_openstack: False
public_network: "192.168.3.0/24"
cluster_network: "192.168.4.0/24"
monitor_interface: eth1
+radosgw_interface: eth1
journal_size: 100
osd_objectstore: "filestore"
devices:
public_network: "192.168.3.0/24"
cluster_network: "192.168.4.0/24"
monitor_interface: eth1
+radosgw_interface: eth1
journal_size: 100
osd_objectstore: "filestore"
osd_scenario: lvm
public_network: "192.168.5.0/24"
cluster_network: "192.168.6.0/24"
monitor_interface: eth1
+radosgw_interface: eth1
journal_size: 100
devices:
- '/dev/sdb'