Merge "flatten the gnocchi service configurations"

This commit is contained in:
Zuul 2019-03-15 19:02:38 +00:00 committed by Gerrit Code Review
commit ec27b3d357
12 changed files with 191 additions and 378 deletions

View File

@ -12,9 +12,9 @@ resource_registry:
OS::TripleO::Services::CephClient: ../../docker/services/ceph-ansible/ceph-client.yaml OS::TripleO::Services::CephClient: ../../docker/services/ceph-ansible/ceph-client.yaml
OS::TripleO::Services::PankoApi: ../../deployment/deprecated/panko/panko-api-container-puppet.yaml OS::TripleO::Services::PankoApi: ../../deployment/deprecated/panko/panko-api-container-puppet.yaml
OS::TripleO::Services::Collectd: ../../deployment/metrics/collectd-container-puppet.yaml OS::TripleO::Services::Collectd: ../../deployment/metrics/collectd-container-puppet.yaml
OS::TripleO::Services::GnocchiApi: ../../docker/services/gnocchi-api.yaml OS::TripleO::Services::GnocchiApi: ../../deployment/gnocchi/gnocchi-api-container-puppet.yaml
OS::TripleO::Services::GnocchiMetricd: ../../docker/services/gnocchi-metricd.yaml OS::TripleO::Services::GnocchiMetricd: ../../deployment/gnocchi/gnocchi-metricd-container-puppet.yaml
OS::TripleO::Services::GnocchiStatsd: ../../docker/services/gnocchi-statsd.yaml OS::TripleO::Services::GnocchiStatsd: ../../deployment/gnocchi/gnocchi-statsd-container-puppet.yaml
OS::TripleO::Services::HeatApi: ../../deployment/heat/heat-api-container-puppet.yaml OS::TripleO::Services::HeatApi: ../../deployment/heat/heat-api-container-puppet.yaml
OS::TripleO::Services::HeatApiCfn: ../../deployment/heat/heat-api-cfn-container-puppet.yaml OS::TripleO::Services::HeatApiCfn: ../../deployment/heat/heat-api-cfn-container-puppet.yaml
OS::TripleO::Services::HeatApiCloudwatch: ../../deployment/heat/heat-api-cloudwatch-disabled-puppet.yaml OS::TripleO::Services::HeatApiCloudwatch: ../../deployment/heat/heat-api-cloudwatch-disabled-puppet.yaml

View File

@ -6,9 +6,9 @@ resource_registry:
OS::TripleO::Services::CeilometerAgentCentral: ../../deployment/ceilometer/ceilometer-agent-central-container-puppet.yaml OS::TripleO::Services::CeilometerAgentCentral: ../../deployment/ceilometer/ceilometer-agent-central-container-puppet.yaml
OS::TripleO::Services::CeilometerAgentNotification: ../../deployment/ceilometer/ceilometer-agent-notification-container-puppet.yaml OS::TripleO::Services::CeilometerAgentNotification: ../../deployment/ceilometer/ceilometer-agent-notification-container-puppet.yaml
OS::TripleO::Services::ComputeCeilometerAgent: ../../deployment/ceilometer/ceilometer-agent-compute-container-puppet.yaml OS::TripleO::Services::ComputeCeilometerAgent: ../../deployment/ceilometer/ceilometer-agent-compute-container-puppet.yaml
OS::TripleO::Services::GnocchiApi: ../../docker/services/gnocchi-api.yaml OS::TripleO::Services::GnocchiApi: ../../deployment/gnocchi/gnocchi-api-container-puppet.yaml
OS::TripleO::Services::GnocchiMetricd: ../../docker/services/gnocchi-metricd.yaml OS::TripleO::Services::GnocchiMetricd: ../../deployment/gnocchi/gnocchi-metricd-container-puppet.yaml
OS::TripleO::Services::GnocchiStatsd: ../../docker/services/gnocchi-statsd.yaml OS::TripleO::Services::GnocchiStatsd: ../../deployment/gnocchi/gnocchi-statsd-container-puppet.yaml
OS::TripleO::Services::HeatApi: ../../deployment/heat/heat-api-container-puppet.yaml OS::TripleO::Services::HeatApi: ../../deployment/heat/heat-api-container-puppet.yaml
OS::TripleO::Services::HeatApiCfn: ../../deployment/heat/heat-api-cfn-container-puppet.yaml OS::TripleO::Services::HeatApiCfn: ../../deployment/heat/heat-api-cfn-container-puppet.yaml
OS::TripleO::Services::HeatApiCloudwatch: ../../deployment/heat/heat-api-cloudwatch-disabled-puppet.yaml OS::TripleO::Services::HeatApiCloudwatch: ../../deployment/heat/heat-api-cloudwatch-disabled-puppet.yaml

