2018-03-05 19:28:35 +01:00
|
|
|
heat_template_version: rocky
|
2017-04-06 14:05:41 -04:00
|
|
|
|
|
|
|
description: >
|
|
|
|
OpenStack containerized Ceilometer Agent Central service
|
|
|
|
|
|
|
|
parameters:
|
2019-05-13 10:13:04 -04:00
|
|
|
ContainerCeilometerCentralImage:
|
2017-04-06 14:05:41 -04:00
|
|
|
description: image
|
|
|
|
type: string
|
2019-05-13 10:13:04 -04:00
|
|
|
ContainerCeilometerConfigImage:
|
2017-06-23 18:21:43 +02:00
|
|
|
description: The container image to use for the ceilometer config_volume
|
|
|
|
type: string
|
2018-05-18 10:18:43 +02:00
|
|
|
CeilometerAgentCentralLoggingSource:
|
|
|
|
type: json
|
|
|
|
default:
|
|
|
|
tag: openstack.ceilometer.agent.central
|
2019-07-03 11:49:46 +02:00
|
|
|
file: /var/log/containers/ceilometer/central.log
|
2017-04-06 14:05:41 -04:00
|
|
|
EndpointMap:
|
|
|
|
default: {}
|
|
|
|
description: Mapping of service endpoint -> protocol. Typically set
|
|
|
|
via parameter_defaults in the resource registry.
|
|
|
|
type: json
|
2017-06-22 17:25:03 +02:00
|
|
|
ServiceData:
|
|
|
|
default: {}
|
|
|
|
description: Dictionary packing service data
|
|
|
|
type: json
|
2017-04-06 14:05:41 -04:00
|
|
|
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
|
|
|
|
RoleName:
|
|
|
|
default: ''
|
|
|
|
description: Role name on which the service is applied
|
|
|
|
type: string
|
|
|
|
RoleParameters:
|
|
|
|
default: {}
|
|
|
|
description: Parameters specific to the role
|
|
|
|
type: json
|
2019-01-28 13:33:53 -07:00
|
|
|
RedisPassword:
|
|
|
|
description: The password for the redis service account.
|
|
|
|
type: string
|
|
|
|
hidden: true
|
|
|
|
MonitoringSubscriptionCeilometerCentral:
|
|
|
|
default: 'overcloud-ceilometer-agent-central'
|
|
|
|
type: string
|
2019-10-08 16:16:25 -04:00
|
|
|
CeilometerEnableGnocchi:
|
|
|
|
default: false
|
|
|
|
description: Whether to enable gnocchi usage.
|
|
|
|
type: boolean
|
2019-12-02 17:08:11 -05:00
|
|
|
CeilometerPassword:
|
|
|
|
description: The password for the ceilometer service account.
|
|
|
|
type: string
|
|
|
|
hidden: true
|
2019-10-08 16:16:25 -04:00
|
|
|
|
|
|
|
conditions:
|
|
|
|
ceilometer_enable_gnocchi: {equals: [{get_param: CeilometerEnableGnocchi}, True]}
|
2017-07-03 19:20:30 +03:00
|
|
|
|
2017-04-06 14:05:41 -04:00
|
|
|
resources:
|
|
|
|
|
|
|
|
ContainersCommon:
|
2019-04-05 12:16:13 -04:00
|
|
|
type: ../containers-common.yaml
|
2017-04-06 14:05:41 -04:00
|
|
|
|
2019-01-28 13:33:53 -07:00
|
|
|
CeilometerServiceBase:
|
|
|
|
type: ./ceilometer-base-container-puppet.yaml
|
2017-04-06 14:05:41 -04:00
|
|
|
properties:
|
2017-06-22 17:25:03 +02:00
|
|
|
ServiceData: {get_param: ServiceData}
|
2017-04-06 14:05:41 -04:00
|
|
|
ServiceNetMap: {get_param: ServiceNetMap}
|
2019-01-28 13:33:53 -07:00
|
|
|
EndpointMap: {get_param: EndpointMap}
|
2017-04-06 14:05:41 -04:00
|
|
|
RoleName: {get_param: RoleName}
|
|
|
|
RoleParameters: {get_param: RoleParameters}
|
|
|
|
|
|
|
|
outputs:
|
|
|
|
role_data:
|
|
|
|
description: Role data for the Ceilometer Agent Central role.
|
|
|
|
value:
|
2019-01-28 13:33:53 -07:00
|
|
|
service_name: ceilometer_agent_central
|
|
|
|
monitoring_subscription: {get_param: MonitoringSubscriptionCeilometerCentral}
|
2019-12-02 17:08:11 -05:00
|
|
|
keystone_resources:
|
|
|
|
ceilometer:
|
|
|
|
users:
|
|
|
|
ceilometer:
|
|
|
|
password: {get_param: CeilometerPassword}
|
|
|
|
roles:
|
|
|
|
- admin
|
2019-01-28 13:33:53 -07:00
|
|
|
config_settings:
|
|
|
|
map_merge:
|
|
|
|
- get_attr: [CeilometerServiceBase, role_data, config_settings]
|
|
|
|
- ceilometer_redis_password: {get_param: RedisPassword}
|
|
|
|
central_namespace: true
|
2018-05-18 10:18:43 +02:00
|
|
|
service_config_settings:
|
|
|
|
map_merge:
|
2019-01-28 13:33:53 -07:00
|
|
|
- get_attr: [CeilometerServiceBase, role_data, service_config_settings]
|
2019-07-03 11:49:46 +02:00
|
|
|
- rsyslog:
|
|
|
|
tripleo_logging_sources_ceilometer_agent_central:
|
2018-05-18 10:18:43 +02:00
|
|
|
- {get_param: CeilometerAgentCentralLoggingSource}
|
2017-04-06 14:05:41 -04:00
|
|
|
# BEGIN DOCKER SETTINGS
|
|
|
|
puppet_config:
|
|
|
|
config_volume: ceilometer
|
|
|
|
puppet_tags: ceilometer_config
|
2019-01-28 13:33:53 -07:00
|
|
|
step_config: |
|
2020-04-09 21:07:34 +09:00
|
|
|
include tripleo::profile::base::ceilometer::agent::polling
|
2019-05-13 10:13:04 -04:00
|
|
|
config_image: {get_param: ContainerCeilometerConfigImage}
|
2017-04-06 14:05:41 -04:00
|
|
|
kolla_config:
|
2017-06-07 15:35:55 +02:00
|
|
|
/var/lib/kolla/config_files/ceilometer_agent_central.json:
|
2017-09-06 12:14:12 -04:00
|
|
|
command: /usr/bin/ceilometer-polling --polling-namespaces central --logfile /var/log/ceilometer/central.log
|
2017-06-21 16:02:55 +02:00
|
|
|
config_files:
|
|
|
|
- source: "/var/lib/kolla/config_files/src/*"
|
|
|
|
dest: "/"
|
|
|
|
merge: true
|
|
|
|
preserve_properties: true
|
2017-04-06 14:05:41 -04:00
|
|
|
docker_config:
|
|
|
|
step_3:
|
|
|
|
ceilometer_init_log:
|
|
|
|
start_order: 0
|
2019-05-13 10:13:04 -04:00
|
|
|
image: &ceilometer_agent_central_image {get_param: ContainerCeilometerCentralImage}
|
2019-01-14 15:06:34 +05:30
|
|
|
net: none
|
2017-04-06 14:05:41 -04:00
|
|
|
user: root
|
|
|
|
command: ['/bin/bash', '-c', 'chown -R ceilometer:ceilometer /var/log/ceilometer']
|
|
|
|
volumes:
|
2018-09-05 17:28:06 +02:00
|
|
|
- /var/log/containers/ceilometer:/var/log/ceilometer:z
|
2017-04-06 14:05:41 -04:00
|
|
|
step_4:
|
|
|
|
ceilometer_agent_central:
|
|
|
|
image: *ceilometer_agent_central_image
|
|
|
|
net: host
|
|
|
|
privileged: false
|
|
|
|
restart: always
|
2017-09-11 21:59:33 -04:00
|
|
|
healthcheck:
|
|
|
|
test: /openstack/healthcheck
|
2017-04-06 14:05:41 -04:00
|
|
|
volumes:
|
|
|
|
list_concat:
|
|
|
|
- {get_attr: [ContainersCommon, volumes]}
|
|
|
|
-
|
2017-06-07 15:35:55 +02:00
|
|
|
- /var/lib/kolla/config_files/ceilometer_agent_central.json:/var/lib/kolla/config_files/config.json:ro
|
2019-12-04 08:47:19 +02:00
|
|
|
- /var/lib/config-data/puppet-generated/ceilometer:/var/lib/kolla/config_files/src:ro
|
2018-10-19 10:15:01 +02:00
|
|
|
- /var/log/containers/ceilometer:/var/log/ceilometer:z
|
2017-04-06 14:05:41 -04:00
|
|
|
environment:
|
2019-10-07 23:36:43 -04:00
|
|
|
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
|
2017-04-06 14:05:41 -04:00
|
|
|
step_5:
|
2019-10-08 16:16:25 -04:00
|
|
|
map_merge:
|
|
|
|
- if:
|
|
|
|
- ceilometer_enable_gnocchi
|
|
|
|
- ceilometer_gnocchi_upgrade:
|
|
|
|
start_order: 99
|
|
|
|
image: *ceilometer_agent_central_image
|
|
|
|
net: host
|
|
|
|
detach: false
|
|
|
|
privileged: false
|
|
|
|
user: root
|
|
|
|
volumes:
|
|
|
|
list_concat:
|
|
|
|
- {get_attr: [ContainersCommon, volumes]}
|
|
|
|
-
|
|
|
|
- /var/lib/config-data/ceilometer/etc/ceilometer/:/etc/ceilometer/:ro
|
|
|
|
- /var/log/containers/ceilometer:/var/log/ceilometer:z
|
|
|
|
command:
|
|
|
|
- '/usr/bin/bootstrap_host_exec'
|
|
|
|
- 'ceilometer_agent_central'
|
|
|
|
- "su ceilometer -s /bin/bash -c 'for n in {1..10}; do /usr/bin/ceilometer-upgrade && exit 0 || sleep 30; done; exit 1'"
|
|
|
|
- {}
|
2017-09-06 12:14:12 -04:00
|
|
|
host_prep_tasks:
|
2019-01-14 16:06:21 +01:00
|
|
|
- name: create persistent directories
|
2017-09-06 12:14:12 -04:00
|
|
|
file:
|
2019-01-14 16:06:21 +01:00
|
|
|
path: "{{ item.path }}"
|
2017-09-06 12:14:12 -04:00
|
|
|
state: directory
|
2019-01-14 16:06:21 +01:00
|
|
|
setype: "{{ item.setype }}"
|
2020-04-06 23:15:44 +02:00
|
|
|
mode: "{{ item.mode }}"
|
2019-01-14 16:06:21 +01:00
|
|
|
with_items:
|
2020-02-07 13:33:20 +01:00
|
|
|
- { 'path': /var/log/containers/ceilometer, 'setype': container_file_t, 'mode': '0750' }
|
2019-07-04 10:17:24 +02:00
|
|
|
external_upgrade_tasks:
|
|
|
|
- when:
|
|
|
|
- step|int == 1
|
|
|
|
tags:
|
|
|
|
- never
|
|
|
|
- system_upgrade_transfer_data
|
|
|
|
- system_upgrade_stop_services
|
|
|
|
block:
|
|
|
|
- name: Stop ceilometer agent central container
|
|
|
|
import_role:
|
2020-01-20 10:31:22 -06:00
|
|
|
name: tripleo_container_stop
|
2019-07-04 10:17:24 +02:00
|
|
|
vars:
|
|
|
|
tripleo_containers_to_stop:
|
|
|
|
- ceilometer_agent_central
|
|
|
|
tripleo_delegate_to: "{{ groups['ceilometer_agent_central'] | default([]) }}"
|