Skip to content
Snippets Groups Projects
Commit d656f2c6 authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "Use Docker healthchecks for tacker services"

parents 1d1d2aae 7bab7d0d
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,7 @@ tacker_services: ...@@ -10,6 +10,7 @@ tacker_services:
image: "{{ tacker_server_image_full }}" image: "{{ tacker_server_image_full }}"
volumes: "{{ tacker_server_default_volumes + tacker_server_extra_volumes }}" volumes: "{{ tacker_server_default_volumes + tacker_server_extra_volumes }}"
dimensions: "{{ tacker_server_dimensions }}" dimensions: "{{ tacker_server_dimensions }}"
healthcheck: "{{ tacker_server_healthcheck }}"
haproxy: haproxy:
tacker_server: tacker_server:
enabled: "{{ enable_tacker }}" enabled: "{{ enable_tacker }}"
...@@ -31,6 +32,7 @@ tacker_services: ...@@ -31,6 +32,7 @@ tacker_services:
image: "{{ tacker_conductor_image_full }}" image: "{{ tacker_conductor_image_full }}"
volumes: "{{ tacker_conductor_default_volumes + tacker_conductor_extra_volumes }}" volumes: "{{ tacker_conductor_default_volumes + tacker_conductor_extra_volumes }}"
dimensions: "{{ tacker_conductor_dimensions }}" dimensions: "{{ tacker_conductor_dimensions }}"
healthcheck: "{{ tacker_conductor_healthcheck }}"
#################### ####################
# Database # Database
...@@ -56,6 +58,32 @@ tacker_conductor_image_full: "{{ tacker_conductor_image }}:{{ tacker_conductor_t ...@@ -56,6 +58,32 @@ tacker_conductor_image_full: "{{ tacker_conductor_image }}:{{ tacker_conductor_t
tacker_server_dimensions: "{{ default_container_dimensions }}" tacker_server_dimensions: "{{ default_container_dimensions }}"
tacker_conductor_dimensions: "{{ default_container_dimensions }}" tacker_conductor_dimensions: "{{ default_container_dimensions }}"
tacker_server_enable_healthchecks: "{{ enable_container_healthchecks }}"
tacker_server_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
tacker_server_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
tacker_server_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
tacker_server_healthcheck_test: ["CMD-SHELL", "healthcheck_curl http://{{ api_interface_address | put_address_in_context('url') }}:{{ tacker_server_port }}"]
tacker_server_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
tacker_server_healthcheck:
interval: "{{ tacker_server_healthcheck_interval }}"
retries: "{{ tacker_server_healthcheck_retries }}"
start_period: "{{ tacker_server_healthcheck_start_period }}"
test: "{% if tacker_server_enable_healthchecks | bool %}{{ tacker_server_healthcheck_test }}{% else %}NONE{% endif %}"
timeout: "{{ tacker_server_healthcheck_timeout }}"
tacker_conductor_enable_healthchecks: "{{ enable_container_healthchecks }}"
tacker_conductor_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
tacker_conductor_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
tacker_conductor_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
tacker_conductor_healthcheck_test: ["CMD-SHELL", "healthcheck_port tacker-conductor {{ om_rpc_port }}"]
tacker_conductor_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
tacker_conductor_healthcheck:
interval: "{{ tacker_conductor_healthcheck_interval }}"
retries: "{{ tacker_conductor_healthcheck_retries }}"
start_period: "{{ tacker_conductor_healthcheck_start_period }}"
test: "{% if tacker_conductor_enable_healthchecks | bool %}{{ tacker_conductor_healthcheck_test }}{% else %}NONE{% endif %}"
timeout: "{{ tacker_conductor_healthcheck_timeout }}"
tacker_server_default_volumes: tacker_server_default_volumes:
- "{{ node_config_directory }}/tacker-server/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/tacker-server/:{{ container_config_directory }}/:ro"
- "{{ kolla_dev_repos_directory ~ '/tacker/tacker:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/tacker' if tacker_dev_mode | bool else '' }}" - "{{ kolla_dev_repos_directory ~ '/tacker/tacker:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/tacker' if tacker_dev_mode | bool else '' }}"
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
image: "{{ service.image }}" image: "{{ service.image }}"
volumes: "{{ service.volumes|reject('equalto', '')|list }}" volumes: "{{ service.volumes|reject('equalto', '')|list }}"
dimensions: "{{ service.dimensions }}" dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}"
when: when:
- kolla_action != "config" - kolla_action != "config"
...@@ -26,5 +27,6 @@ ...@@ -26,5 +27,6 @@
image: "{{ service.image }}" image: "{{ service.image }}"
volumes: "{{ service.volumes|reject('equalto', '')|list }}" volumes: "{{ service.volumes|reject('equalto', '')|list }}"
dimensions: "{{ service.dimensions }}" dimensions: "{{ service.dimensions }}"
healthcheck: "{{ service.healthcheck | default(omit) }}"
when: when:
- kolla_action != "config" - kolla_action != "config"
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
image: "{{ item.value.image }}" image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes|reject('equalto', '')|list }}" volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
dimensions: "{{ item.value.dimensions }}" dimensions: "{{ item.value.dimensions }}"
healthcheck: "{{ item.value.healthcheck | default(omit) }}"
when: when:
- item.value.host_in_groups | bool - item.value.host_in_groups | bool
- item.value.enabled | bool - item.value.enabled | bool
......
---
features:
- |
Implements container healthchecks for tacker services.
See `blueprint
<https://blueprints.launchpad.net/kolla-ansible/+spec/container-health-check>`__
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment