Ansible config for Spice console

Change-Id: Id6ccf169c8ce07c78df150de21ab2d36eec3949f
Partially-Implements: blueprint nova-proxies
This commit is contained in:
Sam Yaple 2015-10-18 07:55:34 +00:00
parent 50f866c921
commit cd3c089978
3 changed files with 24 additions and 4 deletions

View File

@ -84,6 +84,7 @@ nova_api_port: "8774"
nova_api_ec2_port: "8773"
nova_metadata_port: "8775"
nova_novncproxy_port: "6080"
nova_spicehtml5proxy_port: "6082"
neutron_server_port: "9696"
@ -113,6 +114,9 @@ openstack_logging_debug: "False"
openstack_region_name: "RegionOne"
# Valid options are [ novnc, spice ]
nova_console: "novnc"
# Openstack authentication string. You should only need to override these if you
# are changing the admin tenant/project or user.
openstack_auth:

View File

@ -38,15 +38,28 @@ memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansi
# Though my_ip is not used directly, lots of other variables use $my_ip
my_ip = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
{% if nova_console == 'novnc' %}
[vnc]
vncserver_listen = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
vncserver_proxyclient_address = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
novncproxy_host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
novncproxy_port = {{ nova_novncproxy_port }}
{% if inventory_hostname in groups['compute'] %}
novncproxy_base_url = http://{{ kolla_internal_address }}:{{ nova_novncproxy_port }}/vnc_auto.html
{% endif %}
novncproxy_host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
novncproxy_port = {{ nova_novncproxy_port }}
{% elif nova_console == 'spice' %}
[vnc]
# We have to turn off vnc to use spice
enabled = false
[spice]
server_listen = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
server_proxyclient_address = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
{% if inventory_hostname in groups['compute'] %}
html5proxy_base_url = http://{{ kolla_internal_address }}:{{ nova_spicehtml5proxy_port }}/spice_auto.html
{% endif %}
html5proxy_host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
html5proxy_port = {{ nova_html5proxy_port }}
{% endif %}
{% if enable_ironic | bool %}
compute_driver = nova.virt.ironic.IronicDriver

View File

@ -81,6 +81,9 @@ neutron_external_interface: "eth1"
#openstack_logging_verbose: "True"
#openstack_logging_debug: "False"
# Valid options are [ novnc, spice ]
#nova_console: "novnc"
# OpenStack services can be enabled or disabled with these options
#enable_cinder: "yes"
#enable_heat: "no"