diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index e3b53ad0eb2d1a5be5c12ba3215539a19cd75920..922484c3f607f97a6f36daa9af6da08dbb2588b0 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -175,6 +175,8 @@ sahara_api_port: "8386" heat_api_port: "8004" heat_api_cfn_port: "8000" +horizon_port: "80" + murano_api_port: "8082" ironic_api_port: "6385" diff --git a/ansible/roles/haproxy/tasks/precheck.yml b/ansible/roles/haproxy/tasks/precheck.yml index b9dbf335821da9d95880a2f9cae2648422a74c29..021d2215410e21dd95c23baf0aec30344b670585 100644 --- a/ansible/roles/haproxy/tasks/precheck.yml +++ b/ansible/roles/haproxy/tasks/precheck.yml @@ -83,7 +83,7 @@ - name: Checking free port for Horizon HAProxy wait_for: host: "{{ kolla_internal_vip_address }}" - port: "80" + port: "{{ horizon_port }}" connect_timeout: 1 state: stopped when: diff --git a/ansible/roles/haproxy/templates/haproxy.cfg.j2 b/ansible/roles/haproxy/templates/haproxy.cfg.j2 index 9d1d54883b99480877525e45e20da38808ec510d..2d5b17eb481af4e7020cc44cab25d7f25862b0ae 100644 --- a/ansible/roles/haproxy/templates/haproxy.cfg.j2 +++ b/ansible/roles/haproxy/templates/haproxy.cfg.j2 @@ -186,11 +186,11 @@ listen neutron_server_external {% if enable_horizon | bool %} listen horizon - bind {{ kolla_internal_vip_address }}:80 + bind {{ kolla_internal_vip_address }}:{{ horizon_port }} balance source http-request del-header X-Forwarded-Proto {% for host in groups['horizon'] %} - server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:80 check inter 2000 rise 2 fall 5 + server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ horizon_port }} check inter 2000 rise 2 fall 5 {% endfor %} {% if haproxy_enable_external_vip | bool %} @@ -201,17 +201,17 @@ listen horizon_external http-request del-header X-Forwarded-Proto http-request set-header X-Forwarded-Proto https if { ssl_fc } {% for host in groups['horizon'] %} - server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:80 check inter 2000 rise 2 fall 5 + server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ horizon_port }} check inter 2000 rise 2 fall 5 {% endfor %} frontend horizon_external_redirect - bind {{ kolla_external_vip_address }}:80 + bind {{ kolla_external_vip_address }}:{{ horizon_port }} redirect scheme https code 301 if !{ ssl_fc } {% else %} listen horizon_external - bind {{ kolla_external_vip_address }}:80 + bind {{ kolla_external_vip_address }}:{{ horizon_port }} {% for host in groups['horizon'] %} - server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:80 check inter 2000 rise 2 fall 5 + server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ horizon_port }} check inter 2000 rise 2 fall 5 {% endfor %} {% endif %} {% endif %} diff --git a/ansible/roles/horizon/tasks/precheck.yml b/ansible/roles/horizon/tasks/precheck.yml index 703b0e52b262544baab009ea9836823d8de106e9..f81c023e864f158364434b5968639a9db69a60d4 100644 --- a/ansible/roles/horizon/tasks/precheck.yml +++ b/ansible/roles/horizon/tasks/precheck.yml @@ -8,7 +8,7 @@ - name: Checking free port for Horizon wait_for: host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" - port: "80" + port: "{{ horizon_port }}" connect_timeout: 1 state: stopped when: diff --git a/ansible/roles/horizon/templates/horizon.conf.j2 b/ansible/roles/horizon/templates/horizon.conf.j2 index 38b66ebaf8bc3bce813166037923b1a30410e1df..d180ae3f45a595e1e0e719a81b848f9ce732d81a 100644 --- a/ansible/roles/horizon/templates/horizon.conf.j2 +++ b/ansible/roles/horizon/templates/horizon.conf.j2 @@ -1,7 +1,7 @@ {% set python_path = '/usr/share/openstack-dashboard' if kolla_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %} -Listen {{ api_interface_address }}:80 +Listen {{ api_interface_address }}:{{ horizon_port }} -<VirtualHost *:80> +<VirtualHost *:{{ horizon_port }}> LogLevel warn ErrorLog /var/log/kolla/horizon/horizon.log CustomLog /var/log/kolla/horizon/horizon-access.log combined