2017-09-04 08:31:57 +02:00
|
|
|
heat_template_version: queens
|
2017-03-01 10:40:17 -05:00
|
|
|
|
|
|
|
description: >
|
|
|
|
OpenStack containerized Aodh Notifier service
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
DockerAodhNotifierImage:
|
|
|
|
description: image
|
|
|
|
type: string
|
2017-06-23 18:21:43 +02:00
|
|
|
DockerAodhConfigImage:
|
|
|
|
description: The container image to use for the aodh config_volume
|
|
|
|
type: string
|
2017-03-01 10:40:17 -05: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-03-01 10:40:17 -05: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
|
|
|
|
DefaultPasswords:
|
|
|
|
default: {}
|
|
|
|
type: json
|
2017-02-24 06:27:58 -05:00
|
|
|
RoleName:
|
|
|
|
default: ''
|
|
|
|
description: Role name on which the service is applied
|
|
|
|
type: string
|
|
|
|
RoleParameters:
|
|
|
|
default: {}
|
|
|
|
description: Parameters specific to the role
|
2017-05-15 19:06:09 +02:00
|
|
|
type: json
|
2017-07-03 19:20:30 +03:00
|
|
|
UpgradeRemoveUnusedPackages:
|
|
|
|
default: false
|
|
|
|
description: Remove package if the service is being disabled during upgrade
|
|
|
|
type: boolean
|
2017-03-01 10:40:17 -05:00
|
|
|
|
|
|
|
resources:
|
|
|
|
|
2017-04-13 13:46:31 +00:00
|
|
|
ContainersCommon:
|
|
|
|
type: ./containers-common.yaml
|
|
|
|
|
2017-07-07 10:44:26 -04:00
|
|
|
MySQLClient:
|
|
|
|
type: ../../puppet/services/database/mysql-client.yaml
|
|
|
|
|
2017-03-01 10:40:17 -05:00
|
|
|
AodhNotifierBase:
|
|
|
|
type: ../../puppet/services/aodh-notifier.yaml
|
|
|
|
properties:
|
|
|
|
EndpointMap: {get_param: EndpointMap}
|
2017-06-22 17:25:03 +02:00
|
|
|
ServiceData: {get_param: ServiceData}
|
2017-03-01 10:40:17 -05:00
|
|
|
ServiceNetMap: {get_param: ServiceNetMap}
|
|
|
|
DefaultPasswords: {get_param: DefaultPasswords}
|
2017-02-24 06:27:58 -05:00
|
|
|
RoleName: {get_param: RoleName}
|
|
|
|
RoleParameters: {get_param: RoleParameters}
|
2017-03-01 10:40:17 -05:00
|
|
|
|
|
|
|
outputs:
|
|
|
|
role_data:
|
|
|
|
description: Role data for the Aodh API role.
|
|
|
|
value:
|
|
|
|
service_name: {get_attr: [AodhNotifierBase, role_data, service_name]}
|
|
|
|
config_settings:
|
|
|
|
map_merge:
|
|
|
|
- get_attr: [AodhNotifierBase, role_data, config_settings]
|
2017-08-31 11:07:11 +02:00
|
|
|
logging_source: {get_attr: [AodhNotifierBase, role_data, logging_source]}
|
|
|
|
logging_groups: {get_attr: [AodhNotifierBase, role_data, logging_groups]}
|
2017-03-01 10:40:17 -05:00
|
|
|
service_config_settings: {get_attr: [AodhNotifierBase, role_data, service_config_settings]}
|
|
|
|
# BEGIN DOCKER SETTINGS
|
|
|
|
puppet_config:
|
|
|
|
config_volume: aodh
|
|
|
|
puppet_tags: aodh_config
|
2017-11-13 14:51:37 -05:00
|
|
|
step_config:
|
|
|
|
list_join:
|
|
|
|
- "\n"
|
|
|
|
- - {get_attr: [AodhNotifierBase, role_data, step_config]}
|
|
|
|
- {get_attr: [MySQLClient, role_data, step_config]}
|
2017-07-12 11:41:57 +12:00
|
|
|
config_image: {get_param: DockerAodhConfigImage}
|
2017-03-01 10:40:17 -05:00
|
|
|
kolla_config:
|
2017-06-07 15:35:55 +02:00
|
|
|
/var/lib/kolla/config_files/aodh_notifier.json:
|
2017-03-29 14:11:21 +02:00
|
|
|
command: /usr/bin/aodh-notifier
|
2017-06-21 16:02:55 +02:00
|
|
|
config_files:
|
|
|
|
- source: "/var/lib/kolla/config_files/src/*"
|
|
|
|
dest: "/"
|
|
|
|
merge: true
|
|
|
|
preserve_properties: true
|
2017-03-07 17:12:36 +01:00
|
|
|
permissions:
|
|
|
|
- path: /var/log/aodh
|
|
|
|
owner: aodh:aodh
|
|
|
|
recurse: true
|
2017-03-01 10:40:17 -05:00
|
|
|
docker_config:
|
|
|
|
step_4:
|
|
|
|
aodh_notifier:
|
2017-07-12 11:41:57 +12:00
|
|
|
image: {get_param: DockerAodhNotifierImage}
|
2017-03-01 10:40:17 -05:00
|
|
|
net: host
|
|
|
|
privileged: false
|
|
|
|
restart: always
|
2017-09-11 21:59:33 -04:00
|
|
|
healthcheck:
|
|
|
|
test: /openstack/healthcheck
|
2017-03-01 10:40:17 -05:00
|
|
|
volumes:
|
2017-04-25 10:55:25 +03:00
|
|
|
list_concat:
|
|
|
|
- {get_attr: [ContainersCommon, volumes]}
|
|
|
|
-
|
2017-06-07 15:35:55 +02:00
|
|
|
- /var/lib/kolla/config_files/aodh_notifier.json:/var/lib/kolla/config_files/config.json:ro
|
2017-06-21 16:02:55 +02:00
|
|
|
- /var/lib/config-data/puppet-generated/aodh/:/var/lib/kolla/config_files/src:ro
|
2017-03-07 17:12:36 +01:00
|
|
|
- /var/log/containers/aodh:/var/log/aodh
|
2017-03-01 10:40:17 -05:00
|
|
|
environment:
|
|
|
|
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
2017-03-07 17:12:36 +01:00
|
|
|
host_prep_tasks:
|
|
|
|
- name: create persistent logs directory
|
|
|
|
file:
|
|
|
|
path: /var/log/containers/aodh
|
|
|
|
state: directory
|
2017-11-08 18:19:25 +01:00
|
|
|
- name: aodh logs readme
|
|
|
|
copy:
|
|
|
|
dest: /var/log/aodh/readme.txt
|
|
|
|
content: |
|
|
|
|
Log files from aodh containers can be found under
|
|
|
|
/var/log/containers/aodh and /var/log/containers/httpd/aodh-api.
|
|
|
|
ignore_errors: true
|
2017-03-14 13:27:23 -04:00
|
|
|
upgrade_tasks:
|
2017-08-07 11:21:31 +02:00
|
|
|
- name: Check if aodh_notifier is deployed
|
|
|
|
command: systemctl is-enabled --quiet openstack-aodh-notifier
|
|
|
|
tags: common
|
|
|
|
ignore_errors: True
|
|
|
|
register: aodh_notifier_enabled
|
|
|
|
- name: "PreUpgrade step0,validation: Check service openstack-aodh-notifier is running"
|
|
|
|
command: systemctl is-active --quiet openstack-aodh-notifier
|
2018-01-31 11:06:53 +01:00
|
|
|
when:
|
|
|
|
- step|int == 0
|
|
|
|
- aodh_notifier_enabled.rc == 0
|
2017-10-11 09:51:08 +03:00
|
|
|
tags: validation
|
2017-03-14 13:27:23 -04:00
|
|
|
- name: Stop and disable openstack-aodh-notifier service
|
2018-01-31 11:06:53 +01:00
|
|
|
when:
|
|
|
|
- step|int == 2
|
|
|
|
- aodh_notifier_enabled.rc == 0
|
2017-10-11 09:51:08 +03:00
|
|
|
service: name=openstack-aodh-notifier.service state=stopped enabled=no
|
|
|
|
- name: Set fact for removal of openstack-aodh-notifier package
|
|
|
|
when: step|int == 2
|
|
|
|
set_fact:
|
|
|
|
remove_aodh_notifier_package: {get_param: UpgradeRemoveUnusedPackages}
|
2017-07-03 19:20:30 +03:00
|
|
|
- name: Remove openstack-aodh-notifier package if operator requests it
|
|
|
|
yum: name=openstack-aodh-notifier state=removed
|
|
|
|
ignore_errors: True
|
2018-01-31 11:06:53 +01:00
|
|
|
when:
|
|
|
|
- step|int == 2
|
|
|
|
- remove_aodh_notifier_package|bool
|