diff options
| author | Sam Yaple <sam@yaple.net> | 2015-10-18 07:55:34 +0000 |
|---|---|---|
| committer | Sam Yaple <sam@yaple.net> | 2015-11-03 06:32:52 +0000 |
| commit | cd3c08997829ee1ae94c5cf5416ebb21d06704fd (patch) | |
| tree | 758bf33eb46a3360bec1039c1dbe4dce11611d60 | |
| parent | 50f866c921087ff3a00a80c9613b1be3a2abdb7f (diff) | |
| download | kolla-cd3c08997829ee1ae94c5cf5416ebb21d06704fd.tar.gz kolla-cd3c08997829ee1ae94c5cf5416ebb21d06704fd.zip | |
Ansible config for Spice console
Change-Id: Id6ccf169c8ce07c78df150de21ab2d36eec3949f
Partially-Implements: blueprint nova-proxies
| -rw-r--r-- | ansible/group_vars/all.yml | 4 | ||||
| -rw-r--r-- | ansible/roles/nova/templates/nova.conf.j2 | 19 | ||||
| -rw-r--r-- | etc/kolla/globals.yml | 3 |
3 files changed, 23 insertions, 3 deletions
diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 69c412914..a55eed226 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -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: diff --git a/ansible/roles/nova/templates/nova.conf.j2 b/ansible/roles/nova/templates/nova.conf.j2 index 397166bd1..847728cad 100644 --- a/ansible/roles/nova/templates/nova.conf.j2 +++ b/ansible/roles/nova/templates/nova.conf.j2 @@ -38,14 +38,27 @@ 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'] }} - +{% 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'] %} -novncproxy_base_url = http://{{ kolla_internal_address }}:{{ nova_novncproxy_port }}/vnc_auto.html +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 %} diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index cdb7c1711..507b96986 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -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" |
