rgw: multisite refact

wip

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
guits-multisite
Guillaume Abrioux 2021-01-14 17:52:39 +01:00
parent e66f12d138
commit f9969c29b3
20 changed files with 216 additions and 152 deletions

View File

@ -2,38 +2,32 @@
- name: set_fact realms - name: set_fact realms
set_fact: set_fact:
realms: '{{ realms | default([]) | union([item.rgw_realm]) }}' realms: '{{ realms | default([]) | union([item.rgw_realm]) }}'
loop: "{{ rgw_instances_all }}" loop: "{{ rgw_instances }}"
run_once: true
- name: create list secondary_realms - name: create list secondary_realms
set_fact: set_fact:
secondary_realms: "{{ secondary_realms | default([]) | union([{ 'realm': item.rgw_realm, 'endpoint': item.endpoint, 'system_access_key': item.system_access_key, 'system_secret_key': item.system_secret_key, 'is_master': hostvars[item.host]['rgw_zonemaster'] }]) }}" secondary_realms: "{{ secondary_realms | default([]) | union([{ 'realm': item.rgw_realm, 'endpoint': item.endpoint, 'system_access_key': item.system_access_key, 'system_secret_key': item.system_secret_key, 'is_master': item.rgw_zonemaster | default(hostvars[inventory_hostname]['rgw_zonemaster']) }]) }}"
loop: "{{ rgw_instances_all }}" loop: "{{ rgw_instances }}"
run_once: true when: not item.rgw_zonemaster | default(hostvars[inventory_hostname]['rgw_zonemaster']) | bool
when: not hostvars[item.host]['rgw_zonemaster'] | bool
- name: create list zonegroups - name: create list zonegroups
set_fact: set_fact:
zonegroups: "{{ zonegroups | default([]) | union([{ 'realm': item.rgw_realm, 'zonegroup': item.rgw_zonegroup, 'is_master': hostvars[item.host]['rgw_zonegroupmaster'] }]) }}" zonegroups: "{{ zonegroups | default([]) | union([{ 'realm': item.rgw_realm, 'zonegroup': item.rgw_zonegroup, 'is_master': item.rgw_zonegroupmaster | default(hostvars[inventory_hostname]['rgw_zonegroupmaster']) }]) }}"
loop: "{{ rgw_instances_all }}" loop: "{{ rgw_instances }}"
run_once: true
when: when:
- hostvars[item.host]['rgw_zonemaster'] | bool - item.rgw_zonemaster | default(hostvars[inventory_hostname]['rgw_zonemaster']) | bool
- name: create list zones - name: create list zones
set_fact: set_fact:
zones: "{{ zones | default([]) | union([{ 'realm': item.rgw_realm, 'zonegroup': item.rgw_zonegroup, 'zone': item.rgw_zone, 'is_master': hostvars[item.host]['rgw_zonemaster'], 'system_access_key': item.system_access_key, 'system_secret_key': item.system_secret_key }]) }}" zones: "{{ zones | default([]) | union([{ 'realm': item.rgw_realm, 'zonegroup': item.rgw_zonegroup, 'zone': item.rgw_zone, 'is_master': item.rgw_zonemaster | default(hostvars[inventory_hostname]['rgw_zonemaster']), 'system_access_key': item.system_access_key, 'system_secret_key': item.system_secret_key }]) }}"
loop: "{{ rgw_instances_all }}" loop: "{{ rgw_instances }}"
run_once: true
- name: create a list of dicts with each rgw endpoint and it's zone - name: create a list of dicts with each rgw endpoint and it's zone
set_fact: set_fact:
zone_endpoint_pairs: "{{ zone_endpoint_pairs | default([]) | union([{ 'endpoint': hostvars[item.host]['rgw_multisite_proto'] + '://' + item.radosgw_address + ':' + item.radosgw_frontend_port | string, 'rgw_zone': item.rgw_zone, 'rgw_realm': item.rgw_realm, 'rgw_zonegroup': item.rgw_zonegroup, 'rgw_zonemaster': hostvars[item.host]['rgw_zonemaster']}]) }}" zone_endpoint_pairs: "{{ zone_endpoint_pairs | default([]) | union([{ 'endpoint': item.rgw_multisite_proto | default(hostvars[inventory_hostname]['rgw_multisite_proto']) + '://' + item.radosgw_address + ':' + item.radosgw_frontend_port | string, 'rgw_zone': item.rgw_zone, 'rgw_realm': item.rgw_realm, 'rgw_zonegroup': item.rgw_zonegroup, 'rgw_zonemaster': item.rgw_zonemaster | default(hostvars[inventory_hostname]['rgw_zonemaster'])}]) }}"
loop: "{{ rgw_instances_all }}" loop: "{{ rgw_instances }}"
run_once: true
- name: create a list of zones and all their endpoints - name: create a list of zones and all their endpoints
set_fact: set_fact:
zone_endpoints_list: "{{ zone_endpoints_list | default([]) | union([{'zone': item.rgw_zone, 'zonegroup': item.rgw_zonegroup, 'realm': item.rgw_realm, 'is_master': item.rgw_zonemaster, 'endpoints': ','.join(zone_endpoint_pairs | selectattr('rgw_zone','match','^'+item.rgw_zone+'$') | selectattr('rgw_realm','match','^'+item.rgw_realm+'$') | selectattr('rgw_zonegroup', 'match','^'+item.rgw_zonegroup+'$') | map(attribute='endpoint'))}]) }}" zone_endpoints_list: "{{ zone_endpoints_list | default([]) | union([{'zone': item.rgw_zone, 'zonegroup': item.rgw_zonegroup, 'realm': item.rgw_realm, 'is_master': item.rgw_zonemaster, 'endpoints': ','.join(zone_endpoint_pairs | selectattr('rgw_zone','match','^'+item.rgw_zone+'$') | selectattr('rgw_realm','match','^'+item.rgw_realm+'$') | selectattr('rgw_zonegroup', 'match','^'+item.rgw_zonegroup+'$') | map(attribute='endpoint'))}]) }}"
loop: "{{ zone_endpoint_pairs }}" loop: "{{ zone_endpoint_pairs }}"
run_once: true