View File

@ -65,49 +65,166 @@ parameters:
description: Path to use when file driver is used. This could be NFS or a description: Path to use when file driver is used. This could be NFS or a
flat file. flat file.
type: string type: string
GnocchiPassword:
description: The password for the gnocchi service and db account.
type: string
hidden: true
GnocchiBackend:
default: swift
description: The short name of the Gnocchi backend to use. Should be one
of swift, rbd, file or s3.
type: string
constraints:
- allowed_values: ['swift', 'file', 'rbd', 's3']
GnocchiIncomingStorageDriver:
default: redis
description: Storage driver to use for incoming metric data
type: string
KeystoneRegion:
type: string
default: 'regionOne'
description: Keystone region for endpoint
MonitoringSubscriptionGnocchiApi:
default: 'overcloud-gnocchi-api'
type: string
GnocchiApiLoggingSource:
type: json
default:
tag: openstack.gnocchi.api
path: /var/log/gnocchi/app.log
EnableInternalTLS:
type: boolean
default: false
GnocchiApiPolicies:
description: |
A hash of policies to configure for Gnocchi API.
e.g. { gnocchi-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
default: {}
type: json
GnocchiCorsAllowedOrigin:
type: string
default: ''
description: Indicate whether this resource may be shared with the domain received in the request
"origin" header.
conditions: conditions:
cors_allowed_origin_unset: {equals : [{get_param: GnocchiCorsAllowedOrigin}, '']}
internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]} internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
resources: resources:
ContainersCommon: ContainersCommon:
type: ./containers-common.yaml type: ../../docker/services/containers-common.yaml
GnocchiApiPuppetBase: GnocchiServiceBase:
type: ../../puppet/services/gnocchi-api.yaml type: ./gnocchi-base.yaml
properties: properties:
EndpointMap: {get_param: EndpointMap}
ServiceData: {get_param: ServiceData} ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap} ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords} DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName} RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters} RoleParameters: {get_param: RoleParameters}
ApacheServiceBase:
type: ../../puppet/services/apache.yaml
properties:
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
EnableInternalTLS: {get_param: EnableInternalTLS}
outputs: outputs:
role_data: role_data:
description: Role data for the gnocchi API role. description: Role data for the gnocchi API role.
value: value:
service_name: {get_attr: [GnocchiApiPuppetBase, role_data, service_name]} service_name: gnocchi_api
monitoring_subscription: {get_param: MonitoringSubscriptionGnocchiApi}
config_settings: config_settings:
map_merge: map_merge:
- get_attr: [GnocchiApiPuppetBase, role_data, config_settings] - get_attr: [GnocchiServiceBase, role_data, config_settings]
- get_attr: [ApacheServiceBase, role_data, config_settings]
- apache::default_vhost: false - apache::default_vhost: false
-
if:
- cors_allowed_origin_unset
- {}
- gnocchi::cors::allowed_origin: {get_param: GnocchiCorsAllowedOrigin}
gnocchi::api::middlewares: 'oslo_middleware.cors.CORS'
- tripleo::gnocchi_api::firewall_rules:
'129 gnocchi-api':
dport:
- 8041
- 13041
gnocchi::api::enabled: true
gnocchi::api::enable_proxy_headers_parsing: true
gnocchi::api::service_name: 'httpd'
gnocchi::policy::policies: {get_param: GnocchiApiPolicies}
gnocchi::cors::max_age: 3600
gnocchi::cors::allow_headers: 'Content-Type,Cache-Control,Content-Language,Expires,Last-Modified,Pragma,X-Auth-Token'
gnocchi::cors::expose_headers: 'Content-Type,Cache-Control,Content-Language,Expires,Last-Modified,Pragma'
gnocchi::cors::allow_methods: 'GET,POST,PUT,DELETE,OPTIONS,PATCH'
gnocchi::keystone::authtoken::www_authenticate_uri: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
gnocchi::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
gnocchi::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
gnocchi::keystone::authtoken::password: {get_param: GnocchiPassword}
gnocchi::keystone::authtoken::project_name: 'service'
gnocchi::keystone::authtoken::user_domain_name: 'Default'
gnocchi::keystone::authtoken::project_domain_name: 'Default'
gnocchi::wsgi::apache::ssl: {get_param: EnableInternalTLS}
gnocchi::wsgi::apache::servername:
str_replace:
template:
"%{hiera('fqdn_$NETWORK')}"
params:
$NETWORK: {get_param: [ServiceNetMap, GnocchiApiNetwork]}
tripleo::profile::base::gnocchi::api::gnocchi_backend: {get_param: GnocchiBackend}
tripleo::profile::base::gnocchi::api::incoming_storage_driver: {get_param: GnocchiIncomingStorageDriver}
# NOTE: bind IP is found in hiera replacing the network name with the
# local node IP for the given network; replacement examples
# (eg. for internal_api):
# internal_api -> IP
# internal_api_uri -> [IP]
# internal_api_subnet - > IP/CIDR
gnocchi::wsgi::apache::bind_host:
str_replace:
template:
"%{hiera('$NETWORK')}"
params:
$NETWORK: {get_param: [ServiceNetMap, GnocchiApiNetwork]}
gnocchi::wsgi::apache::wsgi_process_display_name: 'gnocchi_wsgi'
service_config_settings: service_config_settings:
map_merge: map_merge:
- get_attr: [GnocchiApiPuppetBase, role_data, service_config_settings] - get_attr: [GnocchiServiceBase, role_data, service_config_settings]
- fluentd: - fluentd:
tripleo_fluentd_groups_gnocchi_api: tripleo_fluentd_groups_gnocchi_api:
- gnocchi - gnocchi
tripleo_fluentd_sources_gnocchi_api: tripleo_fluentd_sources_gnocchi_api:
- {get_param: GnocchiApiLoggingSource} - {get_param: GnocchiApiLoggingSource}
keystone:
gnocchi::keystone::auth::admin_url: { get_param: [ EndpointMap, GnocchiAdmin, uri ] }
gnocchi::keystone::auth::internal_url: {get_param: [EndpointMap, GnocchiInternal, uri]}
gnocchi::keystone::auth::password: {get_param: GnocchiPassword}
gnocchi::keystone::auth::public_url: { get_param: [ EndpointMap, GnocchiPublic, uri ] }
gnocchi::keystone::auth::region: {get_param: KeystoneRegion}
gnocchi::keystone::auth::tenant: 'service'
mysql:
gnocchi::db::mysql::password: {get_param: GnocchiPassword}
gnocchi::db::mysql::user: gnocchi
gnocchi::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
gnocchi::db::mysql::dbname: gnocchi
gnocchi::db::mysql::allowed_hosts:
- '%'
- "%{hiera('mysql_bind_host')}"
# BEGIN DOCKER SETTINGS # BEGIN DOCKER SETTINGS
puppet_config: puppet_config:
config_volume: gnocchi config_volume: gnocchi
puppet_tags: gnocchi_api_paste_ini,gnocchi_config puppet_tags: gnocchi_api_paste_ini,gnocchi_config
step_config: step_config: |
get_attr: [GnocchiApiPuppetBase, role_data, step_config] include ::tripleo::profile::base::gnocchi::api
config_image: {get_param: DockerGnocchiConfigImage} config_image: {get_param: DockerGnocchiConfigImage}
kolla_config: kolla_config:
/var/lib/kolla/config_files/gnocchi_api.json: /var/lib/kolla/config_files/gnocchi_api.json:
@ -256,7 +373,7 @@ outputs:
state: directory state: directory
upgrade_tasks: [] upgrade_tasks: []
metadata_settings: metadata_settings:
get_attr: [GnocchiApiPuppetBase, role_data, metadata_settings] get_attr: [ApacheServiceBase, role_data, metadata_settings]
post_upgrade_tasks: post_upgrade_tasks:
- when: step|int == 1 - when: step|int == 1
import_role: import_role:

