Browse Source

Merge "Enable Ceph RGW 'account in url' option" into stable/queens

changes/25/707825/1
Zuul 1 week ago
parent
commit
af178417ba
4 changed files with 135 additions and 72 deletions
  1. +1
    -0
      docker/services/ceph-ansible/ceph-base.yaml
  2. +53
    -0
      docker/services/ceph-ansible/ceph-rgw.yaml
  3. +3
    -3
      network/endpoints/endpoint_data.yaml
  4. +78
    -69
      network/endpoints/endpoint_map.yaml

+ 1
- 0
docker/services/ceph-ansible/ceph-base.yaml View File

@@ -235,6 +235,7 @@ resources:
rgw_keystone_implicit_tenants: 'true'
rgw_keystone_revocation_interval: '0'
rgw_s3_auth_use_keystone: 'true'
rgw_swift_account_in_url: 'true'

outputs:
role_data:

+ 53
- 0
docker/services/ceph-ansible/ceph-rgw.yaml View File

@@ -38,6 +38,10 @@ parameters:
type: string
default: 'regionOne'
description: Keystone region for endpoint
AdminPassword:
description: The password for the keystone admin account, used for monitoring, querying neutron etc.
type: string
hidden: true

resources:
CephBase:
@@ -74,6 +78,55 @@ outputs:
radosgw_keystone_ssl: false
radosgw_address_block: {get_param: [ServiceData, net_cidr_map, {get_param: [ServiceNetMap, CephRgwNetwork]}]}
radosgw_civetweb_port: {get_param: [EndpointMap, CephRgwInternal, port]}
update_tasks: &endpoint_update_tasks
- name: get bootstrap nodeid
tags: common
command: hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid
register: bootstrap_node
- name: set is_bootstrap_node fact
tags: common
set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}}
when: bootstrap_node.rc == 0
- name: update rgw endpoints
when:
- step|int == 5
- is_bootstrap_node|bool
block:
- name: set openstack command
set_fact:
oc_openstack_cmd:
- openstack
- '--os-username admin'
- '--os-password'
- {get_param: AdminPassword}
- '--os-identity-api-version 3'
- '--os-project-name admin'
- '--os-project-domain-name Default'
- '--os-region-name'
- {get_param: KeystoneRegion}
- '--os-user-domain-name Default'
- '--os-auth-type password'
- '--os-auth-url'
- {get_param: [EndpointMap, KeystoneV3Internal, uri]}
- name: get endpoint IDs
command: "{{ oc_openstack_cmd|join(' ') }} endpoint list --service object-store --interface {{ item }} -f json"
loop:
- 'internal'
- 'public'
- 'admin'
register: endpoint_ids
- name: update keystone endpoint
command: "{{ oc_openstack_cmd|join(' ') }} endpoint set --url {{ item }} {{ (endpoint_ids.results[idx].stdout|from_json)[0]['ID'] }}"
when:
- endpoint_ids.results[idx].rc == 0
- (endpoint_ids.results[idx].stdout|from_json)[0]['URL'] != item
loop:
- {get_param: [EndpointMap, CephRgwInternal, uri]}
- {get_param: [EndpointMap, CephRgwPublic, uri]}
- {get_param: [EndpointMap, CephRgwAdmin, uri]}
loop_control:
index_var: idx
upgrade_tasks: *endpoint_update_tasks
service_config_settings:
keystone:
ceph::rgw::keystone::auth::public_url: {get_param: [EndpointMap, CephRgwPublic, uri]}

+ 3
- 3
network/endpoints/endpoint_data.yaml View File

@@ -263,15 +263,15 @@ CephRgw:
Internal:
net_param: CephRgw
uri_suffixes:
'': /swift/v1
'': /swift/v1/AUTH_%(project_id)s
Public:
net_param: Public
uri_suffixes:
'': /swift/v1
'': /swift/v1/AUTH_%(project_id)s
Admin:
net_param: CephRgw
uri_suffixes:
'': /swift/v1
'': /swift/v1/AUTH_%(project_id)s
port: 8080

Sahara:

+ 78
- 69
network/endpoints/endpoint_map.yaml View File

