From c1b35f07ac951c8701799c57612fe23118daaee1 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Sat, 10 Mar 2018 19:15:48 +0100 Subject: [PATCH] mistral/undercloud: align configuration with instack-undercloud Depends-On: I01c4497324b2c8666d9f749147693d580c0a5e20 Change-Id: I23e6807ecb1efac2acdbccafc3370853b9eec482 --- environments/undercloud.yaml | 1 + puppet/services/mistral-api.yaml | 20 ++++++++++++++++++++ puppet/services/mistral-base.yaml | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/environments/undercloud.yaml b/environments/undercloud.yaml index e66a61fd42..3ae119bcaf 100644 --- a/environments/undercloud.yaml +++ b/environments/undercloud.yaml @@ -59,6 +59,7 @@ parameter_defaults: ZaqarManagementStore: 'sqlalchemy' # our undercloud default eth1 for the control plane bridged interface NeutronPublicInterface: eth1 + MistralCorsAllowedOrigin: '*' MistralExecutionFieldSizeLimit: 16384 NeutronServicePlugins: ['router'] NeutronNetworkVLANRanges: 'physnet1:1000:2999' diff --git a/puppet/services/mistral-api.yaml b/puppet/services/mistral-api.yaml index 2f339538f2..6861719e60 100644 --- a/puppet/services/mistral-api.yaml +++ b/puppet/services/mistral-api.yaml @@ -43,9 +43,21 @@ parameters: EnableInternalTLS: type: boolean default: false + MistralExecutionInterval: + default: 600 + description: This setting defines how frequently Mistral checks for cron + triggers that need execution. The default is 10 minutes and + reduces the load that is has on the system. + type: number + MistralCorsAllowedOrigin: + type: string + default: '' + description: Indicate whether this resource may be shared with the domain received in the request + "origin" header. conditions: mistral_workers_zero: {equals : [{get_param: MistralWorkers}, 0]} + cors_allowed_origin_unset: {equals : [{get_param: MistralCorsAllowedOrigin}, '']} resources: ApacheServiceBase: @@ -74,10 +86,18 @@ outputs: config_settings: map_merge: - get_attr: [MistralBase, role_data, config_settings] + - + if: + - cors_allowed_origin_unset + - {} + - mistral::cors::allowed_origin: {get_param: MistralCorsAllowedOrigin} - mistral::api::api_workers: {get_param: MistralWorkers} mistral::api::bind_host: {get_param: [ServiceNetMap, MistralApiNetwork]} mistral::wsgi::apache::ssl: {get_param: EnableInternalTLS} mistral::policy::policies: {get_param: MistralApiPolicies} + mistral::cron_trigger::execution_interval: {get_param: MistralExecutionInterval} + mistral::cors::allow_headers: 'Content-Type,Cache-Control,Content-Language,Expires,Last-Modified,Pragma,X-Auth-Token' + mistral::cors::expose_headers: 'Content-Type,Cache-Control,Content-Language,Expires,Last-Modified,Pragma' tripleo.mistral_api.firewall_rules: '133 mistral': dport: diff --git a/puppet/services/mistral-base.yaml b/puppet/services/mistral-base.yaml index 949ee997f6..fd346fdc1c 100644 --- a/puppet/services/mistral-base.yaml +++ b/puppet/services/mistral-base.yaml @@ -108,7 +108,7 @@ outputs: mistral::keystone::authtoken::user_domain_name: 'Default' mistral::keystone::authtoken::project_domain_name: 'Default' mistral::keystone::authtoken::password: {get_param: MistralPassword} - mistral::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri]} + mistral::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneV3Internal, uri]} mistral::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]} mistral::keystone_ec2_uri: list_join: