rgw: container add option to configure multi-site zone

You can now use RGW_ZONE and RGW_ZONEGROUP on each rgw host from your
inventory and assign them a value. Once the rgw container starts it'll
pick the info and add itself to the right zone.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1551637
Signed-off-by: Sébastien Han <seb@redhat.com>
pull/2645/head
Sébastien Han 2018-04-16 15:57:23 +02:00
parent 828848017c
commit 1c084efb3c
5 changed files with 40 additions and 7 deletions

View File

@ -24,9 +24,9 @@ dummy:
#rgw_pull_proto: "http"
########
#TUNING#
########
##########
# TUNING #
##########
# To support buckets with a very large number of objects it's
# important to split them into shards. We suggest about 100K
@ -67,6 +67,14 @@ dummy:
#rgw_config_keys: "/" # DON'T TOUCH ME
#############
# MULTISITE #
#############
#rgw_multisite: false
#rgw_zonegroup: ""
#rgw_zone: ""
###########
# SYSTEMD #
###########

View File

@ -16,9 +16,9 @@ rgw_pull_port: "{{ radosgw_civetweb_port }}"
rgw_pull_proto: "http"
########
#TUNING#
########
##########
# TUNING #
##########
# To support buckets with a very large number of objects it's
# important to split them into shards. We suggest about 100K
@ -59,6 +59,14 @@ ceph_config_keys: [] # DON'T TOUCH ME
rgw_config_keys: "/" # DON'T TOUCH ME
#############
# MULTISITE #
#############
rgw_multisite: false
rgw_zonegroup: ""
rgw_zone: ""
###########
# SYSTEMD #
###########

View File

@ -0,0 +1,12 @@
---
- name: set_fact docker_env_args '-e RGW_ZONEGROUP={{ rgw_zonegroup }}'
set_fact:
docker_env_args: -e RGW_ZONEGROUP={{ rgw_zonegroup }}
when:
- rgw_zonegroup != ""
- name: set_fact docker_env_args '-e RGW_ZONE={{ rgw_zone }}'
set_fact:
docker_env_args: "{{ docker_env_args | default ('') }} -e RGW_ZONE={{ rgw_zone }}"
when:
- rgw_zone != ""

View File

@ -1,3 +1,8 @@
---
- name: include container_env_facts.yml
include: container_env_facts.yml
when:
- containerized_deployment
- name: include start_docker_rgw.yml
include: start_docker_rgw.yml

View File

@ -38,7 +38,7 @@
- name: include multisite/main.yml
include: multisite/main.yml
when:
- rgw_zone is defined
- rgw_zone != ""
- rgw_multisite
- ceph_release_num[ceph_release] >= ceph_release_num.jewel
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)