Aravindh Murugesan 70279972b6 HAProxy: Switch to L7 Healthchecks
Address occasional issues where TCP connections appear healthy,
yet the web servers within containers fail to respond,
resulting in requests being sent to unhealthy servers.

Implemented for services I currently use.
- Aodh (OPTIONS to /, expects 2XX or 3XX)
- Barbican (OPTIONS to /, expects 2XX or 3XX)
- Blazar (OPTIONS to /, expects 401)
- Cinder API (OPTIONS to /, expects 2XX or 3XX)
- CloudKitty (OPTIONS to /, expects 2XX or 3XX)
- Designate (OPTIONS to /, expects 2XX or 3XX)
- Glance (OPTIONS to /, expects 2XX or 3XX)
- Gnocchi (OPTIONS to /, expects 2XX or 3XX)
- Grafana (OPTIONS to /, expects 2XX or 3XX)
- Heat (OPTIONS to /, expects 2XX or 3XX)
- Horizon (OPTIONS to /, expects 2XX or 3XX)
- Ironic (OPTIONS to /, expects 2XX or 3XX)
- Keystone (OPTIONS to /, expects 2XX or 3XX)
- Magnum (OPTIONS to /, expects 2XX or 3XX)
- Manila (OPTIONS to /, expects 2XX or 3XX)
- Masakari (OPTIONS to /, expects 2XX or 3XX)
- Mistral (OPTIONS to /, expects 2XX or 3XX)
- Nova API (OPTIONS to /, expects 2XX or 3XX)
- Nova Metadata (OPTIONS to /, expects 2XX or 3XX)
- Neutron (OPTIONS to /, expects 2XX or 3XX)
- Opensearch (OPTIONS to /, expects 2XX or 3XX)
- Opensearch Dashboards (OPTIONS to /, expects 401)
- Placement (GET to /, expects 2XX or 3XX)
- Prometheus (OPTIONS to /, expects 2XX or 3XX)
- Prometheus AlertManager (OPTIONS to /, expects 2XX or 3XX)
- Prometheus Openstack Exporter (OPTIONS to /, expects 2XX or 3XX)
- Prometheus Server (OPTIONS to /, expects 2XX or 3XX)
- Skyline API (OPTIONS to /docs, expects 2XX or 3XX)
- Skyline Console (GET to /, expects 2XX or 3XX)
- Swift (OPTIONS to /info, expects 2XX or 3XX)
- Trove (OPTIONS to /, expects 2XX or 3XX)
- Venus (OPTIONS to /, expects 2XX or 3XX)
- Watcher (GET to /, expects 2XX or 3XX)
- Zun (OPTIONS to /, expects 2XX or 3XX)

Change-Id: I839f7f1051182fe797394e5436571d64d5c5b5a4
2024-12-20 09:16:28 +01:00

188 lines
7.7 KiB
YAML

