kolla-ansible/ansible/roles/blazar/defaults/main.yml
Michal Nasiadka 4bc410c6ca haproxy: support single external frontend
Use case: exposing single external https frontend and
load balancing services using FQDNs.

Support different ports for internal and external endpoints.

Introduced kolla_url filter to normalize urls like:
- https://magnum.external:443/v1
- http://magnum.external:80/v1

Change-Id: I9fb03fe1cebce5c7198d523e015280c69f139cd0
Co-Authored-By: Jakub Darmach <jakub@stackhpc.com>
2023-06-29 01:44:00 +02:00

176 lines
7.0 KiB
YAML

---
blazar_services:
blazar-api:
container_name: blazar_api
group: blazar-api
enabled: true
image: "{{ blazar_api_image_full }}"
volumes: "{{ blazar_api_default_volumes + blazar_api_extra_volumes }}"
dimensions: "{{ blazar_api_dimensions }}"
healthcheck: "{{ blazar_api_healthcheck }}"
haproxy:
blazar_api:
enabled: "{{ enable_blazar }}"
mode: "http"
external: false
port: "{{ blazar_api_port }}"
listen_port: "{{ blazar_api_listen_port }}"
blazar_api_external:
enabled: "{{ enable_blazar }}"
mode: "http"
external: true
external_fqdn: "{{ blazar_external_fqdn }}"
port: "{{ blazar_api_public_port }}"
listen_port: "{{ blazar_api_listen_port }}"
blazar-manager:
container_name: blazar_manager
group: blazar-manager
enabled: true
image: "{{ blazar_manager_image_full }}"
volumes: "{{ blazar_manager_default_volumes + blazar_manager_extra_volumes }}"
dimensions: "{{ blazar_manager_dimensions }}"
healthcheck: "{{ blazar_manager_healthcheck }}"
####################
# Blazar
####################
blazar_aggregate_pool_name: "freepool"
####################
# Config Validate
####################
blazar_config_validation:
- generator: "/blazar/etc/blazar/blazar-config-generator.conf"
config: "/etc/blazar/blazar.conf"
####################
# Database
####################
blazar_database_name: "blazar"
blazar_database_user: "blazar"
blazar_database_address: "{{ database_address | put_address_in_context('url') }}:{{ database_port }}"
####################
# Database sharding
####################
blazar_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ blazar_database_shard_id }}{% else %}{{ database_user }}{% endif %}"
blazar_database_shard_id: "{{ mariadb_default_database_shard_id | int }}"
blazar_database_shard:
users:
- user: "{{ blazar_database_user }}"
password: "{{ blazar_database_password }}"
rules:
- schema: "{{ blazar_database_name }}"
shard_id: "{{ blazar_database_shard_id }}"
####################
# Docker
####################
blazar_tag: "{{ openstack_tag }}"
blazar_manager_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/blazar-manager"
blazar_manager_tag: "{{ blazar_tag }}"
blazar_manager_image_full: "{{ blazar_manager_image }}:{{ blazar_manager_tag }}"
blazar_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/blazar-api"
blazar_api_tag: "{{ blazar_tag }}"
blazar_api_image_full: "{{ blazar_api_image }}:{{ blazar_api_tag }}"
blazar_api_dimensions: "{{ default_container_dimensions }}"
blazar_manager_dimensions: "{{ default_container_dimensions }}"
blazar_api_enable_healthchecks: "{{ enable_container_healthchecks }}"
blazar_api_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
blazar_api_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
blazar_api_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
# NOTE(wuchunyang): we don't use healthcheck_url because the api returns 401(Unauthorized) which is failed.
blazar_api_healthcheck_test: ["CMD-SHELL", "healthcheck_listen blazar-api {{ blazar_api_port }}"]
blazar_api_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
blazar_api_healthcheck:
interval: "{{ blazar_api_healthcheck_interval }}"
retries: "{{ blazar_api_healthcheck_retries }}"
start_period: "{{ blazar_api_healthcheck_start_period }}"
test: "{% if blazar_api_enable_healthchecks | bool %}{{ blazar_api_healthcheck_test }}{% else %}NONE{% endif %}"
timeout: "{{ blazar_api_healthcheck_timeout }}"
blazar_manager_enable_healthchecks: "{{ enable_container_healthchecks }}"
blazar_manager_healthcheck_interval: "{{ default_container_healthcheck_interval }}"
blazar_manager_healthcheck_retries: "{{ default_container_healthcheck_retries }}"
blazar_manager_healthcheck_start_period: "{{ default_container_healthcheck_start_period }}"
blazar_manager_healthcheck_test: ["CMD-SHELL", "healthcheck_port blazar-manager {{ om_rpc_port }}"]
blazar_manager_healthcheck_timeout: "{{ default_container_healthcheck_timeout }}"
blazar_manager_healthcheck:
interval: "{{ blazar_manager_healthcheck_interval }}"
retries: "{{ blazar_manager_healthcheck_retries }}"
start_period: "{{ blazar_manager_healthcheck_start_period }}"
test: "{% if blazar_manager_enable_healthchecks | bool %}{{ blazar_manager_healthcheck_test }}{% else %}NONE{% endif %}"
timeout: "{{ blazar_manager_healthcheck_timeout }}"
blazar_api_default_volumes:
- "{{ node_config_directory }}/blazar-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 ~ '/blazar/blazar:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/blazar' if blazar_dev_mode | bool else '' }}"
blazar_manager_default_volumes:
- "{{ node_config_directory }}/blazar-manager/:{{ 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 ~ '/blazar/blazar:/var/lib/kolla/venv/lib/python' ~ distro_python_version ~ '/site-packages/blazar' if blazar_dev_mode | bool else '' }}"
blazar_extra_volumes: "{{ default_extra_volumes }}"
blazar_api_extra_volumes: "{{ blazar_extra_volumes }}"
blazar_manager_extra_volumes: "{{ blazar_extra_volumes }}"
####################
# OpenStack
####################
blazar_internal_endpoint: "{{ blazar_internal_fqdn | kolla_url(internal_protocol, blazar_api_port, '/v1') }}"
blazar_public_endpoint: "{{ blazar_external_fqdn | kolla_url(public_protocol, blazar_api_public_port, '/v1') }}"
blazar_logging_debug: "{{ openstack_logging_debug }}"
blazar_keystone_user: "blazar"
openstack_blazar_auth: "{{ openstack_auth }}"
#####################
## Kolla
#####################
blazar_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
blazar_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
blazar_dev_mode: "{{ kolla_dev_mode }}"
blazar_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
blazar_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
blazar_enabled_notification_topics: "{{ blazar_notification_topics | selectattr('enabled', 'equalto', true) | list }}"
####################
# Keystone
####################
blazar_ks_services:
- name: "blazar"
type: "reservation"
description: "OpenStack Reservation Service"
endpoints:
- {'interface': 'internal', 'url': '{{ blazar_internal_endpoint }}'}
- {'interface': 'public', 'url': '{{ blazar_public_endpoint }}'}
blazar_ks_users:
- project: "service"
user: "{{ blazar_keystone_user }}"
password: "{{ blazar_keystone_password }}"
role: "admin"