Update the horizon port into all.yml

TrivialFix

Change-Id: Ib38161ecb82b480e4c901efb95efccff33e5a90e
This commit is contained in:
caoyuan 2016-12-28 23:38:50 +08:00
parent 9d3a60ecf9
commit bd1b4e4eef
5 changed files with 12 additions and 10 deletions

View File

@ -175,6 +175,8 @@ sahara_api_port: "8386"
heat_api_port: "8004" heat_api_port: "8004"
heat_api_cfn_port: "8000" heat_api_cfn_port: "8000"
horizon_port: "80"
murano_api_port: "8082" murano_api_port: "8082"
ironic_api_port: "6385" ironic_api_port: "6385"

View File

@ -83,7 +83,7 @@
- name: Checking free port for Horizon HAProxy - name: Checking free port for Horizon HAProxy
wait_for: wait_for:
host: "{{ kolla_internal_vip_address }}" host: "{{ kolla_internal_vip_address }}"
port: "80" port: "{{ horizon_port }}"
connect_timeout: 1 connect_timeout: 1
state: stopped state: stopped
when: when:

View File

@ -186,11 +186,11 @@ listen neutron_server_external
{% if enable_horizon | bool %} {% if enable_horizon | bool %}
listen horizon listen horizon
bind {{ kolla_internal_vip_address }}:80 bind {{ kolla_internal_vip_address }}:{{ horizon_port }}
balance source balance source
http-request del-header X-Forwarded-Proto http-request del-header X-Forwarded-Proto
{% for host in groups['horizon'] %} {% 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 %} {% endfor %}
{% if haproxy_enable_external_vip | bool %} {% if haproxy_enable_external_vip | bool %}
@ -201,17 +201,17 @@ listen horizon_external
http-request del-header X-Forwarded-Proto http-request del-header X-Forwarded-Proto
http-request set-header X-Forwarded-Proto https if { ssl_fc } http-request set-header X-Forwarded-Proto https if { ssl_fc }
{% for host in groups['horizon'] %} {% 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 %} {% endfor %}
frontend horizon_external_redirect 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 } redirect scheme https code 301 if !{ ssl_fc }
{% else %} {% else %}
listen horizon_external listen horizon_external
bind {{ kolla_external_vip_address }}:80 bind {{ kolla_external_vip_address }}:{{ horizon_port }}
{% for host in groups['horizon'] %} {% 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 %} {% endfor %}
{% endif %} {% endif %}
{% endif %} {% endif %}

View File

@ -8,7 +8,7 @@
- name: Checking free port for Horizon - name: Checking free port for Horizon
wait_for: wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "80" port: "{{ horizon_port }}"
connect_timeout: 1 connect_timeout: 1
state: stopped state: stopped
when: when:

View File

@ -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' %} {% 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 LogLevel warn
ErrorLog /var/log/kolla/horizon/horizon.log ErrorLog /var/log/kolla/horizon/horizon.log
CustomLog /var/log/kolla/horizon/horizon-access.log combined CustomLog /var/log/kolla/horizon/horizon-access.log combined