View File

@ -2,11 +2,10 @@
- name: create list zone_users - name: create list zone_users
set_fact: set_fact:
zone_users: "{{ zone_users | default([]) | union([{ 'realm': item.rgw_realm, 'zonegroup': item.rgw_zonegroup, 'zone': item.rgw_zone, 'system_access_key': item.system_access_key, 'system_secret_key': item.system_secret_key, 'user': item.rgw_zone_user, 'display_name': item.rgw_zone_user_display_name }]) }}" zone_users: "{{ zone_users | default([]) | union([{ 'realm': item.rgw_realm, 'zonegroup': item.rgw_zonegroup, 'zone': item.rgw_zone, 'system_access_key': item.system_access_key, 'system_secret_key': item.system_secret_key, 'user': item.rgw_zone_user, 'display_name': item.rgw_zone_user_display_name }]) }}"
loop: "{{ rgw_instances_all }}" loop: "{{ rgw_instances }}"
run_once: true
when: when:
- hostvars[item.host]['rgw_zonemaster'] | bool - item.rgw_zonemaster | default(hostvars[inventory_hostname]['rgw_zonemaster']) | bool
- hostvars[item.host]['rgw_zonegroupmaster'] | bool - item.rgw_zonegroupmaster | default(hostvars[inventory_hostname]['rgw_zonegroupmaster']) | bool
- name: create the zone user(s) - name: create the zone user(s)
radosgw_user: radosgw_user:
@ -20,7 +19,6 @@
zone: "{{ item.zone }}" zone: "{{ item.zone }}"
system: true system: true
delegate_to: "{{ groups[mon_group_name][0] }}" delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: true
loop: "{{ zone_users }}" loop: "{{ zone_users }}"
environment: environment:
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}" CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"