---
masakari_services:
masakari-api:
container_name: masakari_api
group: masakari-api
enabled: true
image: "{{ masakari_api_image_full }}"
volumes: "{{ masakari_api_default_volumes + masakari_api_extra_volumes }}"
dimensions: "{{ masakari_api_dimensions }}"
haproxy:
masakari_api:
enabled: "{{ enable_masakari }}"
mode: "http"
external: false
port: "{{ masakari_api_port }}"
listen_port: "{{ masakari_api_listen_port }}"
backend_http_extra:
- "option httpchk"
masakari_api_external:
enabled: "{{ enable_masakari }}"
mode: "http"
external: true
external_fqdn: "{{ masakari_external_fqdn }}"
port: "{{ masakari_api_public_port }}"
listen_port: "{{ masakari_api_listen_port }}"
backend_http_extra:
- "option httpchk"
masakari-engine:
container_name: masakari_engine
group: masakari-engine
enabled: true
image: "{{ masakari_engine_image_full }}"
volumes: "{{ masakari_engine_default_volumes + masakari_engine_extra_volumes }}"
dimensions: "{{ masakari_engine_dimensions }}"
masakari-instancemonitor:
container_name: masakari_instancemonitor
group: masakari-instancemonitor
enabled: "{{ enable_masakari_instancemonitor | bool }}"
image: "{{ masakari_monitors_image_full }}"
volumes: "{{ masakari_instancemonitor_default_volumes + masakari_instancemonitor_extra_volumes }}"
privileged: True
dimensions: "{{ masakari_instancemonitor_dimensions }}"
masakari-hostmonitor:
container_name: masakari_hostmonitor
group: masakari-hostmonitor
enabled: "{{ enable_masakari_hostmonitor | bool }}"
ipc_mode: host
image: "{{ masakari_monitors_image_full }}"
volumes: "{{ masakari_hostmonitor_default_volumes + masakari_hostmonitor_extra_volumes }}"
dimensions: "{{ masakari_hostmonitor_dimensions }}"
####################
# Config Validate
####################
masakari_config_validation:
- generator: "/masakari/etc/masakari/masakari-config-generator.conf"
config: "/etc/masakari/masakari.conf"
####################
# Database
####################
masakari_database_name: "masakari"
masakari_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}masakari{% endif %}"
masakari_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
####################
# Database sharding
####################
masakari_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ masakari_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
masakari_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
masakari_database_shard:
users:
- user: "{{ masakari_database_user }}"
password: "{{ masakari_database_password }}"
rules:
- schema: "{{ masakari_database_name }}"
shard_id: "{{ masakari_database_shard_id }}"
####################
# Docker
####################
masakari_tag: "{{ openstack_tag }}"
masakari_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ docker_image_name_prefix }}masakari-api"
masakari_api_tag: "{{ masakari_tag }}"
masakari_api_image_full: "{{ masakari_api_image }}:{{ masakari_api_tag }}"
masakari_engine_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ docker_image_name_prefix }}masakari-engine"
masakari_engine_tag: "{{ masakari_tag }}"
masakari_engine_image_full: "{{ masakari_engine_image }}:{{ masakari_engine_tag }}"
masakari_monitors_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ docker_image_name_prefix }}masakari-monitors"
masakari_monitors_tag: "{{ masakari_tag }}"
masakari_monitors_image_full: "{{ masakari_monitors_image }}:{{ masakari_monitors_tag }}"
masakari_api_dimensions: "{{ default_container_dimensions }}"
masakari_engine_dimensions: "{{ default_container_dimensions }}"
# NOTE(mgoddard): Allow masakari_monitors_dimensions for backwards
# compatibility.
masakari_instancemonitor_dimensions: "{{ masakari_monitors_dimensions | default(default_container_dimensions) }}"
masakari_hostmonitor_dimensions: "{{ default_container_dimensions }}"
masakari_extra_volumes: "{{ default_extra_volumes }}"
masakari_api_extra_volumes: "{{ masakari_extra_volumes }}"
masakari_engine_extra_volumes: "{{ masakari_extra_volumes }}"
masakari_instancemonitor_extra_volumes: "{{ masakari_extra_volumes }}"
masakari_hostmonitor_extra_volumes: "{{ masakari_extra_volumes }}"
masakari_api_default_volumes:
- "{{ node_config_directory }}/masakari-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
- "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/masakari:/dev-mode/masakari' if masakari_dev_mode | bool else '' }}"
masakari_engine_default_volumes:
- "{{ node_config_directory }}/masakari-engine/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
- "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/masakari:/dev-mode/masakari' if masakari_dev_mode | bool else '' }}"
- "masakari:/var/lib/masakari/"
masakari_instancemonitor_default_volumes:
- "{{ node_config_directory }}/masakari-instancemonitor/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
- "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/masakari-monitors:/dev-mode/masakari-monitors' if masakari_dev_mode | bool else '' }}"
masakari_hostmonitor_default_volumes:
- "{{ node_config_directory }}/masakari-hostmonitor/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
- "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/masakari-monitors:/dev-mode/masakari-monitors' if masakari_dev_mode | bool else '' }}"
####################
# OpenStack
####################
masakari_logging_debug: "{{ openstack_logging_debug }}"
masakari_keystone_user: "masakari"
openstack_masakari_auth: "{{ openstack_auth }}"
masakari_api_workers: "{{ openstack_service_workers }}"
####################
# Kolla
####################
masakari_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
masakari_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
masakari_dev_mode: "{{ kolla_dev_mode }}"
masakari_source_version: "{{ kolla_source_version }}"
masakari_monitors_git_repository: "{{ kolla_dev_repos_git }}/masakari-monitors"
masakari_monitors_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
masakari_monitors_dev_mode: "{{ kolla_dev_mode }}"
masakari_monitors_source_version: "{{ kolla_source_version }}"
####################
# Keystone
####################
masakari_ks_services:
- name: "masakari"
type: "instance-ha"
description: "OpenStack High Availability"
endpoints:
- {'interface': 'internal', 'url': '{{ masakari_internal_endpoint }}'}
- {'interface': 'public', 'url': '{{ masakari_public_endpoint }}'}
masakari_ks_users:
- project: "service"
user: "{{ masakari_keystone_user }}"
password: "{{ masakari_keystone_password }}"
role: "admin"
####################
# libvirt
####################
# Whether to enable libvirt SASL authentication.
libvirt_enable_sasl: true
# Username for libvirt SASL.
libvirt_sasl_authname: "nova"
# List of enabled libvirt SASL authentication mechanisms.
libvirt_sasl_mech_list:
- "{{ 'SCRAM-SHA-256' if libvirt_tls | bool else 'DIGEST-MD5' }}"