Merge "Use Docker healthchecks for gnocchi services"
This commit is contained in:
commit
ca8ab179a1
@ -9,6 +9,7 @@ gnocchi_services:
|
|||||||
image: "{{ gnocchi_api_image_full }}"
|
image: "{{ gnocchi_api_image_full }}"
|
||||||
volumes: "{{ gnocchi_api_default_volumes + gnocchi_api_extra_volumes }}"
|
volumes: "{{ gnocchi_api_default_volumes + gnocchi_api_extra_volumes }}"
|
||||||
dimensions: "{{ gnocchi_api_dimensions }}"
|
dimensions: "{{ gnocchi_api_dimensions }}"
|
||||||
|
healthcheck: "{{ gnocchi_api_healthcheck }}"
|
||||||
haproxy:
|
haproxy:
|
||||||
gnocchi_api:
|
gnocchi_api:
|
||||||
enabled: "{{ enable_gnocchi }}"
|
enabled: "{{ enable_gnocchi }}"
|
||||||
@ -27,6 +28,7 @@ gnocchi_services:
|
|||||||
image: "{{ gnocchi_metricd_image_full }}"
|
image: "{{ gnocchi_metricd_image_full }}"
|
||||||
volumes: "{{ gnocchi_metricd_default_volumes + gnocchi_metricd_extra_volumes }}"
|
volumes: "{{ gnocchi_metricd_default_volumes + gnocchi_metricd_extra_volumes }}"
|
||||||
dimensions: "{{ gnocchi_metricd_dimensions }}"
|
dimensions: "{{ gnocchi_metricd_dimensions }}"
|
||||||
|
healthcheck: "{{ gnocchi_metricd_healthcheck }}"
|
||||||
gnocchi-statsd:
|
gnocchi-statsd:
|
||||||
container_name: gnocchi_statsd
|
container_name: gnocchi_statsd
|
||||||
group: gnocchi-statsd
|
group: gnocchi-statsd
|
||||||
@ -34,6 +36,7 @@ gnocchi_services:
|
|||||||
image: "{{ gnocchi_statsd_image_full }}"
|
image: "{{ gnocchi_statsd_image_full }}"
|
||||||
volumes: "{{ gnocchi_statsd_default_volumes + gnocchi_statsd_extra_volumes }}"
|
volumes: "{{ gnocchi_statsd_default_volumes + gnocchi_statsd_extra_volumes }}"
|
||||||
dimensions: "{{ gnocchi_statsd_dimensions }}"
|
dimensions: "{{ gnocchi_statsd_dimensions }}"
|
||||||
|
healthcheck: "{{ gnocchi_statsd_healthcheck }}"
|
||||||
|
|
||||||
|
|
||||||
####################
|
####################
|
||||||
@ -73,6 +76,45 @@ gnocchi_api_dimensions: "{{ default_container_dimensions }}"
|
|||||||
gnocchi_metricd_dimensions: "{{ default_container_dimensions }}"
|
gnocchi_metricd_dimensions: "{{ default_container_dimensions }}"
|
||||||
gnocchi_statsd_dimensions: "{{ default_container_dimensions }}"
|
gnocchi_statsd_dimensions: "{{ default_container_dimensions }}"
|
||||||
|
|
||||||
|
gnocchi_api_enable_healthchecks: "{{ enable_container_healthchecks }}"
|
||||||
|
gnocchi_api_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
|
||||||
|
gnocchi_api_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
|
||||||
|
gnocchi_api_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
|
||||||
|
gnocchi_api_healthcheck_test: ["CMD-SHELL", "healthcheck_curl http://{{ api_interface_address | put_address_in_context('url') }}:{{ gnocchi_api_listen_port }}"]
|
||||||
|
gnocchi_api_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
|
||||||
|
gnocchi_api_healthcheck:
|
||||||
|
interval: "{{ gnocchi_api_healthcheck_interval }}"
|
||||||
|
retries: "{{ gnocchi_api_healthcheck_retries }}"
|
||||||
|
start_period: "{{ gnocchi_api_healthcheck_start_period }}"
|
||||||
|
test: "{% if gnocchi_api_enable_healthchecks | bool %}{{ gnocchi_api_healthcheck_test }}{% else %}NONE{% endif %}"
|
||||||
|
timeout: "{{ gnocchi_api_healthcheck_timeout }}"
|
||||||
|
|
||||||
|
gnocchi_metricd_enable_healthchecks: "{{ enable_container_healthchecks }}"
|
||||||
|
gnocchi_metricd_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
|
||||||
|
gnocchi_metricd_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
|
||||||
|
gnocchi_metricd_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
|
||||||
|
gnocchi_metricd_healthcheck_test: ["CMD-SHELL", "healthcheck_port gnocchi-metricd {{ database_port }}"]
|
||||||
|
gnocchi_metricd_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
|
||||||
|
gnocchi_metricd_healthcheck:
|
||||||
|
interval: "{{ gnocchi_metricd_healthcheck_interval }}"
|
||||||
|
retries: "{{ gnocchi_metricd_healthcheck_retries }}"
|
||||||
|
start_period: "{{ gnocchi_metricd_healthcheck_start_period }}"
|
||||||
|
test: "{% if gnocchi_metricd_enable_healthchecks | bool %}{{ gnocchi_metricd_healthcheck_test }}{% else %}NONE{% endif %}"
|
||||||
|
timeout: "{{ gnocchi_metricd_healthcheck_timeout }}"
|
||||||
|
|
||||||
|
gnocchi_statsd_enable_healthchecks: "{{ enable_container_healthchecks }}"
|
||||||
|
gnocchi_statsd_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
|
||||||
|
gnocchi_statsd_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
|
||||||
|
gnocchi_statsd_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
|
||||||
|
gnocchi_statsd_healthcheck_test: ["CMD-SHELL", "healthcheck_port gnocchi-statsd {{ database_port }}"]
|
||||||
|
gnocchi_statsd_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
|
||||||
|
gnocchi_statsd_healthcheck:
|
||||||
|
interval: "{{ gnocchi_statsd_healthcheck_interval }}"
|
||||||
|
retries: "{{ gnocchi_statsd_healthcheck_retries }}"
|
||||||
|
start_period: "{{ gnocchi_statsd_healthcheck_start_period }}"
|
||||||
|
test: "{% if gnocchi_statsd_enable_healthchecks | bool %}{{ gnocchi_statsd_healthcheck_test }}{% else %}NONE{% endif %}"
|
||||||
|
timeout: "{{ gnocchi_statsd_healthcheck_timeout }}"
|
||||||
|
|
||||||
gnocchi_api_default_volumes:
|
gnocchi_api_default_volumes:
|
||||||
- "{{ node_config_directory }}/gnocchi-api/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/gnocchi-api/:{{ container_config_directory }}/:ro"
|
||||||
- "/etc/localtime:/etc/localtime:ro"
|
- "/etc/localtime:/etc/localtime:ro"
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
image: "{{ service.image }}"
|
image: "{{ service.image }}"
|
||||||
volumes: "{{ service.volumes }}"
|
volumes: "{{ service.volumes }}"
|
||||||
dimensions: "{{ service.dimensions }}"
|
dimensions: "{{ service.dimensions }}"
|
||||||
|
healthcheck: "{{ service.healthcheck | default(omit) }}"
|
||||||
when:
|
when:
|
||||||
- kolla_action != "config"
|
- kolla_action != "config"
|
||||||
|
|
||||||
@ -26,6 +27,7 @@
|
|||||||
image: "{{ service.image }}"
|
image: "{{ service.image }}"
|
||||||
volumes: "{{ service.volumes }}"
|
volumes: "{{ service.volumes }}"
|
||||||
dimensions: "{{ service.dimensions }}"
|
dimensions: "{{ service.dimensions }}"
|
||||||
|
healthcheck: "{{ service.healthcheck | default(omit) }}"
|
||||||
when:
|
when:
|
||||||
- kolla_action != "config"
|
- kolla_action != "config"
|
||||||
|
|
||||||
@ -41,5 +43,6 @@
|
|||||||
image: "{{ service.image }}"
|
image: "{{ service.image }}"
|
||||||
volumes: "{{ service.volumes }}"
|
volumes: "{{ service.volumes }}"
|
||||||
dimensions: "{{ service.dimensions }}"
|
dimensions: "{{ service.dimensions }}"
|
||||||
|
healthcheck: "{{ service.healthcheck | default(omit) }}"
|
||||||
when:
|
when:
|
||||||
- kolla_action != "config"
|
- kolla_action != "config"
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
image: "{{ item.value.image }}"
|
image: "{{ item.value.image }}"
|
||||||
volumes: "{{ item.value.volumes }}"
|
volumes: "{{ item.value.volumes }}"
|
||||||
dimensions: "{{ item.value.dimensions }}"
|
dimensions: "{{ item.value.dimensions }}"
|
||||||
|
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[item.value.group]
|
- inventory_hostname in groups[item.value.group]
|
||||||
- item.value.enabled | bool
|
- item.value.enabled | bool
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Implements container healthchecks for gnocchi services.
|
||||||
|
See `blueprint
|
||||||
|
<https://blueprints.launchpad.net/kolla-ansible/+spec/container-health-check>`__
|
Loading…
Reference in New Issue
Block a user