View File

@ -1,44 +1,32 @@
--- ---
- name: include_tasks create_realm_zonegroup_zone_lists.yml
include_tasks: create_realm_zonegroup_zone_lists.yml
# Include the tasks depending on the zone type # Include the tasks depending on the zone type
- name: include_tasks master.yml - name: include_tasks master.yml
include_tasks: master.yml include_tasks: master.yml
loop: "{{ rgw_instances }}"
loop_control:
loop_var: outer_item
when: when:
- rgw_zonemaster | bool - outer_item.rgw_zonemaster | default(rgw_zonemaster) | bool
- not rgw_zonesecondary | bool - not outer_item.rgw_zonesecondary | default(rgw_zonesecondary) | bool
- name: include_tasks start_radosgw.yml for zonemaster rgws
include_tasks: ../start_radosgw.yml
when:
- rgw_zonemaster | bool
- not rgw_zonesecondary | bool
- not containerized_deployment | bool
- name: include_tasks start_docker_rgw.yml for zonemaster rgws
include_tasks: ../start_docker_rgw.yml
when:
- rgw_zonemaster | bool
- not rgw_zonesecondary | bool
- containerized_deployment | bool
- name: include_tasks secondary.yml - name: include_tasks secondary.yml
include_tasks: secondary.yml include_tasks: secondary.yml
loop: "{{ rgw_instances }}"
loop_control:
loop_var: outer_item
when: when:
- not rgw_zonemaster | bool - not outer_item.rgw_zonemaster | default(rgw_zonemaster) | bool
- rgw_zonesecondary | bool - outer_item.rgw_zonesecondary | default(rgw_zonesecondary) | bool
- name: include_tasks start_radosgw.yml for zonesecondary rgws - name: include_tasks start_radosgw.yml
include_tasks: ../start_radosgw.yml include_tasks: ../start_radosgw.yml
with_items: "{{ rgw_instances }}"
when: when:
- not rgw_zonemaster | bool
- rgw_zonesecondary | bool
- not containerized_deployment | bool - not containerized_deployment | bool
- name: include_tasks start_docker_rgw.yml for zonesecondary rgws - name: include_tasks start_docker_rgw.yml
include_tasks: ../start_docker_rgw.yml include_tasks: ../start_docker_rgw.yml
with_items: "{{ rgw_instances }}"
when: when:
- not rgw_zonemaster | bool
- rgw_zonesecondary | bool
- containerized_deployment | bool - containerized_deployment | bool

View File

@ -1,4 +1,7 @@
--- ---
- name: include_tasks create_realm_zonegroup_zone_lists.yml
include_tasks: create_realm_zonegroup_zone_lists.yml
- name: create the realm(s) - name: create the realm(s)
radosgw_realm: radosgw_realm:
name: "{{ item }}" name: "{{ item }}"

View File

