kolla-ansible/ansible/roles/trove/defaults/main.yml
LinPeiWen 2518e926d9 Use Docker healthchecks for trove services
This change enables the use of Docker healthchecks for trove services.
Implements: blueprint container-health-check

Change-Id: I55badd93f92f82e020ef80b06c788600e597d068
2021-03-02 11:42:34 +00:00

186 lines
8.7 KiB
YAML

---
project_name: "trove"
trove_services:
trove-api:
container_name: trove_api
group: trove-api
enabled: true
image: "{{ trove_api_image_full }}"
volumes: "{{ trove_api_default_volumes + trove_api_extra_volumes }}"
dimensions: "{{ trove_api_dimensions }}"
healthcheck: "{{ trove_api_healthcheck }}"
haproxy:
trove_api:
enabled: "{{ enable_trove }}"
mode: "http"
external: false
port: "{{ trove_api_port }}"
trove_api_external:
enabled: "{{ enable_trove }}"
mode: "http"
external: true
port: "{{ trove_api_port }}"
trove-conductor:
container_name: trove_conductor
group: trove-conductor
enabled: true
image: "{{ trove_conductor_image_full }}"
volumes: "{{ trove_conductor_default_volumes + trove_conductor_extra_volumes }}"
dimensions: "{{ trove_conductor_dimensions }}"
healthcheck: "{{ trove_conductor_healthcheck }}"
trove-taskmanager:
container_name: trove_taskmanager
group: trove-taskmanager
enabled: true
image: "{{ trove_taskmanager_image_full }}"
volumes: "{{ trove_taskmanager_default_volumes + trove_taskmanager_extra_volumes }}"
dimensions: "{{ trove_taskmanager_dimensions }}"
healthcheck: "{{ trove_taskmanager_healthcheck }}"
####################
# Database
####################
trove_database_name: "trove"
trove_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}trove{% endif %}"
trove_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
####################
# Docker
####################
trove_install_type: "{{ kolla_install_type }}"
trove_tag: "{{ openstack_tag }}"
trove_conductor_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ trove_install_type }}-trove-conductor"
trove_conductor_tag: "{{ trove_tag }}"
trove_conductor_image_full: "{{ trove_conductor_image }}:{{ trove_conductor_tag }}"
trove_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ trove_install_type }}-trove-api"
trove_api_tag: "{{ trove_tag }}"
trove_api_image_full: "{{ trove_api_image }}:{{ trove_api_tag }}"
trove_taskmanager_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ trove_install_type }}-trove-taskmanager"
trove_taskmanager_tag: "{{ trove_tag }}"
trove_taskmanager_image_full: "{{ trove_taskmanager_image }}:{{ trove_taskmanager_tag }}"
trove_api_dimensions: "{{ default_container_dimensions }}"
trove_conductor_dimensions: "{{ default_container_dimensions }}"
trove_taskmanager_dimensions: "{{ default_container_dimensions }}"
trove_api_enable_healthchecks: "{{ enable_container_healthchecks }}"
trove_api_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
trove_api_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
trove_api_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
trove_api_healthcheck_test: ["CMD-SHELL", "healthcheck_curl http://{{ api_interface_address | put_address_in_context('url') }}:{{ trove_api_port }}"]
trove_api_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
trove_api_healthcheck:
interval: "{{ trove_api_healthcheck_interval }}"
retries: "{{ trove_api_healthcheck_retries }}"
start_period: "{{ trove_api_healthcheck_start_period }}"
test: "{% if trove_api_enable_healthchecks | bool %}{{ trove_api_healthcheck_test }}{% else %}NONE{% endif %}"
timeout: "{{ trove_api_healthcheck_timeout }}"
trove_conductor_enable_healthchecks: "{{ enable_container_healthchecks }}"
trove_conductor_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
trove_conductor_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
trove_conductor_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
trove_conductor_healthcheck_test: ["CMD-SHELL", "healthcheck_port trove-conductor {{ om_rpc_port }}"]
trove_conductor_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
trove_conductor_healthcheck:
interval: "{{ trove_conductor_healthcheck_interval }}"
retries: "{{ trove_conductor_healthcheck_retries }}"
start_period: "{{ trove_conductor_healthcheck_start_period }}"
test: "{% if trove_conductor_enable_healthchecks | bool %}{{ trove_conductor_healthcheck_test }}{% else %}NONE{% endif %}"
timeout: "{{ trove_conductor_healthcheck_timeout }}"
trove_taskmanager_enable_healthchecks: "{{ enable_container_healthchecks }}"
trove_taskmanager_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
trove_taskmanager_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
trove_taskmanager_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
trove_taskmanager_healthcheck_test: ["CMD-SHELL", "healthcheck_port trove-taskmanager {{ om_rpc_port }}"]
trove_taskmanager_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
trove_taskmanager_healthcheck:
interval: "{{ trove_taskmanager_healthcheck_interval }}"
retries: "{{ trove_taskmanager_healthcheck_retries }}"
start_period: "{{ trove_taskmanager_healthcheck_start_period }}"
test: "{% if trove_taskmanager_enable_healthchecks | bool %}{{ trove_taskmanager_healthcheck_test }}{% else %}NONE{% endif %}"
timeout: "{{ trove_taskmanager_healthcheck_timeout }}"
trove_api_default_volumes:
- "{{ node_config_directory }}/trove-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_os_family == 'Debian' else '' }}"
- "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/trove/trove:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/trove' if trove_dev_mode | bool else '' }}"
- "trove:/var/lib/trove/"
trove_conductor_default_volumes:
- "{{ node_config_directory }}/trove-conductor/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_os_family == 'Debian' else '' }}"
- "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/trove/trove:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/trove' if trove_dev_mode | bool else '' }}"
- "trove:/var/lib/trove/"
trove_taskmanager_default_volumes:
- "{{ node_config_directory }}/trove-taskmanager/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_os_family == 'Debian' else '' }}"
- "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/trove/trove:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/trove' if trove_dev_mode | bool else '' }}"
- "trove:/var/lib/trove/"
trove_extra_volumes: "{{ default_extra_volumes }}"
trove_api_extra_volumes: "{{ trove_extra_volumes }}"
trove_conductor_extra_volumes: "{{ trove_extra_volumes }}"
trove_taskmanager_extra_volumes: "{{ trove_extra_volumes }}"
####################
# OpenStack
####################
trove_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ trove_api_port }}/v1.0/%(tenant_id)s"
trove_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ trove_api_port }}/v1.0/%(tenant_id)s"
trove_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn | put_address_in_context('url') }}:{{ trove_api_port }}/v1.0/%(tenant_id)s"
trove_logging_debug: "{{ openstack_logging_debug }}"
trove_keystone_user: "trove"
openstack_trove_auth: "{{ openstack_auth }}"
####################
# Kolla
####################
trove_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
trove_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
trove_dev_mode: "{{ kolla_dev_mode }}"
trove_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
trove_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
trove_enabled_notification_topics: "{{ trove_notification_topics | selectattr('enabled', 'equalto', true) | list }}"
####################
# Keystone
####################
trove_ks_services:
- name: "trove"
type: "database"
description: "Trove Database Service"
endpoints:
- {'interface': 'admin', 'url': '{{ trove_admin_endpoint }}'}
- {'interface': 'internal', 'url': '{{ trove_internal_endpoint }}'}
- {'interface': 'public', 'url': '{{ trove_public_endpoint }}'}
trove_ks_users:
- project: "service"
user: "{{ trove_keystone_user }}"
password: "{{ trove_keystone_password }}"
role: "admin"