View File

@ -53,22 +53,33 @@ parameters:
description: Path to use when file driver is used. This could be NFS or a description: Path to use when file driver is used. This could be NFS or a
flat file. flat file.
type: string type: string
MonitoringSubscriptionGnocchiMetricd:
default: 'overcloud-gnocchi-metricd'
type: string
GnocchiMetricdWorkers:
default: '%{::os_workers}'
description: Number of workers for Gnocchi MetricD
type: string
MetricProcessingDelay:
default: 30
description: Delay between processing metrics.
type: number
resources: resources:
ContainersCommon: ContainersCommon:
type: ./containers-common.yaml type: ../../docker/services/containers-common.yaml
MySQLClient: MySQLClient:
type: ../../deployment/database/mysql-client.yaml type: ../../deployment/database/mysql-client.yaml
GnocchiMetricdBase: GnocchiServiceBase:
type: ../../puppet/services/gnocchi-metricd.yaml type: ./gnocchi-base.yaml
properties: properties:
EndpointMap: {get_param: EndpointMap}
ServiceData: {get_param: ServiceData} ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap} ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords} DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName} RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters} RoleParameters: {get_param: RoleParameters}
@ -76,9 +87,14 @@ outputs:
role_data: role_data:
description: Role data for the Gnocchi API role. description: Role data for the Gnocchi API role.
value: value:
service_name: {get_attr: [GnocchiMetricdBase, role_data, service_name]} service_name: gnocchi_metricd
config_settings: {get_attr: [GnocchiMetricdBase, role_data, config_settings]} config_settings:
service_config_settings: {get_attr: [GnocchiMetricdBase, role_data, service_config_settings]} map_merge:
- get_attr: [GnocchiServiceBase, role_data, config_settings]
- gnocchi::metricd::workers: {get_param: GnocchiMetricdWorkers}
gnocchi::metricd::metric_processing_delay: {get_param: MetricProcessingDelay}
monitoring_subscription: {get_param: MonitoringSubscriptionGnocchiMetricd}
service_config_settings: {get_attr: [GnocchiServiceBase, role_data, service_config_settings]}
# BEGIN DOCKER SETTINGS # BEGIN DOCKER SETTINGS
puppet_config: puppet_config:
config_volume: gnocchi config_volume: gnocchi
@ -86,7 +102,7 @@ outputs:
step_config: step_config:
list_join: list_join:
- "\n" - "\n"
- - {get_attr: [GnocchiMetricdBase, role_data, step_config]} - - "include ::tripleo::profile::base::gnocchi::metricd"
- {get_attr: [MySQLClient, role_data, step_config]} - {get_attr: [MySQLClient, role_data, step_config]}
config_image: {get_param: DockerGnocchiConfigImage} config_image: {get_param: DockerGnocchiConfigImage}
kolla_config: kolla_config:

View File

@ -53,22 +53,25 @@ parameters:
description: Path to use when file driver is used. This could be NFS or a description: Path to use when file driver is used. This could be NFS or a
flat file. flat file.
type: string type: string
MonitoringSubscriptionGnocchiStatsd:
default: 'overcloud-gnocchi-statsd'
type: string
resources: resources:
ContainersCommon: ContainersCommon:
type: ./containers-common.yaml type: ../../docker/services/containers-common.yaml
MySQLClient: MySQLClient:
type: ../../deployment/database/mysql-client.yaml type: ../../deployment/database/mysql-client.yaml
GnocchiStatsdBase: GnocchiServiceBase:
type: ../../puppet/services/gnocchi-statsd.yaml type: ./gnocchi-base.yaml
properties: properties:
EndpointMap: {get_param: EndpointMap}
ServiceData: {get_param: ServiceData} ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap} ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords} DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName} RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters} RoleParameters: {get_param: RoleParameters}
@ -76,9 +79,16 @@ outputs:
role_data: role_data:
description: Role data for the Gnocchi API role. description: Role data for the Gnocchi API role.
value: value:
service_name: {get_attr: [GnocchiStatsdBase, role_data, service_name]} service_name: gnocchi_statsd
config_settings: {get_attr: [GnocchiStatsdBase, role_data, config_settings]} monitoring_subscription: {get_param: MonitoringSubscriptionGnocchiStatsd}
service_config_settings: {get_attr: [GnocchiStatsdBase, role_data, service_config_settings]} config_settings:
map_merge:
- get_attr: [GnocchiServiceBase, role_data, config_settings]
- tripleo::gnocchi_statsd::firewall_rules:
'140 gnocchi-statsd':
dport: 8125
proto: 'udp'
service_config_settings: {get_attr: [GnocchiServiceBase, role_data, service_config_settings]}
# BEGIN DOCKER SETTINGS # BEGIN DOCKER SETTINGS
puppet_config: puppet_config:
config_volume: gnocchi config_volume: gnocchi
@ -86,7 +96,7 @@ outputs:
step_config: step_config:
list_join: list_join:
- "\n" - "\n"
- - {get_attr: [GnocchiStatsdBase, role_data, step_config]} - - "include ::tripleo::profile::base::gnocchi::statsd"
- {get_attr: [MySQLClient, role_data, step_config]} - {get_attr: [MySQLClient, role_data, step_config]}
config_image: {get_param: DockerGnocchiConfigImage} config_image: {get_param: DockerGnocchiConfigImage}
kolla_config: kolla_config:

View File

@ -1,5 +1,5 @@
resource_registry: resource_registry:
OS::TripleO::Services::UndercloudGnocchiApi: ../../puppet/services/gnocchi-api.yaml OS::TripleO::Services::UndercloudGnocchiApi: ../../deployment/gnocchi/gnocchi-api-container-puppet.yaml
OS::TripleO::Services::UndercloudGnocchiMetricd: ../../puppet/services/gnocchi-metricd.yaml OS::TripleO::Services::UndercloudGnocchiMetricd: ../../deployment/gnocchi/gnocchi-metricd-container-puppet.yaml
OS::TripleO::Services::UndercloudGnocchiStatsd: ../../puppet/services/gnocchi-statsd.yaml OS::TripleO::Services::UndercloudGnocchiStatsd: ../../deployment/gnocchi/gnocchi-statsd-container-puppet.yaml
OS::TripleO::Services::UndercloudRedis: ../../deployment/database/redis-container-puppet.yaml OS::TripleO::Services::UndercloudRedis: ../../deployment/database/redis-container-puppet.yaml

View File

@ -1,7 +1,7 @@
# DEPRECATED. This file will be removed in the Stein release as it is no longer # DEPRECATED. This file will be removed in the Stein release as it is no longer
# needed # needed
resource_registry: resource_registry:
OS::TripleO::Services::GnocchiApi: ../../docker/services/gnocchi-api.yaml OS::TripleO::Services::GnocchiApi: ../../deployment/gnocchi/gnocchi-api-container-puppet.yaml
OS::TripleO::Services::GnocchiMetricd: ../../docker/services/gnocchi-metricd.yaml OS::TripleO::Services::GnocchiMetricd: ../../deployment/gnocchi/gnocchi-metricd-container-puppet.yaml
OS::TripleO::Services::GnocchiStatsd: ../../docker/services/gnocchi-statsd.yaml OS::TripleO::Services::GnocchiStatsd: ../../deployment/gnocchi/gnocchi-statsd-container-puppet.yaml
OS::TripleO::Services::Redis: ../../deployment/database/redis-container-puppet.yaml OS::TripleO::Services::Redis: ../../deployment/database/redis-container-puppet.yaml

