--- project_name: "mariadb" mariadb_services: mariadb: container_name: mariadb group: mariadb enabled: true image: "{{ mariadb_image_full }}" volumes: "{{ mariadb_default_volumes + mariadb_extra_volumes }}" dimensions: "{{ mariadb_dimensions }}" haproxy: mariadb: enabled: "{{ enable_mariadb|bool and not enable_external_mariadb_load_balancer|bool }}" mode: "tcp" port: "{{ database_port }}" listen_port: "{{ mariadb_port }}" frontend_tcp_extra: - "option clitcpka" - "timeout client 3600s" backend_tcp_extra: - "option srvtcpka" - "timeout server 3600s" - "option mysql-check user haproxy post-41" custom_member_list: "{{ internal_haproxy_members.split(';') }}" mariadb_external_lb: enabled: "{{ enable_external_mariadb_load_balancer|bool }}" mode: "tcp" port: "{{ database_port }}" listen_port: "{{ mariadb_port }}" frontend_tcp_extra: - "option clitcpka" - "timeout client 3600s" backend_tcp_extra: - "option srvtcpka" - "timeout server 3600s" custom_member_list: "{{ external_haproxy_members.split(';') }}" #################### # Database #################### database_cluster_name: "openstack" database_max_timeout: 120 #################### # HAProxy #################### internal_haproxy_members: "{% for host in groups['mariadb'] %}server {{ hostvars[host]['ansible_hostname'] }} {{ 'api' | kolla_address(host) }}:{{ mariadb_port }} check inter 2000 rise 2 fall 5{% if not loop.first %} backup{% endif %};{% endfor %}" external_haproxy_members: "{% for host in groups['mariadb'] %}server {{ host }} {{ host }}:{{ mariadb_port }} check inter 2000 rise 2 fall 5{% if not loop.first %} backup{% endif %};{% endfor %}" #################### # Docker #################### mariadb_install_type: "{{ kolla_install_type }}" mariadb_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ mariadb_install_type }}-mariadb" mariadb_tag: "{{ openstack_tag }}" mariadb_image_full: "{{ mariadb_image }}:{{ mariadb_tag }}" mariadb_dimensions: "{{ default_container_dimensions }}" mariadb_default_volumes: - "{{ node_config_directory }}/mariadb/:{{ container_config_directory }}/:ro" - "/etc/localtime:/etc/localtime:ro" - "{{ '/etc/timezone:/etc/timezone:ro' if kolla_base_distro in ['debian', 'ubuntu'] else '' }}" - "mariadb:/var/lib/mysql" - "kolla_logs:/var/log/kolla/" mariadb_extra_volumes: "{{ default_extra_volumes }}" ######################################## # Vars used within recover_cluster.yml ######################################## mariadb_service: "{{ mariadb_services['mariadb'] }}" ############### # WSREP options ############### mariadb_wsrep_extra_provider_options: [] #################### # Backups #################### mariabackup_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ mariadb_install_type }}-mariadb" mariabackup_tag: "{{ openstack_tag }}" mariabackup_image_full: "{{ mariabackup_image }}:{{ mariabackup_tag }}" mariadb_backup_host: "{{ groups['mariadb'][0] }}" mariadb_backup_database_schema: "PERCONA_SCHEMA" mariadb_backup_database_user: "backup" mariadb_backup_database_address: "{{ database_address }}" mariadb_backup_type: "full"