diff --git a/ci/environments/scenario001-standalone.yaml b/ci/environments/scenario001-standalone.yaml index 2223562b11..dddcb917c9 100644 --- a/ci/environments/scenario001-standalone.yaml +++ b/ci/environments/scenario001-standalone.yaml @@ -12,9 +12,9 @@ resource_registry: 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::Collectd: ../../deployment/metrics/collectd-container-puppet.yaml - OS::TripleO::Services::GnocchiApi: ../../docker/services/gnocchi-api.yaml - OS::TripleO::Services::GnocchiMetricd: ../../docker/services/gnocchi-metricd.yaml - OS::TripleO::Services::GnocchiStatsd: ../../docker/services/gnocchi-statsd.yaml + OS::TripleO::Services::GnocchiApi: ../../deployment/gnocchi/gnocchi-api-container-puppet.yaml + OS::TripleO::Services::GnocchiMetricd: ../../deployment/gnocchi/gnocchi-metricd-container-puppet.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::HeatApiCfn: ../../deployment/heat/heat-api-cfn-container-puppet.yaml OS::TripleO::Services::HeatApiCloudwatch: ../../deployment/heat/heat-api-cloudwatch-disabled-puppet.yaml diff --git a/ci/environments/scenario002-standalone.yaml b/ci/environments/scenario002-standalone.yaml index 663f8fefbc..03fca1678e 100644 --- a/ci/environments/scenario002-standalone.yaml +++ b/ci/environments/scenario002-standalone.yaml @@ -6,9 +6,9 @@ resource_registry: 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::ComputeCeilometerAgent: ../../deployment/ceilometer/ceilometer-agent-compute-container-puppet.yaml - OS::TripleO::Services::GnocchiApi: ../../docker/services/gnocchi-api.yaml - OS::TripleO::Services::GnocchiMetricd: ../../docker/services/gnocchi-metricd.yaml - OS::TripleO::Services::GnocchiStatsd: ../../docker/services/gnocchi-statsd.yaml + OS::TripleO::Services::GnocchiApi: ../../deployment/gnocchi/gnocchi-api-container-puppet.yaml + OS::TripleO::Services::GnocchiMetricd: ../../deployment/gnocchi/gnocchi-metricd-container-puppet.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::HeatApiCfn: ../../deployment/heat/heat-api-cfn-container-puppet.yaml OS::TripleO::Services::HeatApiCloudwatch: ../../deployment/heat/heat-api-cloudwatch-disabled-puppet.yaml diff --git a/docker/services/gnocchi-api.yaml b/deployment/gnocchi/gnocchi-api-container-puppet.yaml similarity index 64% rename from docker/services/gnocchi-api.yaml rename to deployment/gnocchi/gnocchi-api-container-puppet.yaml index 36ccaac850..ffe1a87a49 100644 --- a/docker/services/gnocchi-api.yaml +++ b/deployment/gnocchi/gnocchi-api-container-puppet.yaml @@ -65,49 +65,166 @@ parameters: description: Path to use when file driver is used. This could be NFS or a flat file. 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: - + cors_allowed_origin_unset: {equals : [{get_param: GnocchiCorsAllowedOrigin}, '']} internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]} resources: ContainersCommon: - type: ./containers-common.yaml + type: ../../docker/services/containers-common.yaml - GnocchiApiPuppetBase: - type: ../../puppet/services/gnocchi-api.yaml - properties: - EndpointMap: {get_param: EndpointMap} - ServiceData: {get_param: ServiceData} - ServiceNetMap: {get_param: ServiceNetMap} - DefaultPasswords: {get_param: DefaultPasswords} - RoleName: {get_param: RoleName} - RoleParameters: {get_param: RoleParameters} + 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: ../../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: role_data: description: Role data for the gnocchi API role. value: - service_name: {get_attr: [GnocchiApiPuppetBase, role_data, service_name]} + service_name: gnocchi_api + monitoring_subscription: {get_param: MonitoringSubscriptionGnocchiApi} config_settings: 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 + - + 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: map_merge: - - get_attr: [GnocchiApiPuppetBase, role_data, service_config_settings] + - get_attr: [GnocchiServiceBase, role_data, 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')}" # BEGIN DOCKER SETTINGS puppet_config: config_volume: gnocchi puppet_tags: gnocchi_api_paste_ini,gnocchi_config - step_config: - get_attr: [GnocchiApiPuppetBase, role_data, step_config] + step_config: | + include ::tripleo::profile::base::gnocchi::api config_image: {get_param: DockerGnocchiConfigImage} kolla_config: /var/lib/kolla/config_files/gnocchi_api.json: @@ -256,7 +373,7 @@ outputs: state: directory upgrade_tasks: [] metadata_settings: - get_attr: [GnocchiApiPuppetBase, role_data, metadata_settings] + get_attr: [ApacheServiceBase, role_data, metadata_settings] post_upgrade_tasks: - when: step|int == 1 import_role: diff --git a/puppet/services/gnocchi-base.yaml b/deployment/gnocchi/gnocchi-base.yaml similarity index 100% rename from puppet/services/gnocchi-base.yaml rename to deployment/gnocchi/gnocchi-base.yaml diff --git a/docker/services/gnocchi-metricd.yaml b/deployment/gnocchi/gnocchi-metricd-container-puppet.yaml similarity index 86% rename from docker/services/gnocchi-metricd.yaml rename to deployment/gnocchi/gnocchi-metricd-container-puppet.yaml index f62499c8e6..a1b21adb58 100644 --- a/docker/services/gnocchi-metricd.yaml +++ b/deployment/gnocchi/gnocchi-metricd-container-puppet.yaml @@ -53,22 +53,33 @@ parameters: description: Path to use when file driver is used. This could be NFS or a flat file. 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: ContainersCommon: - type: ./containers-common.yaml + type: ../../docker/services/containers-common.yaml MySQLClient: type: ../../deployment/database/mysql-client.yaml - GnocchiMetricdBase: - type: ../../puppet/services/gnocchi-metricd.yaml + GnocchiServiceBase: + type: ./gnocchi-base.yaml properties: - EndpointMap: {get_param: EndpointMap} ServiceData: {get_param: ServiceData} ServiceNetMap: {get_param: ServiceNetMap} DefaultPasswords: {get_param: DefaultPasswords} + EndpointMap: {get_param: EndpointMap} RoleName: {get_param: RoleName} RoleParameters: {get_param: RoleParameters} @@ -76,9 +87,14 @@ outputs: role_data: description: Role data for the Gnocchi API role. value: - service_name: {get_attr: [GnocchiMetricdBase, role_data, service_name]} - config_settings: {get_attr: [GnocchiMetricdBase, role_data, config_settings]} - service_config_settings: {get_attr: [GnocchiMetricdBase, role_data, service_config_settings]} + service_name: gnocchi_metricd + 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 puppet_config: config_volume: gnocchi @@ -86,7 +102,7 @@ outputs: step_config: list_join: - "\n" - - - {get_attr: [GnocchiMetricdBase, role_data, step_config]} + - - "include ::tripleo::profile::base::gnocchi::metricd" - {get_attr: [MySQLClient, role_data, step_config]} config_image: {get_param: DockerGnocchiConfigImage} kolla_config: diff --git a/docker/services/gnocchi-statsd.yaml b/deployment/gnocchi/gnocchi-statsd-container-puppet.yaml similarity index 89% rename from docker/services/gnocchi-statsd.yaml rename to deployment/gnocchi/gnocchi-statsd-container-puppet.yaml index 109bf4025f..15841d9d4e 100644 --- a/docker/services/gnocchi-statsd.yaml +++ b/deployment/gnocchi/gnocchi-statsd-container-puppet.yaml @@ -53,22 +53,25 @@ parameters: description: Path to use when file driver is used. This could be NFS or a flat file. type: string + MonitoringSubscriptionGnocchiStatsd: + default: 'overcloud-gnocchi-statsd' + type: string resources: ContainersCommon: - type: ./containers-common.yaml + type: ../../docker/services/containers-common.yaml MySQLClient: type: ../../deployment/database/mysql-client.yaml - GnocchiStatsdBase: - type: ../../puppet/services/gnocchi-statsd.yaml + GnocchiServiceBase: + type: ./gnocchi-base.yaml properties: - EndpointMap: {get_param: EndpointMap} ServiceData: {get_param: ServiceData} ServiceNetMap: {get_param: ServiceNetMap} DefaultPasswords: {get_param: DefaultPasswords} + EndpointMap: {get_param: EndpointMap} RoleName: {get_param: RoleName} RoleParameters: {get_param: RoleParameters} @@ -76,9 +79,16 @@ outputs: role_data: description: Role data for the Gnocchi API role. value: - service_name: {get_attr: [GnocchiStatsdBase, role_data, service_name]} - config_settings: {get_attr: [GnocchiStatsdBase, role_data, config_settings]} - service_config_settings: {get_attr: [GnocchiStatsdBase, role_data, service_config_settings]} + 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' + service_config_settings: {get_attr: [GnocchiServiceBase, role_data, service_config_settings]} # BEGIN DOCKER SETTINGS puppet_config: config_volume: gnocchi @@ -86,7 +96,7 @@ outputs: step_config: list_join: - "\n" - - - {get_attr: [GnocchiStatsdBase, role_data, step_config]} + - - "include ::tripleo::profile::base::gnocchi::statsd" - {get_attr: [MySQLClient, role_data, step_config]} config_image: {get_param: DockerGnocchiConfigImage} kolla_config: diff --git a/environments/services-baremetal/undercloud-gnocchi.yaml b/environments/services-baremetal/undercloud-gnocchi.yaml index 98dc19b59d..df46b5ca2b 100644 --- a/environments/services-baremetal/undercloud-gnocchi.yaml +++ b/environments/services-baremetal/undercloud-gnocchi.yaml @@ -1,5 +1,5 @@ resource_registry: - OS::TripleO::Services::UndercloudGnocchiApi: ../../puppet/services/gnocchi-api.yaml - OS::TripleO::Services::UndercloudGnocchiMetricd: ../../puppet/services/gnocchi-metricd.yaml - OS::TripleO::Services::UndercloudGnocchiStatsd: ../../puppet/services/gnocchi-statsd.yaml + OS::TripleO::Services::UndercloudGnocchiApi: ../../deployment/gnocchi/gnocchi-api-container-puppet.yaml + OS::TripleO::Services::UndercloudGnocchiMetricd: ../../deployment/gnocchi/gnocchi-metricd-container-puppet.yaml + OS::TripleO::Services::UndercloudGnocchiStatsd: ../../deployment/gnocchi/gnocchi-statsd-container-puppet.yaml OS::TripleO::Services::UndercloudRedis: ../../deployment/database/redis-container-puppet.yaml diff --git a/environments/services/undercloud-gnocchi.yaml b/environments/services/undercloud-gnocchi.yaml index 216116cbe7..5e71e4fe74 100644 --- a/environments/services/undercloud-gnocchi.yaml +++ b/environments/services/undercloud-gnocchi.yaml @@ -1,7 +1,7 @@ # DEPRECATED. This file will be removed in the Stein release as it is no longer # needed resource_registry: - OS::TripleO::Services::GnocchiApi: ../../docker/services/gnocchi-api.yaml - OS::TripleO::Services::GnocchiMetricd: ../../docker/services/gnocchi-metricd.yaml - OS::TripleO::Services::GnocchiStatsd: ../../docker/services/gnocchi-statsd.yaml + OS::TripleO::Services::GnocchiApi: ../../deployment/gnocchi/gnocchi-api-container-puppet.yaml + OS::TripleO::Services::GnocchiMetricd: ../../deployment/gnocchi/gnocchi-metricd-container-puppet.yaml + OS::TripleO::Services::GnocchiStatsd: ../../deployment/gnocchi/gnocchi-statsd-container-puppet.yaml OS::TripleO::Services::Redis: ../../deployment/database/redis-container-puppet.yaml diff --git a/overcloud-resource-registry-puppet.j2.yaml b/overcloud-resource-registry-puppet.j2.yaml index d29fd799bb..1580789c83 100644 --- a/overcloud-resource-registry-puppet.j2.yaml +++ b/overcloud-resource-registry-puppet.j2.yaml @@ -220,9 +220,9 @@ resource_registry: OS::TripleO::Services::ComputeCeilometerAgent: deployment/ceilometer/ceilometer-agent-compute-container-puppet.yaml OS::TripleO::Services::Horizon: deployment/horizon/horizon-container-puppet.yaml #Gnocchi services - OS::TripleO::Services::GnocchiApi: docker/services/gnocchi-api.yaml - OS::TripleO::Services::GnocchiMetricd: docker/services/gnocchi-metricd.yaml - OS::TripleO::Services::GnocchiStatsd: docker/services/gnocchi-statsd.yaml + OS::TripleO::Services::GnocchiApi: deployment/gnocchi/gnocchi-api-container-puppet.yaml + OS::TripleO::Services::GnocchiMetricd: deployment/gnocchi/gnocchi-metricd-container-puppet.yaml + OS::TripleO::Services::GnocchiStatsd: deployment/gnocchi/gnocchi-statsd-container-puppet.yaml # Drop Xinetd OS::TripleO::Services::Xinetd: OS::Heat::None diff --git a/puppet/services/gnocchi-api.yaml b/puppet/services/gnocchi-api.yaml deleted file mode 100644 index a93d1b9bce..0000000000 --- a/puppet/services/gnocchi-api.yaml +++ /dev/null @@ -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 diff --git a/puppet/services/gnocchi-metricd.yaml b/puppet/services/gnocchi-metricd.yaml deleted file mode 100644 index a073631c30..0000000000 --- a/puppet/services/gnocchi-metricd.yaml +++ /dev/null @@ -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: [] diff --git a/puppet/services/gnocchi-statsd.yaml b/puppet/services/gnocchi-statsd.yaml deleted file mode 100644 index 2fa2635460..0000000000 --- a/puppet/services/gnocchi-statsd.yaml +++ /dev/null @@ -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: []