Use Docker healthchecks for kibana services

This change enables the use of Docker healthchecks for kibana services.
Implements: blueprint container-health-check

Change-Id: If7525e193c245435410b4071aed6d3b566424219
This commit is contained in:
LinPeiWen 2021-03-11 11:28:12 +00:00
parent cef8c8b3de
commit 28dbde6add
4 changed files with 22 additions and 0 deletions

View File

@ -9,6 +9,7 @@ kibana_services:
group: "kibana"
volumes: "{{ kibana_default_volumes + kibana_extra_volumes }}"
dimensions: "{{ kibana_dimensions }}"
healthcheck: "{{ kibana_healthcheck }}"
haproxy:
kibana:
enabled: "{{ enable_kibana }}"
@ -44,6 +45,19 @@ kibana_tag: "{{ openstack_tag }}"
kibana_image_full: "{{ kibana_image }}:{{ kibana_tag }}"
kibana_dimensions: "{{ default_container_dimensions }}"
kibana_enable_healthchecks: "{{ enable_container_healthchecks }}"
kibana_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
kibana_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
kibana_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
kibana_healthcheck_test: ["CMD-SHELL", "healthcheck_curl http://{{ api_interface_address | put_address_in_context('url') }}:{{ kibana_server_port }}"]
kibana_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
kibana_healthcheck:
interval: "{{ kibana_healthcheck_interval }}"
retries: "{{ kibana_healthcheck_retries }}"
start_period: "{{ kibana_healthcheck_start_period }}"
test: "{% if kibana_enable_healthchecks | bool %}{{ kibana_healthcheck_test }}{% else %}NONE{% endif %}"
timeout: "{{ kibana_healthcheck_timeout }}"
kibana_default_volumes:
- "{{ node_config_directory }}/kibana/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"

View File

@ -11,5 +11,6 @@
image: "{{ service.image }}"
volumes: "{{ service.volumes }}"
dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}"
when:
- kolla_action != "config"

View File

@ -8,6 +8,7 @@
image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}"
dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when:
- inventory_hostname in groups[item.value.group]
- item.value.enabled | bool

View File

@ -0,0 +1,6 @@
---
features:
- |
Implements container healthchecks for kibana services.
See `blueprint
<https://blueprints.launchpad.net/kolla-ansible/+spec/container-health-check>`__