2017-09-04 08:31:57 +02:00
|
|
|
heat_template_version: queens
|
2017-02-28 15:57:14 -05:00
|
|
|
|
|
|
|
description: >
|
|
|
|
OpenStack containerized Gnocchi Statsd service
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
DockerGnocchiStatsdImage:
|
|
|
|
description: image
|
|
|
|
type: string
|
2017-06-23 18:21:43 +02:00
|
|
|
DockerGnocchiConfigImage:
|
|
|
|
description: The container image to use for the gnocchi config_volume
|
|
|
|
type: string
|
2017-02-28 15:57:14 -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-02-28 15:57:14 -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-10-02 15:22:08 -04:00
|
|
|
CephClientUserName:
|
|
|
|
default: openstack
|
|
|
|
type: string
|
2017-02-28 15:57:14 -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-02-28 15:57:14 -05:00
|
|
|
GnocchiStatsdBase:
|
|
|
|
type: ../../puppet/services/gnocchi-statsd.yaml
|
|
|
|
properties:
|
|
|
|
EndpointMap: {get_param: EndpointMap}
|
2017-06-22 17:25:03 +02:00
|
|
|
ServiceData: {get_param: ServiceData}
|
2017-02-28 15:57:14 -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-02-28 15:57:14 -05:00
|
|
|
|
|
|
|
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]}
|
2017-08-31 11:07:11 +02:00
|
|
|
logging_source: {get_attr: [GnocchiStatsdBase, role_data, logging_source]}
|
|
|
|
logging_groups: {get_attr: [GnocchiStatsdBase, role_data, logging_groups]}
|
2017-02-28 15:57:14 -05:00
|
|
|
service_config_settings: {get_attr: [GnocchiStatsdBase, role_data, service_config_settings]}
|
|
|
|
# BEGIN DOCKER SETTINGS
|
|
|
|
puppet_config:
|
|
|
|
config_volume: gnocchi
|
|
|
|
puppet_tags: gnocchi_config
|
2017-11-13 14:51:37 -05:00
|
|
|
step_config:
|
|
|
|
list_join:
|
|
|
|
- "\n"
|
|
|
|
- - {get_attr: [GnocchiStatsdBase, role_data, step_config]}
|
|
|
|
- {get_attr: [MySQLClient, role_data, step_config]}
|
2017-07-12 11:41:57 +12:00
|
|
|
config_image: {get_param: DockerGnocchiConfigImage}
|
2017-02-28 15:57:14 -05:00
|
|
|
kolla_config:
|
2017-06-07 15:35:55 +02:00
|
|
|
/var/lib/kolla/config_files/gnocchi_statsd.json:
|
2017-03-29 14:11:21 +02:00
|
|
|
command: /usr/bin/gnocchi-statsd
|
2017-06-21 16:02:55 +02:00
|
|
|
config_files:
|
|
|
|
- source: "/var/lib/kolla/config_files/src/*"
|
|
|
|
dest: "/"
|
|
|
|
merge: true
|
|
|
|
preserve_properties: true
|
2017-08-17 12:31:52 -04:00
|
|
|
- source: "/var/lib/kolla/config_files/src-ceph/"
|
|
|
|
dest: "/etc/ceph/"
|
|
|
|
merge: true
|
|
|
|
preserve_properties: true
|
2017-03-07 17:12:36 +01:00
|
|
|
permissions:
|
|
|
|
- path: /var/log/gnocchi
|
|
|
|
owner: gnocchi:gnocchi
|
|
|
|
recurse: true
|
2017-10-02 15:22:08 -04:00
|
|
|
- path:
|
|
|
|
str_replace:
|
|
|
|
template: /etc/ceph/ceph.client.USER.keyring
|
|
|
|
params:
|
|
|
|
USER: {get_param: CephClientUserName}
|
|
|
|
owner: gnocchi:gnocchi
|
|
|
|
perm: '0600'
|
2017-02-28 15:57:14 -05:00
|
|
|
docker_config:
|
2017-08-25 22:08:25 -04:00
|
|
|
step_5:
|
2017-02-28 15:57:14 -05:00
|
|
|
gnocchi_statsd:
|
2017-07-12 11:41:57 +12:00
|
|
|
image: {get_param: DockerGnocchiStatsdImage}
|
2017-02-28 15:57:14 -05:00
|
|
|
net: host
|
|
|
|
privileged: false
|
|
|
|
restart: always
|
|
|
|
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/gnocchi_statsd.json:/var/lib/kolla/config_files/config.json:ro
|
2017-06-21 16:02:55 +02:00
|
|
|
- /var/lib/config-data/puppet-generated/gnocchi/:/var/lib/kolla/config_files/src:ro
|
2017-03-07 17:12:36 +01:00
|
|
|
- /var/log/containers/gnocchi:/var/log/gnocchi
|
2017-08-17 12:31:52 -04:00
|
|
|
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
2017-02-28 15:57:14 -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/gnocchi
|
|
|
|
state: directory
|
2017-11-08 18:19:25 +01:00
|
|
|
- name: gnocchi logs readme
|
|
|
|
copy:
|
|
|
|
dest: /var/log/gnocchi/readme.txt
|
|
|
|
content: |
|
|
|
|
Log files from gnocchi containers can be found under
|
|
|
|
/var/log/containers/gnocchi and /var/log/containers/httpd/gnocchi-api.
|
|
|
|
ignore_errors: true
|
2017-08-17 12:31:52 -04:00
|
|
|
- name: ensure ceph configurations exist
|
|
|
|
file:
|
|
|
|
path: /etc/ceph
|
|
|
|
state: directory
|
2017-03-14 15:15:46 -04:00
|
|
|
upgrade_tasks:
|
2017-08-07 12:53:28 +02:00
|
|
|
- name: Check if gnocchi_statsd is deployed
|
|
|
|
command: systemctl is-enabled --quiet openstack-gnocchi-statsd
|
|
|
|
tags: common
|
|
|
|
ignore_errors: True
|
|
|
|
register: gnocchi_statsd_enabled
|
|
|
|
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-statsd is running"
|
|
|
|
command: systemctl is-active --quiet openstack-gnocchi-statsd
|
|
|
|
when: gnocchi_statsd_enabled.rc == 0
|
|
|
|
tags: step0,validation
|
2017-03-14 15:15:46 -04:00
|
|
|
- name: Stop and disable openstack-gnocchi-statsd service
|
|
|
|
tags: step2
|
2017-08-07 12:53:28 +02:00
|
|
|
when: gnocchi_statsd_enabled.rc == 0
|
2017-03-14 15:15:46 -04:00
|
|
|
service: name=openstack-gnocchi-statsd.service state=stopped enabled=no
|