tripleo-heat-templates/deployment/ceilometer/ceilometer-agent-notification-container-puppet.yaml
Jose Luis Franco Arza 8783ec9c45 Remove ffwd-upgrade leftovers from THT.
Now that the FFU process relies on the upgrade_tasks and deployment
tasts there is no need to keep the old fast_forward_upgrade_tasks.

This patch removes all the fast_forward_upgrade_tasks section from
the services, as well as from the common structures.

Change-Id: I39b8a846145fdc2fb3d0f6853df541c773ee455e
2020-07-23 15:33:25 +00:00

228 lines
8.9 KiB
YAML

heat_template_version: rocky
description: >
OpenStack containerized Ceilometer Agent Notification service
parameters:
ContainerCeilometerNotificationImage:
description: image
type: string
ContainerCeilometerConfigImage:
description: The container image to use for the ceilometer config_volume
type: string
CeilometerAgentNotificationLoggingSource:
type: json
default:
tag: openstack.ceilometer.agent.notification
file: /var/log/containers/ceilometer/agent-notification.log
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
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
MonitoringSubscriptionCeilometerNotification:
default: 'overcloud-ceilometer-agent-notification'
type: string
MetricsQdrPort:
default: 5666
description: Service name or port number on which the qdrouterd will accept
connections.
type: number
CeilometerQdrPublishEvents:
default: false
description: Whether to send events to MetricsQdr service.
type: boolean
CeilometerQdrPublishMetrics:
default: false
description: Whether to send telemetry data to MetricsQdr service.
type: boolean
CeilometerQdrEventsConfig:
default:
driver: amqp
topic: event
description: Configuration for notifier publisher for events.
type: json
CeilometerQdrMetricsConfig:
default:
driver: amqp
topic: metering
description: Configuration for notifier publisher for metrics.
type: json
ManageEventPipeline:
default: true
description: Whether to manage event_pipeline.yaml.
type: boolean
EventPipelinePublishers:
default: []
description: >
A list of publishers to put in event_pipeline.yaml. When the
collector is used, override this with notifier:// publisher.
If zaqar is enabled, you can also publish to a zaqar queue
by including "zaqar://?queue=queue_name" in this list.
Set ManageEventPipeline to true for override to take effect.
type: comma_delimited_list
ManagePipeline:
default: false
description: Whether to manage pipeline.yaml.
type: boolean
PipelinePublishers:
default: []
description: >
A list of publishers to put in pipeline.yaml. When the
collector is used, override this with notifier:// publisher.
Set ManagePipeline to true for override to take effect.
type: comma_delimited_list
resources:
ContainersCommon:
type: ../containers-common.yaml
CeilometerServiceBase:
type: ./ceilometer-base-container-puppet.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}
conditions:
ceilometer_qdr_publish:
or:
- {equals: [{get_param: CeilometerQdrPublishEvents}, true]}
- {equals: [{get_param: CeilometerQdrPublishMetrics}, true]}
outputs:
role_data:
description: Role data for the Ceilometer Agent Notification role.
value:
service_name: ceilometer_agent_notification
monitoring_subscription: {get_param: MonitoringSubscriptionCeilometerNotification}
config_settings:
map_merge:
- get_attr: [CeilometerServiceBase, role_data, config_settings]
- ceilometer::agent::notification::manage_event_pipeline: {get_param: ManageEventPipeline}
ceilometer::agent::notification::manage_pipeline: {get_param: ManagePipeline}
tripleo::profile::base::ceilometer::agent::notification::notifier_enabled: {get_param: CeilometerQdrPublishMetrics}
tripleo::profile::base::ceilometer::agent::notification::notifier_events_enabled: {get_param: CeilometerQdrPublishEvents}
tripleo::profile::base::ceilometer::agent::notification::pipeline_publishers: {get_param: PipelinePublishers}
tripleo::profile::base::ceilometer::agent::notification::event_pipeline_publishers: {get_param: EventPipelinePublishers}
tripleo::profile::base::ceilometer::agent::notification::notifier_params: {get_param: CeilometerQdrMetricsConfig}
tripleo::profile::base::ceilometer::agent::notification::notifier_event_params: {get_param: CeilometerQdrEventsConfig}
- if: #Ceilometer connection to qdr
- ceilometer_qdr_publish
- tripleo::profile::base::ceilometer::agent::notification::notifier_host_addr:
str_replace:
template:
"%{hiera('$NETWORK')}"
params:
$NETWORK:
get_param:
- ServiceNetMap
- str_replace:
template: "ROLENAMEMetricsQdrNetwork"
params:
ROLENAME: {get_param: RoleName}
tripleo::profile::base::ceilometer::agent::notification::notifier_host_port: {get_param: MetricsQdrPort}
- {}
service_config_settings:
map_merge:
- get_attr: [CeilometerServiceBase, role_data, service_config_settings]
- rsyslog:
tripleo_logging_sources_ceilometer_agent_notification:
- {get_param: CeilometerAgentNotificationLoggingSource}
# BEGIN DOCKER SETTINGS
puppet_config:
config_volume: ceilometer
puppet_tags: ceilometer_config
step_config: |
include tripleo::profile::base::ceilometer::agent::notification
config_image: {get_param: ContainerCeilometerConfigImage}
kolla_config:
/var/lib/kolla/config_files/ceilometer_agent_notification.json:
command: /usr/bin/ceilometer-agent-notification --logfile /var/log/ceilometer/agent-notification.log
config_files:
list_concat:
- - source: "/var/lib/kolla/config_files/src/*"
dest: "/"
merge: true
preserve_properties: true
docker_config:
step_3:
ceilometer_init_log:
start_order: 0
image: &ceilometer_agent_notification_image {get_param: ContainerCeilometerNotificationImage}
net: none
user: root
command: ['/bin/bash', '-c', 'chown -R ceilometer:ceilometer /var/log/ceilometer']
volumes:
- /var/log/containers/ceilometer:/var/log/ceilometer:z
step_4:
ceilometer_agent_notification:
image: *ceilometer_agent_notification_image
net: host
privileged: false
restart: always
healthcheck: {get_attr: [ContainersCommon, healthcheck_rpc_port]}
volumes:
list_concat:
- {get_attr: [ContainersCommon, volumes]}
-
- /var/lib/kolla/config_files/ceilometer_agent_notification.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/puppet-generated/ceilometer:/var/lib/kolla/config_files/src:ro
- /var/log/containers/ceilometer:/var/log/ceilometer:z
environment:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
host_prep_tasks:
- name: create persistent directories
file:
path: "{{ item.path }}"
state: directory
setype: "{{ item.setype }}"
mode: "{{ item.mode }}"
with_items:
- { 'path': /var/log/containers/ceilometer, 'setype': container_file_t, 'mode': '0750' }
- name: enable virt_sandbox_use_netlink for healthcheck
seboolean:
name: virt_sandbox_use_netlink
persistent: yes
state: yes
external_upgrade_tasks:
- when:
- step|int == 1
tags:
- never
- system_upgrade_transfer_data
- system_upgrade_stop_services
block:
- name: Stop ceilometer agent notification container
import_role:
name: tripleo_container_stop
vars:
tripleo_containers_to_stop:
- ceilometer_agent_notification
tripleo_delegate_to: "{{ groups['ceilometer_agent_notification'] | default([]) }}"