Browse Source

Move ceph-rgw and config overrides variables

If no CephRgw service is present there's no reason to have all the
rgw related variables generated.
This change moves the rgw variables to ceph-rgw.yml which will be
added when the service is deployed.

Closes-Bug: #1867006
Depends-On: https://review.opendev.org/711942
Change-Id: I6302cbd971ee0f82b21630f3a0f56a9ca9a18658
changes/42/705442/10
Francesco Pantano 2 years ago
parent
commit
0a8c5697df
No known key found for this signature in database GPG Key ID: 799868C47301D458
  1. 2
      ci/environments/scenario001-standalone.yaml
  2. 1
      ci/environments/scenario004-standalone.yaml
  3. 43
      deployment/ceph-ansible/ceph-base.yaml
  4. 23
      deployment/ceph-ansible/ceph-rgw.yaml

2
ci/environments/scenario001-standalone.yaml

@ -167,8 +167,10 @@ parameter_defaults:
- tty6
ContainerCli: podman
CephConfigOverrides:
anotherkey: anothervalue
global:
globalkey: globalvalue
osd:
osdkey: osdvalue
foo: bar
NfsUrl: 127.0.0.1

1
ci/environments/scenario004-standalone.yaml

@ -100,3 +100,4 @@ parameter_defaults:
EnablePaunch: true
CephConfigOverrides:
globalkey: globalvalue
anotherkey: anothervalue

43
deployment/ceph-ansible/ceph-base.yaml

@ -338,10 +338,6 @@ conditions:
equals:
- {get_param: CephAnsibleSkipTags}
- ''
ceph_config_overrides_with_sections:
yaql:
data: {get_param: CephConfigOverrides}
expression: $.data.keys().any(predicate => $ in ['global', 'mon', 'mgr', 'osd', 'mds', 'client'])
ceph_authenticated_registry:
and:
- not:
@ -395,24 +391,11 @@ resources:
properties:
type: json
value:
global:
osd_pool_default_size: {get_param: CephPoolDefaultSize}
osd_pool_default_pg_num: {get_param: CephPoolDefaultPgNum}
osd_pool_default_pgp_num: {get_param: CephPoolDefaultPgNum}
rgw_keystone_api_version: 3
rgw_keystone_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
rgw_keystone_accepted_roles: 'member, Member, admin'
rgw_keystone_accepted_admin_roles: ResellerAdmin, swiftoperator
rgw_keystone_admin_domain: default
rgw_keystone_admin_project: service
rgw_keystone_admin_user: swift
rgw_keystone_admin_password: {get_param: SwiftPassword}
rgw_keystone_implicit_tenants: 'true'
rgw_keystone_revocation_interval: '0'
rgw_s3_auth_use_keystone: 'true'
rgw_swift_versioning_enabled: 'true'
rgw_swift_account_in_url: 'true'
rgw_trust_forwarded_https: 'true'
vars:
global:
osd_pool_default_size: {get_param: CephPoolDefaultSize}
osd_pool_default_pg_num: {get_param: CephPoolDefaultPgNum}
osd_pool_default_pgp_num: {get_param: CephPoolDefaultPgNum}
CephBasePoolVars:
type: OS::Heat::Value
@ -542,20 +525,6 @@ resources:
list_join:
- ','
- get_param: [ServiceData, net_cidr_map, {get_param: [ServiceNetMap, CephClusterNetwork]}]
ceph_conf_overrides:
if:
- ceph_config_overrides_with_sections
- yaql:
data:
default:
map_merge:
- {get_attr: [DefaultCephConfigOverrides, value]}
overrides: {get_param: CephConfigOverrides}
expression: $.data.default.mergeWith($.data.overrides)
- global:
map_merge:
- {get_attr: [DefaultCephConfigOverrides, value, global]}
- {get_param: CephConfigOverrides}
ip_version:
if:
- {get_param: CephIPv6}
@ -609,6 +578,8 @@ outputs:
ceph_pools: {get_attr: [CephBasePoolVars, value, vars]}
manila_pools: {get_attr: [CephManilaPoolVars, value, vars]}
ceph_keys: {get_attr: [CephKeyVars, value, vars]}
ceph_default_overrides: {get_attr: [DefaultCephConfigOverrides, value, vars]}
ceph_config_overrides: {get_param: CephConfigOverrides}
- name: set ceph-ansible facts
set_fact:
blacklisted_hostnames: {get_param: DeploymentServerBlacklist}

23
deployment/ceph-ansible/ceph-rgw.yaml

@ -75,6 +75,28 @@ resources:
- get_param: [ServiceData, net_cidr_map, {get_param: [ServiceNetMap, CephRgwNetwork]}]
radosgw_frontend_port: {get_param: [EndpointMap, CephRgwInternal, port]}
CephRgwConfigOverrides:
type: OS::Heat::Value
properties:
type: json
value:
vars:
global:
rgw_keystone_api_version: 3
rgw_keystone_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
rgw_keystone_accepted_roles: 'member, Member, admin'
rgw_keystone_accepted_admin_roles: ResellerAdmin, swiftoperator
rgw_keystone_admin_domain: default
rgw_keystone_admin_project: service
rgw_keystone_admin_user: swift
rgw_keystone_admin_password: {get_param: SwiftPassword}
rgw_keystone_implicit_tenants: 'true'
rgw_keystone_revocation_interval: '0'
rgw_s3_auth_use_keystone: 'true'
rgw_swift_versioning_enabled: 'true'
rgw_swift_account_in_url: 'true'
rgw_trust_forwarded_https: 'true'
outputs:
role_data:
description: Role data for the Ceph RadosGW service.
@ -128,6 +150,7 @@ outputs:
- {get_attr: [CephRgwAnsibleVars, value, vars]}
- radosgw_frontend_ssl_certificate: '/etc/pki/tls/certs/ceph_rgw.pem'
- {get_attr: [CephRgwAnsibleVars, value, vars]}
ceph_rgw_config_overrides: {get_attr: [CephRgwConfigOverrides, value, vars]}
- name: generate ceph-ansible group vars rgws
copy:
dest: "{{playbook_dir}}/ceph-ansible/group_vars/rgws.yml"

Loading…
Cancel
Save