View File

@ -220,9 +220,9 @@ resource_registry:
OS::TripleO::Services::ComputeCeilometerAgent: deployment/ceilometer/ceilometer-agent-compute-container-puppet.yaml OS::TripleO::Services::ComputeCeilometerAgent: deployment/ceilometer/ceilometer-agent-compute-container-puppet.yaml
OS::TripleO::Services::Horizon: deployment/horizon/horizon-container-puppet.yaml OS::TripleO::Services::Horizon: deployment/horizon/horizon-container-puppet.yaml
#Gnocchi services #Gnocchi services
OS::TripleO::Services::GnocchiApi: docker/services/gnocchi-api.yaml OS::TripleO::Services::GnocchiApi: deployment/gnocchi/gnocchi-api-container-puppet.yaml
OS::TripleO::Services::GnocchiMetricd: docker/services/gnocchi-metricd.yaml OS::TripleO::Services::GnocchiMetricd: deployment/gnocchi/gnocchi-metricd-container-puppet.yaml
OS::TripleO::Services::GnocchiStatsd: docker/services/gnocchi-statsd.yaml OS::TripleO::Services::GnocchiStatsd: deployment/gnocchi/gnocchi-statsd-container-puppet.yaml
# Drop Xinetd # Drop Xinetd
OS::TripleO::Services::Xinetd: OS::Heat::None OS::TripleO::Services::Xinetd: OS::Heat::None

View File