@ -1,73 +1,73 @@
--- ---
- name: ensure connection to primary cluster from mon - name: include_tasks create_realm_zonegroup_zone_lists.yml
uri: include_tasks: create_realm_zonegroup_zone_lists.yml
url: "{{ item.endpoint }}"
delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: true
loop: "{{ secondary_realms }}"
when: secondary_realms is defined
- name: ensure connection to primary cluster from rgw - name: ensure connection to primary cluster from rgw
uri: uri:
url: "{{ item.endpoint }}" url: "{{ outer_item.endpoint }}"
loop: "{{ rgw_instances }}" timeout: 3600
- name: fetch the realm(s)
command: "{{ container_exec_cmd }} radosgw-admin realm pull --cluster={{ cluster }} --rgw-realm={{ item.realm }} --url={{ item.endpoint }} --access-key={{ item.system_access_key }} --secret={{ item.system_secret_key }}"
delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: true run_once: true
loop: "{{ secondary_realms }}" failed_when: false
register: test_endpoints_from_rgw
when: secondary_realms is defined when: secondary_realms is defined
- name: get the period(s) - name: apply rgw multisite configuration on secondary instances
command: "{{ container_exec_cmd }} radosgw-admin period get --cluster={{ cluster }} --rgw-realm={{ item.realm }}" when: test_endpoints_from_rgw.status == 200
delegate_to: "{{ groups[mon_group_name][0] }}" block:
run_once: true - name: fetch the realm(s)
loop: "{{ secondary_realms }}" command: "{{ container_exec_cmd }} radosgw-admin realm pull --cluster={{ cluster }} --rgw-realm={{ outer_item.rgw_realm }} --url={{ outer_item.endpoint }} --access-key={{ outer_item.system_access_key }} --secret={{ outer_item.system_secret_key }}"
when: secondary_realms is defined delegate_to: "{{ groups[mon_group_name][0] }}"
when:
- test_endpoints_from_rgw.status == 200
- secondary_realms is defined
- name: create the zone(s) - name: get the period(s)
radosgw_zone: command: "{{ container_exec_cmd }} radosgw-admin period get --cluster={{ cluster }} --rgw-realm={{ outer_item.rgw_realm }}"
name: "{{ item.zone }}" delegate_to: "{{ groups[mon_group_name][0] }}"
cluster: "{{ cluster }}" when: secondary_realms is defined
realm: "{{ item.realm }}"
zonegroup: "{{ item.zonegroup }}"
access_key: "{{ item.system_access_key }}"
secret_key: "{{ item.system_secret_key }}"
default: "{{ true if zones | length == 1 else false }}"
master: false
delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: true
loop: "{{ zones }}"
when:
- zones is defined
- not item.is_master | bool
environment:
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
- name: add endpoints to their zone(s) - name: create the zone(s)
radosgw_zone: radosgw_zone:
name: "{{ item.zone }}" name: "{{ item.zone }}"
cluster: "{{ cluster }}" cluster: "{{ cluster }}"
realm: "{{ item.realm }}" realm: "{{ item.realm }}"
zonegroup: "{{ item.zonegroup }}" zonegroup: "{{ item.zonegroup }}"
endpoints: "{{ item.endpoints.split(',') }}" access_key: "{{ item.system_access_key }}"
delegate_to: "{{ groups[mon_group_name][0] }}" secret_key: "{{ item.system_secret_key }}"
run_once: true default: "{{ true if zones | length == 1 else false }}"
loop: "{{ zone_endpoints_list }}" master: false
when: delegate_to: "{{ groups[mon_group_name][0] }}"
- zone_endpoints_list is defined run_once: true
- not item.is_master | bool loop: "{{ zones }}"
environment: when:
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}" - zones is defined
CEPH_CONTAINER_BINARY: "{{ container_binary }}" - not item.is_master | bool
environment:
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
- name: update period for zone creation - name: add endpoints to their zone(s)
command: "{{ container_exec_cmd }} radosgw-admin --cluster={{ cluster }} --rgw-realm={{ item.realm }} --rgw-zonegroup={{ item.zonegroup }} --rgw-zone={{ item.zone }} period update --commit" radosgw_zone:
delegate_to: "{{ groups[mon_group_name][0] }}" name: "{{ item.zone }}"
run_once: true cluster: "{{ cluster }}"
loop: "{{ zone_endpoints_list }}" realm: "{{ item.realm }}"
when: zonegroup: "{{ item.zonegroup }}"
- zone_endpoints_list is defined endpoints: "{{ item.endpoints.split(',') }}"
- not item.is_master | bool delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: true
loop: "{{ zone_endpoints_list }}"
when:
- zone_endpoints_list is defined
- not item.is_master | bool
environment:
CEPH_CONTAINER_IMAGE: "{{ ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else None }}"
CEPH_CONTAINER_BINARY: "{{ container_binary }}"
- name: update period for zone creation
command: "{{ container_exec_cmd }} radosgw-admin --cluster={{ cluster }} --rgw-realm={{ item.realm }} --rgw-zonegroup={{ item.zonegroup }} --rgw-zone={{ item.zone }} period update --commit"
delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: true
loop: "{{ zone_endpoints_list }}"
when:
- zone_endpoints_list is defined
- not item.is_master | bool