@@ -881,29 +881,32 @@ outputs:
protocol:
get_param: [EndpointMap, CephRgwAdmin, protocol]
uri:
make_url:
scheme:
get_param: [EndpointMap, CephRgwAdmin, protocol]
host:
str_replace:
template:
get_param: [EndpointMap, CephRgwAdmin, host]
params:
CLOUDNAME:
get_param:
- CloudEndpoints
- get_param: [ServiceNetMap, CephRgwNetwork]
IP_ADDRESS:
get_param:
- NetIpMap
- str_replace:
params:
NETWORK:
get_param: [ServiceNetMap, CephRgwNetwork]
template: NETWORK_uri
port:
get_param: [EndpointMap, CephRgwAdmin, port]
path: /swift/v1
list_join:
- ''
- - make_url:
scheme:
get_param: [EndpointMap, CephRgwAdmin, protocol]
host:
str_replace:
template:
get_param: [EndpointMap, CephRgwAdmin, host]
params:
CLOUDNAME:
get_param:
- CloudEndpoints
- get_param: [ServiceNetMap, CephRgwNetwork]
IP_ADDRESS:
get_param:
- NetIpMap
- str_replace:
params:
NETWORK:
get_param: [ServiceNetMap, CephRgwNetwork]
template: NETWORK_uri
port:
get_param: [EndpointMap, CephRgwAdmin, port]
path: /swift/v1/AUTH_
- '%(project_id)s'
uri_no_suffix:
make_url:
scheme:
@@ -963,29 +966,32 @@ outputs:
protocol:
get_param: [EndpointMap, CephRgwInternal, protocol]
uri:
make_url:
scheme:
get_param: [EndpointMap, CephRgwInternal, protocol]
host:
str_replace:
template:
get_param: [EndpointMap, CephRgwInternal, host]
params:
CLOUDNAME:
get_param:
- CloudEndpoints
- get_param: [ServiceNetMap, CephRgwNetwork]
IP_ADDRESS:
get_param:
- NetIpMap
- str_replace:
params:
NETWORK:
get_param: [ServiceNetMap, CephRgwNetwork]
template: NETWORK_uri
port:
get_param: [EndpointMap, CephRgwInternal, port]
path: /swift/v1
list_join:
- ''
- - make_url:
scheme:
get_param: [EndpointMap, CephRgwInternal, protocol]
host:
str_replace:
template:
get_param: [EndpointMap, CephRgwInternal, host]
params:
CLOUDNAME:
get_param:
- CloudEndpoints
- get_param: [ServiceNetMap, CephRgwNetwork]
IP_ADDRESS:
get_param:
- NetIpMap
- str_replace:
params:
NETWORK:
get_param: [ServiceNetMap, CephRgwNetwork]
template: NETWORK_uri
port:
get_param: [EndpointMap, CephRgwInternal, port]
path: /swift/v1/AUTH_
- '%(project_id)s'
uri_no_suffix:
make_url:
scheme:
@@ -1045,29 +1051,32 @@ outputs:
protocol:
get_param: [EndpointMap, CephRgwPublic, protocol]
uri:
make_url:
scheme:
get_param: [EndpointMap, CephRgwPublic, protocol]
host:
str_replace:
template:
get_param: [EndpointMap, CephRgwPublic, host]
params:
CLOUDNAME:
get_param:
- CloudEndpoints
- get_param: [ServiceNetMap, PublicNetwork]
IP_ADDRESS:
get_param:
- NetIpMap
- str_replace:
params:
NETWORK:
get_param: [ServiceNetMap, PublicNetwork]
template: NETWORK_uri
port:
get_param: [EndpointMap, CephRgwPublic, port]
path: /swift/v1
list_join:
- ''
- - make_url:
scheme:
get_param: [EndpointMap, CephRgwPublic, protocol]
host:
str_replace:
template:
get_param: [EndpointMap, CephRgwPublic, host]
params:
CLOUDNAME:
get_param:
- CloudEndpoints
- get_param: [ServiceNetMap, PublicNetwork]
IP_ADDRESS:
get_param:
- NetIpMap
- str_replace:
params:
NETWORK:
get_param: [ServiceNetMap, PublicNetwork]
template: NETWORK_uri
port:
get_param: [EndpointMap, CephRgwPublic, port]
path: /swift/v1/AUTH_
- '%(project_id)s'
uri_no_suffix:
make_url:
scheme:

Loading…
Cancel
Save