Browse Source

Merge "Add EnableCache option to enable/disable usage of memcache" into stable/train

changes/47/782747/2
Zuul 1 month ago
committed by Gerrit Code Review
parent
commit
5ad71f2c18
4 changed files with 69 additions and 23 deletions
  1. +12
    -0
      deployment/heat/heat-base-puppet.yaml
  2. +40
    -23
      deployment/keystone/keystone-container-puppet.yaml
  3. +11
    -0
      deployment/nova/nova-base-puppet.yaml
  4. +6
    -0
      releasenotes/notes/enable-cache-293c39b3b6f55c80.yaml

+ 12
- 0
deployment/heat/heat-base-puppet.yaml View File

@ -48,6 +48,10 @@ parameters:
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
EnableCache:
description: Enable caching with memcached
type: boolean
default: true
HeatCronPurgeDeletedEnsure:
type: string
description: >
@ -131,6 +135,7 @@ parameters:
conditions:
service_debug_unset: {equals : [{get_param: HeatDebug}, '']}
cache_enabled: {equals : [{get_param: EnableCache}, true]}
cors_allowed_origin_unset: {equals : [{get_param: HeatCorsAllowedOrigin}, '']}
outputs:
@ -186,3 +191,10 @@ outputs:
heat::cron::purge_deleted::age_type: {get_param: HeatCronPurgeDeletedAgeType}
heat::cron::purge_deleted::destination: {get_param: HeatCronPurgeDeletedDestination}
heat::max_json_body_size: {get_param: HeatMaxJsonBodySize}
-
if:
- cache_enabled
- heat::cache::enabled: true
heat::cache::backend: 'dogpile.cache.memcached'
heat::cache::resource_finder_caching: false
- {}

+ 40
- 23
deployment/keystone/keystone-container-puppet.yaml View File

@ -112,6 +112,10 @@ parameters:
type: string
constraints:
- allowed_values: [ '', 'true', 'True', 'TRUE', 'false', 'False', 'FALSE']
EnableCache:
description: Enable caching with memcached
type: boolean
default: true
AdminEmail:
default: 'admin@example.com'
description: The email for the keystone admin account.
@ -351,6 +355,7 @@ conditions:
keystone_federation_enabled: {equals: [{get_param: KeystoneFederationEnable}, True]}
keystone_openidc_enabled: {equals: [{get_param: KeystoneOpenIdcEnable}, True]}
service_debug_unset: {equals : [{get_param: KeystoneDebug}, '']}
cache_enabled: {equals: [{get_param: EnableCache}, true]}
# Security compliance
change_password_upon_first_use_set: {not: {equals: [{get_param: KeystoneChangePasswordUponFirstUse}, '']}}
@ -478,6 +483,12 @@ outputs:
"%{hiera('$NETWORK')}"
params:
$NETWORK: {get_param: [ServiceNetMap, KeystoneAdminApiNetwork]}
-
if:
- cache_enabled
- keystone::cache_enabled: true
keystone::cache_backend: 'dogpile.cache.memcached'
- {}
-
if:
- keystone_federation_enabled
@ -490,29 +501,35 @@ outputs:
if:
- keystone_openidc_enabled
-
keystone_openidc_enabled: True
keystone::federation::openidc::methods:
get_param: KeystoneAuthMethods
keystone::federation::openidc::keystone_url:
get_param: [EndpointMap, KeystonePublic, uri_no_suffix]
keystone::federation::openidc::idp_name:
get_param: KeystoneOpenIdcIdpName
keystone::federation::openidc::openidc_provider_metadata_url:
get_param: KeystoneOpenIdcProviderMetadataUrl
keystone::federation::openidc::openidc_client_id:
get_param: KeystoneOpenIdcClientId
keystone::federation::openidc::openidc_client_secret:
get_param: KeystoneOpenIdcClientSecret
keystone::federation::openidc::openidc_crypto_passphrase:
get_param: KeystoneOpenIdcCryptoPassphrase
keystone::federation::openidc::openidc_response_type:
get_param: KeystoneOpenIdcResponseType
keystone::federation::openidc::remote_id_attribute:
get_param: KeystoneOpenIdcRemoteIdAttribute
keystone::federation::openidc::openidc_enable_oauth:
get_param: KeystoneOpenIdcEnableOAuth
keystone::federation::openidc::openidc_introspection_endpoint:
get_param: KeystoneOpenIdcIntrospectionEndpoint
map_merge:
- keystone_openidc_enabled: True
keystone::federation::openidc::methods:
get_param: KeystoneAuthMethods
keystone::federation::openidc::keystone_url:
get_param: [EndpointMap, KeystonePublic, uri_no_suffix]
keystone::federation::openidc::idp_name:
get_param: KeystoneOpenIdcIdpName
keystone::federation::openidc::openidc_provider_metadata_url:
get_param: KeystoneOpenIdcProviderMetadataUrl
keystone::federation::openidc::openidc_client_id:
get_param: KeystoneOpenIdcClientId
keystone::federation::openidc::openidc_client_secret:
get_param: KeystoneOpenIdcClientSecret
keystone::federation::openidc::openidc_crypto_passphrase:
get_param: KeystoneOpenIdcCryptoPassphrase
keystone::federation::openidc::openidc_response_type:
get_param: KeystoneOpenIdcResponseType
keystone::federation::openidc::remote_id_attribute:
get_param: KeystoneOpenIdcRemoteIdAttribute
keystone::federation::openidc::openidc_enable_oauth:
get_param: KeystoneOpenIdcEnableOAuth
keystone::federation::openidc::openidc_introspection_endpoint:
get_param: KeystoneOpenIdcIntrospectionEndpoint
-
if:
- cache_enabled
- keystone::federation::openidc::openidc_cache_type: 'memcache'
- {}
- {}
-
if:


+ 11
- 0
deployment/nova/nova-base-puppet.yaml View File

@ -73,6 +73,10 @@ parameters:
type: string
constraints:
- allowed_values: [ '', 'true', 'True', 'TRUE', 'false', 'False', 'FALSE']
EnableCache:
description: Enable caching with memcached
type: boolean
default: true
EnableConfigPurge:
type: boolean
default: false
@ -243,6 +247,7 @@ conditions:
compute_upgrade_level_empty: {equals : [{get_param: UpgradeLevelNovaCompute}, '']}
service_debug_unset: {equals : [{get_param: NovaDebug}, '']}
cache_enabled: {equals: [{get_param: EnableCache}, true]}
resources:
@ -334,6 +339,12 @@ outputs:
nova_is_additional_cell: {get_param: NovaAdditionalCell}
nova::cross_az_attach: {get_param: NovaCrossAZAttach}
- get_attr: [RoleParametersValue, value]
-
if:
- cache_enabled
- nova::cache::enabled: true
nova::cache::backend: 'dogpile.cache.memcached'
- {}
-
if:
- compute_upgrade_level_empty


+ 6
- 0
releasenotes/notes/enable-cache-293c39b3b6f55c80.yaml View File

@ -0,0 +1,6 @@
---
features:
- |
The new ``EnableCache`` parameter is added to enable/disable chacing using
memcached services. The parameter is true by default, but should be false
when memcached service is disabled in the deployment.

Loading…
Cancel
Save