View File

@ -20,6 +20,10 @@
enabled: yes enabled: yes
masked: no masked: no
with_items: "{{ rgw_instances }}" with_items: "{{ rgw_instances }}"
when:
- not rgw_multisite | bool or
((rgw_multisite | bool and item.rgw_zonesecondary | default(rgw_zonesecondary) | bool and test_endpoints_from_rgw.status == 200) or
(rgw_multisite | bool and item.rgw_zonemaster | default(rgw_zonemaster)))
- name: enable the ceph-radosgw.target service - name: enable the ceph-radosgw.target service
systemd: systemd:

View File

@ -8,14 +8,16 @@
- name: fail if either rgw_zonemaster or rgw_zonesecondary is undefined - name: fail if either rgw_zonemaster or rgw_zonesecondary is undefined
fail: fail:
msg: "rgw_zonemaster and rgw_zonesecondary must be defined" msg: "rgw_zonemaster and rgw_zonesecondary must be defined"
when: rgw_zonemaster is undefined or rgw_zonesecondary is undefined loop: "{{ rgw_instances }}"
when: item.rgw_zonemaster | default(rgw_zonemaster) is undefined or item.rgw_zonesecondary | default(rgw_zonesecondary) is undefined
- name: fail if rgw_zonemaster and rgw_zonesecondary are both true - name: fail if rgw_zonemaster and rgw_zonesecondary are both true
fail: fail:
msg: "rgw_zonemaster and rgw_zonesecondary cannot both be true" msg: "rgw_zonemaster and rgw_zonesecondary cannot both be true"
loop: "{{ rgw_instances }}"
when: when:
- rgw_zonemaster | bool - item.rgw_zonemaster | default(rgw_zonemaster) | bool
- rgw_zonesecondary | bool - item.rgw_zonesecondary | default(rgw_zonesecondary) | bool
- name: fail if rgw_zonegroup is not set - name: fail if rgw_zonegroup is not set
fail: fail:
@ -58,6 +60,7 @@
msg: "endpoint has not been set by the user" msg: "endpoint has not been set by the user"
loop: "{{ rgw_instances }}" loop: "{{ rgw_instances }}"
when: when:
- rgw_zonesecondary | bool - item.rgw_zonesecondary | default(rgw_zonesecondary) | bool
- rgw_pull_port is undefined and rgw_pullhost is undefined and rgw_pull_proto is undefined - rgw_pull_port is undefined and rgw_pullhost is undefined and item.rgw_pull_proto | default(rgw_pull_proto) is undefined
- item.endpoint is undefined - item.endpoint is undefined

View File

@ -1,6 +1,6 @@
--- ---
ceph_origin: repository ceph_origin: repository
ceph_repository: community ceph_repository: dev
cluster: ceph cluster: ceph
public_network: "192.168.101.0/24" public_network: "192.168.101.0/24"
cluster_network: "192.168.102.0/24" cluster_network: "192.168.102.0/24"

View File

@ -10,7 +10,3 @@ rgw_create_pools:
pg_num: 16 pg_num: 16
rgw_override_bucket_index_max_shards: 16 rgw_override_bucket_index_max_shards: 16
rgw_bucket_default_quota_max_objects: 1638400 rgw_bucket_default_quota_max_objects: 1638400
rgw_zonemaster: True
rgw_zonesecondary: False
rgw_zonegroupmaster: True
rgw_multisite_proto: http

View File

