From b5117918365d6b2a06439fcf42e2fe500bebd0bb Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Fri, 1 Jul 2016 18:18:09 +0100 Subject: [PATCH] HAProxy: configure either novnc or spice Instead of having one useless backend, this conditionally deploys what's needed. This consumes the override set by the deployer. Closes-Bug: 1539246 Change-Id: I532a9bbb443a564534d7f083674fa3d39398a8bc Signed-off-by: Jean-Philippe Evrard --- playbooks/inventory/group_vars/all.yml | 5 +++++ playbooks/vars/configs/haproxy_config.yml | 13 +------------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/playbooks/inventory/group_vars/all.yml b/playbooks/inventory/group_vars/all.yml index d274488339..17a54ffe36 100644 --- a/playbooks/inventory/group_vars/all.yml +++ b/playbooks/inventory/group_vars/all.yml @@ -177,6 +177,11 @@ nova_service_user_domain_id: default nova_rabbitmq_userid: nova nova_rabbitmq_vhost: /nova nova_keystone_auth_plugin: password +nova_console_type: spice +nova_novncproxy_port: 6080 +nova_spice_html5proxy_base_port: 6082 +nova_console_port: "{% if nova_console_type == 'spice' %}{{ nova_spice_html5proxy_base_port }}{% else %}{{ nova_novncproxy_port }}{% endif %}" + ## Swift swift_system_user_name: swift diff --git a/playbooks/vars/configs/haproxy_config.yml b/playbooks/vars/configs/haproxy_config.yml index 0a07864b8d..a0d8965865 100644 --- a/playbooks/vars/configs/haproxy_config.yml +++ b/playbooks/vars/configs/haproxy_config.yml @@ -130,18 +130,7 @@ haproxy_service_configs: haproxy_service_name: nova_console haproxy_backend_nodes: "{{ groups['nova_console'] | default([]) }}" haproxy_ssl: "{{ haproxy_ssl }}" - haproxy_port: 6082 - haproxy_balance_type: tcp - haproxy_timeout_client: 60m - haproxy_timeout_server: 60m - haproxy_balance_alg: source - haproxy_backend_options: - - tcp-check - - service: - haproxy_service_name: nova_console_novnc - haproxy_backend_nodes: "{{ groups['nova_console'] | default([]) }}" - haproxy_ssl: "{{ haproxy_ssl }}" - haproxy_port: 6080 + haproxy_port: "{{ nova_console_port }}" haproxy_balance_type: tcp haproxy_timeout_client: 60m haproxy_timeout_server: 60m