Merge "Finish implementation of spice"

This commit is contained in:
Jenkins 2015-11-06 21:57:08 +00:00 committed by Gerrit Code Review
commit 44b5a8867e
8 changed files with 94 additions and 17 deletions

View File

@ -93,6 +93,9 @@ nova
[nova-scheduler:children]
nova
[nova-spicehtml5proxy:children]
nova
# Neutron
[neutron-server:children]
neutron

View File

@ -102,6 +102,9 @@ nova
[nova-scheduler:children]
nova
[nova-spicehtml5proxy:children]
nova
# Neutron
[neutron-server:children]
control

View File

@ -89,11 +89,19 @@ listen nova_metadata
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ nova_metadata_port }} check inter 2000 rise 2 fall 5
{% endfor %}
{% if nova_console == 'novnc' %}
listen nova_novncproxy
bind {{ kolla_internal_address }}:{{ nova_novncproxy_port }}
{% for host in groups['nova-novncproxy'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ nova_novncproxy_port }} check inter 2000 rise 2 fall 5
{% endfor %}
{% elif nova_console == 'spice' %}
listen nova_spicehtml5proxy
bind {{ kolla_internal_address }}:{{ nova_spicehtml5proxy_port }}
{% for host in groups['nova-spicehtml5proxy'] %}
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ nova_spicehtml5proxy_port }} check inter 2000 rise 2 fall 5
{% endfor %}
{% endif %}
{% endif %}
{% if enable_neutron | bool %}

View File

@ -41,6 +41,10 @@ nova_novncproxy_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{
nova_novncproxy_tag: "{{ openstack_release }}"
nova_novncproxy_image_full: "{{ nova_novncproxy_image }}:{{ nova_novncproxy_tag }}"
nova_spicehtml5proxy_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-nova-spicehtml5proxy"
nova_spicehtml5proxy_tag: "{{ openstack_release }}"
nova_spicehtml5proxy_image_full: "{{ nova_spicehtml5proxy_image }}:{{ nova_spicehtml5proxy_tag }}"
nova_scheduler_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-nova-scheduler"
nova_scheduler_tag: "{{ openstack_release }}"
nova_scheduler_image_full: "{{ nova_scheduler_image }}:{{ nova_scheduler_tag }}"

View File

@ -165,13 +165,47 @@
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_augment"
- "{{ node_templates_directory }}/{{ service_name }}/{{ service_name }}.conf_augment"
config_dest: "{{ node_config_directory }}/{{ service_name }}/nova.conf"
when: inventory_hostname in groups['nova-novncproxy']
when:
- inventory_hostname in groups['nova-novncproxy']
- nova_console == 'novnc'
- name: Copying Nova Novncproxy JSON configuration file
template:
src: "roles/nova/templates/nova-novncproxy.json.j2"
dest: "{{ node_config_directory }}/nova-novncproxy/config.json"
when: inventory_hostname in groups['nova-novncproxy']
when:
- inventory_hostname in groups['nova-novncproxy']
- nova_console == 'novnc'
- include: ../../config.yml
vars:
service_name: "nova-spicehtml5proxy"
config_source:
- "roles/{{ project_name }}/templates/nova.conf.j2"
- "/etc/kolla/config/global.conf"
- "/etc/kolla/config/database.conf"
- "/etc/kolla/config/messaging.conf"
- "/etc/kolla/config/{{ project_name }}.conf"
- "/etc/kolla/config/{{ project_name }}/{{ service_name }}.conf"
config_template_dest:
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_minimal"
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_global"
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_database"
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_messaging"
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_augment"
- "{{ node_templates_directory }}/{{ service_name }}/{{ service_name }}.conf_augment"
config_dest: "{{ node_config_directory }}/{{ service_name }}/nova.conf"
when:
- inventory_hostname in groups['nova-spicehtml5proxy']
- nova_console == 'spice'
- name: Copying Nova spicehtml5proxy JSON configuration file
template:
src: "roles/nova/templates/nova-spicehtml5proxy.json.j2"
dest: "{{ node_config_directory }}/nova-spicehtml5proxy/config.json"
when:
- inventory_hostname in groups['nova-spicehtml5proxy']
- nova_console == 'spice'
- name: Ensuring config directory exists
file:

View File

@ -110,7 +110,9 @@
- "{{ node_config_directory }}/nova-novncproxy/:{{ container_config_directory }}/:ro"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['nova-novncproxy']
when:
- inventory_hostname in groups['nova-novncproxy']
- nova_console == 'novnc'
- name: Starting Nova-scheduler container
docker:
@ -133,6 +135,29 @@
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['nova-scheduler']
- name: Starting Nova-spicehtml5proxy container
docker:
tty: True
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "{{ docker_restart_policy }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: nova_spicehtml5proxy
image: "{{ nova_spicehtml5proxy_image_full }}"
volumes:
- "/var/lib/kolla/dev/log:/dev/log"
- "{{ node_config_directory }}/nova-spicehtml5proxy/:{{ container_config_directory }}/:ro"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when:
- inventory_hostname in groups['nova-spicehtml5proxy']
- nova_console == 'spice'
- name: Starting Nova-compute container
docker:
tty: True

View File

@ -32,6 +32,17 @@ linuxnet_interface_driver = nova.network.linux_net.BridgeInterfaceDriver
allow_resize_to_same_host = true
{% if enable_ironic | bool %}
compute_driver = nova.virt.ironic.IronicDriver
scheduler_host_manager = nova.scheduler.ironic_host_manager.IronicHostManager
ram_allocation_ratio = 1.0
reserved_host_memory_mb = 0
compute_manager = ironic.nova.compute.manager.ClusteredComputeManager
scheduler_use_baremetal_filters = True
{% else %}
compute_driver = libvirt.LibvirtDriver
{% endif %}
memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}
@ -39,14 +50,14 @@ memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansi
my_ip = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
{% if nova_console == 'novnc' %}
novncproxy_host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
novncproxy_port = {{ nova_novncproxy_port }}
[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
@ -58,18 +69,7 @@ server_proxyclient_address = {{ hostvars[inventory_hostname]['ansible_' + api_in
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
scheduler_host_manager = nova.scheduler.ironic_host_manager.IronicHostManager
ram_allocation_ratio = 1.0
reserved_host_memory_mb = 0
compute_manager = ironic.nova.compute.manager.ClusteredComputeManager
scheduler_use_baremetal_filters = True
{% else %}
compute_driver = libvirt.LibvirtDriver
html5proxy_port = {{ nova_spicehtml5proxy_port }}
{% endif %}
{% if enable_ironic | bool %}