@ -1,198 +0,0 @@
heat_template_version: rocky
description: >
Gnocchi service configured with Puppet
parameters:
ServiceData:
default: {}
description: Dictionary packing service data
type: json
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. This
mapping overrides those in ServiceNetMapDefaults.
type: json
DefaultPasswords:
default: {}
type: json
RoleName:
default: ''
description: Role name on which the service is applied
type: string
RoleParameters:
default: {}
description: Parameters specific to the role
type: json
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
GnocchiPassword:
description: The password for the gnocchi service and db account.
type: string
hidden: true
GnocchiBackend:
default: swift
description: The short name of the Gnocchi backend to use. Should be one
of swift, rbd, file or s3.
type: string
constraints:
- allowed_values: ['swift', 'file', 'rbd', 's3']
GnocchiIncomingStorageDriver:
default: redis
description: Storage driver to use for incoming metric data
type: string
KeystoneRegion:
type: string
default: 'regionOne'
description: Keystone region for endpoint
MonitoringSubscriptionGnocchiApi:
default: 'overcloud-gnocchi-api'
type: string
GnocchiApiLoggingSource:
type: json
default:
tag: openstack.gnocchi.api
path: /var/log/gnocchi/app.log
EnableInternalTLS:
type: boolean
default: false
GnocchiApiPolicies:
description: |
A hash of policies to configure for Gnocchi API.
e.g. { gnocchi-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
default: {}
type: json
GnocchiCorsAllowedOrigin:
type: string
default: ''
description: Indicate whether this resource may be shared with the domain received in the request
"origin" header.
conditions:
cors_allowed_origin_unset: {equals : [{get_param: GnocchiCorsAllowedOrigin}, '']}
resources:
GnocchiServiceBase:
type: ./gnocchi-base.yaml
properties:
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
ApacheServiceBase:
type: ./apache.yaml
properties:
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
EnableInternalTLS: {get_param: EnableInternalTLS}
outputs:
role_data:
description: Role data for the Gnocchi role.
value:
service_name: gnocchi_api
monitoring_subscription: {get_param: MonitoringSubscriptionGnocchiApi}
config_settings:
map_merge:
- get_attr: [ApacheServiceBase, role_data, config_settings]
- get_attr: [GnocchiServiceBase, role_data, config_settings]
-
if:
- cors_allowed_origin_unset
- {}
- gnocchi::cors::allowed_origin: {get_param: GnocchiCorsAllowedOrigin}
gnocchi::api::middlewares: 'oslo_middleware.cors.CORS'
- tripleo::gnocchi_api::firewall_rules:
'129 gnocchi-api':
dport:
- 8041
- 13041
gnocchi::api::enabled: true
gnocchi::api::enable_proxy_headers_parsing: true
gnocchi::api::service_name: 'httpd'
gnocchi::policy::policies: {get_param: GnocchiApiPolicies}
gnocchi::cors::max_age: 3600
gnocchi::cors::allow_headers: 'Content-Type,Cache-Control,Content-Language,Expires,Last-Modified,Pragma,X-Auth-Token'
gnocchi::cors::expose_headers: 'Content-Type,Cache-Control,Content-Language,Expires,Last-Modified,Pragma'
gnocchi::cors::allow_methods: 'GET,POST,PUT,DELETE,OPTIONS,PATCH'
gnocchi::keystone::authtoken::www_authenticate_uri: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
gnocchi::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
gnocchi::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
gnocchi::keystone::authtoken::password: {get_param: GnocchiPassword}
gnocchi::keystone::authtoken::project_name: 'service'
gnocchi::keystone::authtoken::user_domain_name: 'Default'
gnocchi::keystone::authtoken::project_domain_name: 'Default'
gnocchi::wsgi::apache::ssl: {get_param: EnableInternalTLS}
gnocchi::wsgi::apache::servername:
str_replace:
template:
"%{hiera('fqdn_$NETWORK')}"
params:
$NETWORK: {get_param: [ServiceNetMap, GnocchiApiNetwork]}
tripleo::profile::base::gnocchi::api::gnocchi_backend: {get_param: GnocchiBackend}
tripleo::profile::base::gnocchi::api::incoming_storage_driver: {get_param: GnocchiIncomingStorageDriver}
# NOTE: bind IP is found in hiera replacing the network name with the
# local node IP for the given network; replacement examples
# (eg. for internal_api):
# internal_api -> IP
# internal_api_uri -> [IP]
# internal_api_subnet - > IP/CIDR
gnocchi::wsgi::apache::bind_host:
str_replace:
template:
"%{hiera('$NETWORK')}"
params:
$NETWORK: {get_param: [ServiceNetMap, GnocchiApiNetwork]}
gnocchi::wsgi::apache::wsgi_process_display_name: 'gnocchi_wsgi'
step_config: |
include ::tripleo::profile::base::gnocchi::api
service_config_settings:
fluentd:
tripleo_fluentd_groups_gnocchi_api:
- gnocchi
tripleo_fluentd_sources_gnocchi_api:
- {get_param: GnocchiApiLoggingSource}
keystone:
gnocchi::keystone::auth::admin_url: { get_param: [ EndpointMap, GnocchiAdmin, uri ] }
gnocchi::keystone::auth::internal_url: {get_param: [EndpointMap, GnocchiInternal, uri]}
gnocchi::keystone::auth::password: {get_param: GnocchiPassword}
gnocchi::keystone::auth::public_url: { get_param: [ EndpointMap, GnocchiPublic, uri ] }
gnocchi::keystone::auth::region: {get_param: KeystoneRegion}
gnocchi::keystone::auth::tenant: 'service'
mysql:
gnocchi::db::mysql::password: {get_param: GnocchiPassword}
gnocchi::db::mysql::user: gnocchi
gnocchi::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
gnocchi::db::mysql::dbname: gnocchi
gnocchi::db::mysql::allowed_hosts:
- '%'
- "%{hiera('mysql_bind_host')}"
metadata_settings:
get_attr: [ApacheServiceBase, role_data, metadata_settings]
upgrade_tasks:
list_concat:
- get_attr: [ApacheServiceBase, role_data, upgrade_tasks]
-
- name: Stop gnocchi_api service (running under httpd)
when: step|int == 1
service: name=httpd state=stopped
- name: set is_gnocchi_api_bootstrap_node fact
tags: common
set_fact: is_gnocchi_api_bootstrap_node={{gnocchi_api_short_bootstrap_node_name|lower == ansible_hostname|lower}}
- name: Setup gnocchi db during upgrade
command: gnocchi-upgrade
when:
- step|int == 5
- is_gnocchi_api_bootstrap_node|bool

View File

@ -1,69 +0,0 @@
heat_template_version: rocky
description: >
Gnocchi service configured with Puppet
parameters:
ServiceData:
default: {}
description: Dictionary packing service data
type: json
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. This
mapping overrides those in ServiceNetMapDefaults.
type: json
DefaultPasswords:
default: {}
type: json
RoleName:
default: ''
description: Role name on which the service is applied
type: string
RoleParameters:
default: {}
description: Parameters specific to the role
type: json
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
MonitoringSubscriptionGnocchiMetricd:
default: 'overcloud-gnocchi-metricd'
type: string
GnocchiMetricdWorkers:
default: '%{::os_workers}'
description: Number of workers for Gnocchi MetricD
type: string
MetricProcessingDelay:
default: 30
description: Delay between processing metrics.
type: number
resources:
GnocchiServiceBase:
type: ./gnocchi-base.yaml
properties:
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
description: Role data for the Gnocchi role.
value:
service_name: gnocchi_metricd
monitoring_subscription: {get_param: MonitoringSubscriptionGnocchiMetricd}
config_settings:
map_merge:
- get_attr: [GnocchiServiceBase, role_data, config_settings]
- gnocchi::metricd::workers: {get_param: GnocchiMetricdWorkers}
gnocchi::metricd::metric_processing_delay: {get_param: MetricProcessingDelay}
step_config: |
include ::tripleo::profile::base::gnocchi::metricd
upgrade_tasks: []

View File

@ -1,63 +0,0 @@
heat_template_version: rocky
description: >
Gnocchi service configured with Puppet
parameters:
ServiceData:
default: {}
description: Dictionary packing service data
type: json
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. This
mapping overrides those in ServiceNetMapDefaults.
type: json
DefaultPasswords:
default: {}
type: json
RoleName:
default: ''
description: Role name on which the service is applied
type: string
RoleParameters:
default: {}
description: Parameters specific to the role
type: json
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
MonitoringSubscriptionGnocchiStatsd:
default: 'overcloud-gnocchi-statsd'
type: string
resources:
GnocchiServiceBase:
type: ./gnocchi-base.yaml
properties:
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
description: Role data for the Gnocchi role.
value:
service_name: gnocchi_statsd
monitoring_subscription: {get_param: MonitoringSubscriptionGnocchiStatsd}
config_settings:
map_merge:
- get_attr: [GnocchiServiceBase, role_data, config_settings]
- tripleo::gnocchi_statsd::firewall_rules:
'140 gnocchi-statsd':
dport: 8125
proto: 'udp'
step_config: |
include ::tripleo::profile::base::gnocchi::statsd
upgrade_tasks: []