@ -1,8 +1,12 @@
rgw_instances: rgw_instances:
- instance_name: 'rgw0' - instance_name: 'rgw0'
rgw_realm: 'france' rgw_zonemaster: True
rgw_zonegroup: 'idf' rgw_zonesecondary: False
rgw_zone: 'paris' rgw_zonegroupmaster: True
rgw_multisite_proto: http
rgw_realm: 'realm0'
rgw_zonegroup: 'zonegroup0'
rgw_zone: 'las_vegas'
radosgw_address: "{{ _radosgw_address }}" radosgw_address: "{{ _radosgw_address }}"
radosgw_frontend_port: 8080 radosgw_frontend_port: 8080
rgw_zone_user: jacques.chirac rgw_zone_user: jacques.chirac
@ -10,15 +14,20 @@ rgw_instances:
system_access_key: P9Eb6S8XNyo4dtZZUUMy system_access_key: P9Eb6S8XNyo4dtZZUUMy
system_secret_key: qqHCUtfdNnpHq3PZRHW5un9l0bEBM812Uhow0XfB system_secret_key: qqHCUtfdNnpHq3PZRHW5un9l0bEBM812Uhow0XfB
- instance_name: 'rgw1' - instance_name: 'rgw1'
rgw_realm: 'usa' rgw_zonemaster: false
rgw_zonegroup: 'alaska' rgw_zonesecondary: true
rgw_zone: 'juneau' rgw_zonegroupmaster: True
rgw_multisite_proto: http
rgw_realm: 'realm1'
rgw_zonegroup: 'zonegroup1'
rgw_zone: 'las_vegas'
radosgw_address: "{{ _radosgw_address }}" radosgw_address: "{{ _radosgw_address }}"
radosgw_frontend_port: 8081 radosgw_frontend_port: 8081
rgw_zone_user: edward.lewis rgw_zone_user: edward.lewis
rgw_zone_user_display_name: "Edward Lewis" rgw_zone_user_display_name: "Edward Lewis"
system_access_key: yu17wkvAx3B8Wyn08XoF system_access_key: yu17wkvAx3B8Wyn08XoF
system_secret_key: 5YZfaSUPqxSNIkZQQA3lBZ495hnIV6k2HAz710BY system_secret_key: 5YZfaSUPqxSNIkZQQA3lBZ495hnIV6k2HAz710BY
endpoint: http://192.168.103.12:8081
# functional testing # functional testing
rgw_multisite_endpoint_addr: 192.168.101.11 rgw_multisite_endpoint_addr: 192.168.101.12
radosgw_num_instances: 2 radosgw_num_instances: 2

View File

@ -0,0 +1,28 @@
rgw_zonemaster: true
rgw_zonesecondary: false
rgw_zonegroupmaster: true
rgw_multisite_proto: http
rgw_instances:
- instance_name: 'rgw0'
rgw_realm: 'foo'
rgw_zonegroup: 'zonegroup2'
rgw_zone: 'gotham_city'
radosgw_address: "{{ _radosgw_address }}"
radosgw_frontend_port: 8080
rgw_zone_user: batman
rgw_zone_user_display_name: "Batman"
system_access_key: 9WA1GN33IUYC717S8KB2
system_secret_key: R2vWXyboYw9nluehMgtATBGDBZSuWLnR0M4xNa1W
- instance_name: 'rgw1'
rgw_realm: 'bar'
rgw_zonegroup: 'zonegroup3'
rgw_zone: 'metropolis'
radosgw_address: "{{ _radosgw_address }}"
radosgw_frontend_port: 8081
rgw_zone_user: superman
rgw_zone_user_display_name: "Superman"
system_access_key: S96CJL44E29AN91Y3ZC5
system_secret_key: ha7yWiIi7bSV2vAqMBfKjYIVKMfOBaGkWrUZifRt
# functional testing
rgw_multisite_endpoint_addr: 192.168.101.11
radosgw_num_instances: 2

View File

@ -3,6 +3,8 @@ mon0
[osds] [osds]
osd0 osd0
osd1
[rgws] [rgws]
osd0 osd0
rgw0

View File

@ -1,6 +1,6 @@
--- ---
ceph_origin: repository ceph_origin: repository
ceph_repository: community ceph_repository: dev
cluster: ceph cluster: ceph
public_network: "192.168.103.0/24" public_network: "192.168.103.0/24"
cluster_network: "192.168.104.0/24" cluster_network: "192.168.104.0/24"

View File

@ -9,7 +9,7 @@ rgw_create_pools:
pg_num: 16 pg_num: 16
rgw_override_bucket_index_max_shards: 16 rgw_override_bucket_index_max_shards: 16
rgw_bucket_default_quota_max_objects: 1638400 rgw_bucket_default_quota_max_objects: 1638400
rgw_zonemaster: False #rgw_zonemaster: False
rgw_zonesecondary: True #rgw_zonesecondary: True
rgw_zonegroupmaster: True #rgw_zonegroupmaster: True
rgw_multisite_proto: http #rgw_multisite_proto: http

View File

@ -1,26 +1,33 @@
rgw_instances: rgw_instances:
- instance_name: 'rgw0' - instance_name: 'rgw0'
rgw_realm: 'france' rgw_zonemaster: false
rgw_zonegroup: 'idf' rgw_zonesecondary: true
rgw_zone: 'versailles' rgw_zonegroupmaster: True
rgw_multisite_proto: http
rgw_realm: 'realm1'
rgw_zonegroup: 'zonegroup1'
rgw_zone: 'paris'
radosgw_address: "{{ _radosgw_address }}" radosgw_address: "{{ _radosgw_address }}"
radosgw_frontend_port: 8080 radosgw_frontend_port: 8080
rgw_zone_user: jacques.chirac rgw_zone_user: jacques.chirac
rgw_zone_user_display_name: "Jacques Chirac" rgw_zone_user_display_name: "Jacques Chirac"
system_access_key: P9Eb6S8XNyo4dtZZUUMy system_access_key: P9Eb6S8XNyo4dtZZUUMy
system_secret_key: qqHCUtfdNnpHq3PZRHW5un9l0bEBM812Uhow0XfB system_secret_key: qqHCUtfdNnpHq3PZRHW5un9l0bEBM812Uhow0XfB
endpoint: http://192.168.101.11:8080 endpoint: http://192.168.101.12:8080
- instance_name: 'rgw1' - instance_name: 'rgw1'
rgw_realm: 'usa' rgw_zonemaster: True
rgw_zonegroup: 'alaska' rgw_zonesecondary: False
rgw_zone: 'anchorage' rgw_zonegroupmaster: True
rgw_multisite_proto: http
rgw_realm: 'realm0'
rgw_zonegroup: 'zonegroup0'
rgw_zone: 'paris'
radosgw_address: "{{ _radosgw_address }}" radosgw_address: "{{ _radosgw_address }}"
radosgw_frontend_port: 8081 radosgw_frontend_port: 8081
rgw_zone_user: edward.lewis rgw_zone_user: edward.lewis
rgw_zone_user_display_name: "Edward Lewis" rgw_zone_user_display_name: "Edward Lewis"
system_access_key: yu17wkvAx3B8Wyn08XoF system_access_key: yu17wkvAx3B8Wyn08XoF
system_secret_key: 5YZfaSUPqxSNIkZQQA3lBZ495hnIV6k2HAz710BY system_secret_key: 5YZfaSUPqxSNIkZQQA3lBZ495hnIV6k2HAz710BY
endpoint: http://192.168.101.11:8081
# functional testing # functional testing
rgw_multisite_endpoint_addr: 192.168.103.11 rgw_multisite_endpoint_addr: 192.168.103.12
radosgw_num_instances: 2 radosgw_num_instances: 2

View File

@ -0,0 +1,30 @@
rgw_zonemaster: false
rgw_zonesecondary: true
rgw_zonegroupmaster: true
rgw_multisite_proto: http
rgw_instances:
- instance_name: 'rgw0'
rgw_realm: 'foo'
rgw_zonegroup: 'zonegroup2'
rgw_zone: 'paris'
radosgw_address: "{{ _radosgw_address }}"
radosgw_frontend_port: 8080
rgw_zone_user: batman
rgw_zone_user_display_name: "Batman"
system_access_key: 9WA1GN33IUYC717S8KB2
system_secret_key: R2vWXyboYw9nluehMgtATBGDBZSuWLnR0M4xNa1W
endpoint: http://192.168.101.11:8080
- instance_name: 'rgw1'
rgw_realm: 'bar'
rgw_zonegroup: 'zonegroup3'
rgw_zone: 'paris'
radosgw_address: "{{ _radosgw_address }}"
radosgw_frontend_port: 8081
rgw_zone_user: superman
rgw_zone_user_display_name: "Superman"
system_access_key: S96CJL44E29AN91Y3ZC5
system_secret_key: ha7yWiIi7bSV2vAqMBfKjYIVKMfOBaGkWrUZifRt
endpoint: http://192.168.101.11:8081
# functional testing
rgw_multisite_endpoint_addr: 192.168.103.11
radosgw_num_instances: 2

View File

@ -3,6 +3,8 @@ mon0
[osds] [osds]
osd0 osd0
osd1
[rgws] [rgws]
osd0 osd0
rgw0

View File

@ -5,9 +5,9 @@ docker: false
# DEFINE THE NUMBER OF VMS TO RUN # DEFINE THE NUMBER OF VMS TO RUN
mon_vms: 1 mon_vms: 1
osd_vms: 1 osd_vms: 2
mds_vms: 0 mds_vms: 0
rgw_vms: 0 rgw_vms: 1
nfs_vms: 0 nfs_vms: 0
grafana_server_vms: 0 grafana_server_vms: 0
rbd_mirror_vms: 0 rbd_mirror_vms: 0

View File

@ -5,9 +5,9 @@ docker: false
# DEFINE THE NUMBER OF VMS TO RUN # DEFINE THE NUMBER OF VMS TO RUN
mon_vms: 1 mon_vms: 1
osd_vms: 1 osd_vms: 2
mds_vms: 0 mds_vms: 0
rgw_vms: 0 rgw_vms: 1
nfs_vms: 0 nfs_vms: 0
grafana_server_vms: 0 grafana_server_vms: 0
rbd_mirror_vms: 0 rbd_mirror_vms: 0

View File

@ -40,7 +40,7 @@
s3cmd --no-ssl --access_key={{ item.system_access_key }} --secret_key={{ item.system_secret_key }} --host={{ item.radosgw_address }}:{{ item.radosgw_frontend_port }} --host-bucket={{ item.radosgw_address }}:{{ item.radosgw_frontend_port }} put /tmp/testinfra-{{ item.rgw_realm }}.img s3://testinfra-{{ item.rgw_realm }}; s3cmd --no-ssl --access_key={{ item.system_access_key }} --secret_key={{ item.system_secret_key }} --host={{ item.radosgw_address }}:{{ item.radosgw_frontend_port }} --host-bucket={{ item.radosgw_address }}:{{ item.radosgw_frontend_port }} put /tmp/testinfra-{{ item.rgw_realm }}.img s3://testinfra-{{ item.rgw_realm }};
with_items: "{{ rgw_instances_host }}" with_items: "{{ rgw_instances_host }}"
when: when:
- rgw_zonemaster | bool - item.rgw_zonemaster | default(rgw_zonemaster) | bool
- not containerized_deployment | bool - not containerized_deployment | bool
- name: get info from replicated file - containerized deployment - name: get info from replicated file - containerized deployment
@ -64,5 +64,5 @@
delay: 1 delay: 1
until: result is succeeded until: result is succeeded
when: when:
- not rgw_zonemaster | bool - not item.rgw_zonemaster | default(rgw_zonemaster) | bool
- not containerized_deployment | bool - not containerized_deployment | bool