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

Merge "Use Docker healthchecks for cyborg services"

parents aa10561c 6973c71a
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ cyborg_services: ...@@ -9,6 +9,7 @@ cyborg_services:
image: "{{ cyborg_api_image_full }}" image: "{{ cyborg_api_image_full }}"
volumes: "{{ cyborg_api_default_volumes + cyborg_api_extra_volumes }}" volumes: "{{ cyborg_api_default_volumes + cyborg_api_extra_volumes }}"
dimensions: "{{ cyborg_api_dimensions }}" dimensions: "{{ cyborg_api_dimensions }}"
healthcheck: "{{ cyborg_api_healthcheck }}"
cyborg-agent: cyborg-agent:
container_name: cyborg_agent container_name: cyborg_agent
group: cyborg-agent group: cyborg-agent
...@@ -17,6 +18,7 @@ cyborg_services: ...@@ -17,6 +18,7 @@ cyborg_services:
image: "{{ cyborg_agent_image_full }}" image: "{{ cyborg_agent_image_full }}"
volumes: "{{ cyborg_agent_default_volumes + cyborg_agent_extra_volumes }}" volumes: "{{ cyborg_agent_default_volumes + cyborg_agent_extra_volumes }}"
dimensions: "{{ cyborg_agent_dimensions }}" dimensions: "{{ cyborg_agent_dimensions }}"
healthcheck: "{{ cyborg_agent_healthcheck }}"
cyborg-conductor: cyborg-conductor:
container_name: cyborg_conductor container_name: cyborg_conductor
group: cyborg-conductor group: cyborg-conductor
...@@ -24,6 +26,7 @@ cyborg_services: ...@@ -24,6 +26,7 @@ cyborg_services:
image: "{{ cyborg_conductor_image_full }}" image: "{{ cyborg_conductor_image_full }}"
volumes: "{{ cyborg_conductor_default_volumes + cyborg_conductor_extra_volumes }}" volumes: "{{ cyborg_conductor_default_volumes + cyborg_conductor_extra_volumes }}"
dimensions: "{{ cyborg_conductor_dimensions }}" dimensions: "{{ cyborg_conductor_dimensions }}"
healthcheck: "{{ cyborg_conductor_healthcheck }}"
#################### ####################
# Database # Database
...@@ -54,6 +57,45 @@ cyborg_api_dimensions: "{{ default_container_dimensions }}" ...@@ -54,6 +57,45 @@ cyborg_api_dimensions: "{{ default_container_dimensions }}"
cyborg_agent_dimensions: "{{ default_container_dimensions }}" cyborg_agent_dimensions: "{{ default_container_dimensions }}"
cyborg_conductor_dimensions: "{{ default_container_dimensions }}" cyborg_conductor_dimensions: "{{ default_container_dimensions }}"
cyborg_api_enable_healthchecks: "{{ enable_container_healthchecks }}"
cyborg_api_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
cyborg_api_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
cyborg_api_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
cyborg_api_healthcheck_test: ["CMD-SHELL", "healthcheck_curl http://{{ api_interface_address | put_address_in_context('url') }}:{{ cyborg_api_port }}"]
cyborg_api_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
cyborg_api_healthcheck:
interval: "{{ cyborg_api_healthcheck_interval }}"
retries: "{{ cyborg_api_healthcheck_retries }}"
start_period: "{{ cyborg_api_healthcheck_start_period }}"
test: "{% if cyborg_api_enable_healthchecks | bool %}{{ cyborg_api_healthcheck_test }}{% else %}NONE{% endif %}"
timeout: "{{ cyborg_api_healthcheck_timeout }}"
cyborg_agent_enable_healthchecks: "{{ enable_container_healthchecks }}"
cyborg_agent_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
cyborg_agent_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
cyborg_agent_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
cyborg_agent_healthcheck_test: ["CMD-SHELL", "healthcheck_port cyborg-agent {{ om_rpc_port }}"]
cyborg_agent_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
cyborg_agent_healthcheck:
interval: "{{ cyborg_agent_healthcheck_interval }}"
retries: "{{ cyborg_agent_healthcheck_retries }}"
start_period: "{{ cyborg_agent_healthcheck_start_period }}"
test: "{% if cyborg_agent_enable_healthchecks | bool %}{{ cyborg_agent_healthcheck_test }}{% else %}NONE{% endif %}"
timeout: "{{ cyborg_agent_healthcheck_timeout }}"
cyborg_conductor_enable_healthchecks: "{{ enable_container_healthchecks }}"
cyborg_conductor_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
cyborg_conductor_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
cyborg_conductor_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
cyborg_conductor_healthcheck_test: ["CMD-SHELL", "healthcheck_port cyborg-conductor {{ om_rpc_port }}"]
cyborg_conductor_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
cyborg_conductor_healthcheck:
interval: "{{ cyborg_conductor_healthcheck_interval }}"
retries: "{{ cyborg_conductor_healthcheck_retries }}"
start_period: "{{ cyborg_conductor_healthcheck_start_period }}"
test: "{% if cyborg_conductor_enable_healthchecks | bool %}{{ cyborg_conductor_healthcheck_test }}{% else %}NONE{% endif %}"
timeout: "{{ cyborg_conductor_healthcheck_timeout }}"
cyborg_api_default_volumes: cyborg_api_default_volumes:
- "{{ node_config_directory }}/cyborg-api/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/cyborg-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
privileged: "{{ service.privileged | default(False) }}" privileged: "{{ service.privileged | default(False) }}"
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"
...@@ -28,6 +29,7 @@ ...@@ -28,6 +29,7 @@
privileged: "{{ service.privileged | default(False) }}" privileged: "{{ service.privileged | default(False) }}"
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"
...@@ -44,5 +46,6 @@ ...@@ -44,5 +46,6 @@
privileged: "{{ service.privileged | default(False) }}" privileged: "{{ service.privileged | default(False) }}"
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"
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
privileged: "{{ item.value.privileged | default(False) }}" privileged: "{{ item.value.privileged | default(False) }}"
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
......
---
features:
- |
Implements container healthchecks for cyborg 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