f1c8136556
Having all services in one giant haproxy file makes altering configuration for a service both painful and dangerous. Each service should be configured with a simple set of variables and rendered with a single unified template. Available are two new templates: * haproxy_single_service_listen.cfg.j2: close to the original style, but only one service per file * haproxy_single_service_split.cfg.j2: using the newer haproxy syntax for separated frontend and backend For now the default will be the single listen block, for ease of transition. Change-Id: I6e237438fbc0aa3c89a3c8bd706a53b74e71904b
54 lines
2.3 KiB
YAML
54 lines
2.3 KiB
YAML
---
|
|
project_name: "opendaylight"
|
|
|
|
opendaylight_services:
|
|
opendaylight:
|
|
container_name: "opendaylight"
|
|
image: "{{ opendaylight_image_full }}"
|
|
enabled: True
|
|
privileged: True
|
|
group: "opendaylight"
|
|
host_in_groups: "{{ inventory_hostname in groups['opendaylight'] }}"
|
|
volumes:
|
|
- "{{ node_config_directory }}/opendaylight/:{{ container_config_directory }}/:ro"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "kolla_logs:/var/log/kolla/"
|
|
dimensions: "{{ opendaylight_dimensions }}"
|
|
haproxy:
|
|
opendaylight_api:
|
|
enabled: "{{ enable_opendaylight }}"
|
|
mode: "http"
|
|
port: "{{ opendaylight_haproxy_restconf_port }}"
|
|
backend_http_extra:
|
|
- "balance source"
|
|
custom_member_list: "{{ api_haproxy_members.split(';') }}"
|
|
opendaylight_api_backup:
|
|
enabled: "{{ enable_opendaylight }}"
|
|
mode: "http"
|
|
port: "{{ opendaylight_haproxy_restconf_port_backup }}"
|
|
backend_http_extra:
|
|
- "balance source"
|
|
custom_member_list: "{{ backup_api_haproxy_members.split(';') }}"
|
|
opendaylight_websocket:
|
|
enabled: "{{ enable_opendaylight }}"
|
|
mode: "http"
|
|
port: "{{ opendaylight_websocket_port }}"
|
|
backend_http_extra:
|
|
- "balance source"
|
|
|
|
####################
|
|
# HAProxy
|
|
####################
|
|
api_haproxy_members: "{% for host in groups['opendaylight'] %}server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ opendaylight_restconf_port }} check inter 2000 rise 2 fall 5;{% endfor %}"
|
|
backup_api_haproxy_members: "{% for host in groups['opendaylight'] %}server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ opendaylight_restconf_port_backup }} check inter 2000 rise 2 fall 5;{% endfor %}"
|
|
|
|
####################
|
|
# Docker
|
|
####################
|
|
|
|
opendaylight_install_type: "{{ kolla_install_type }}"
|
|
opendaylight_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ opendaylight_install_type }}-opendaylight"
|
|
opendaylight_tag: "{{ openstack_release }}"
|
|
opendaylight_image_full: "{{ opendaylight_image }}:{{ opendaylight_tag }}"
|
|
opendaylight_dimensions: "{{ default_container_dimensions }}"
|