Merge "Add vSphere support to nova_compute"

This commit is contained in:
Jenkins 2017-08-15 14:44:06 +00:00 committed by Gerrit Code Review
commit 3393054f9b
8 changed files with 56 additions and 7 deletions

View File

@ -554,7 +554,8 @@ computes_need_external_bridge: "{{ enable_neutron_dvr | bool or enable_neutron_p
#######################
nova_backend_ceph: "{{ enable_ceph }}"
nova_backend: "{{ 'rbd' if nova_backend_ceph | bool else 'default' }}"
# Valid options are [ kvm, qemu, vmware ]
nova_compute_virt_type: "kvm"
#######################
# Murano options
@ -625,10 +626,11 @@ ceph_cache_rule: "cache host firstn"
################################################
# VMware - OpenStack VMware support
################################################
vmware_vcenter_host_ip:
vmware_vcenter_host_username:
vmware_vcenter_host_password:
vmware_vcenter_cluster_name:
vmware_vcenter_host_ip: "127.0.0.1"
vmware_vcenter_host_username: "username"
vmware_vcenter_host_password: "password"
vmware_vcenter_cluster_name: "cluster-1"
vmware_vcenter_insecure: "True"
######################
# OpenDaylight

View File

@ -5,7 +5,7 @@ nova_services:
nova-libvirt:
container_name: nova_libvirt
group: compute
enabled: True
enabled: "{{ nova_compute_virt_type in ['kvm', 'qemu'] }}"
image: "{{ nova_libvirt_image_full }}"
pid_mode: "host"
privileged: True
@ -249,3 +249,8 @@ nova_notification_topics:
enabled: "{{ enable_designate | bool }}"
nova_enabled_notification_topics: "{{ nova_notification_topics | selectattr('enabled', 'equalto', true) | list }}"
####################
# VMware
####################
vmware_vcenter_datastore_regex: ".*"

View File

@ -262,6 +262,7 @@
- config_json.changed | bool
or nova_conf.changed | bool
or policy_json.changed | bool
or vcenter_ca_file | bool
or nova_compute_container.changed | bool
- name: Restart nova-compute-ironic container

View File

@ -112,6 +112,21 @@
notify:
- Restart nova-ssh container
- name: Copying VMware vCenter CA file
vars:
service: "{{ nova_services['nova-compute'] }}"
copy:
src: "{{ node_custom_config }}/vmware_ca"
dest: "{{ node_config_directory }}/nova-compute/vmware_ca"
register: vcenter_ca_file
when:
- nova_compute_virt_type == "vmware"
- not vmware_vcenter_insecure | bool
- inventory_hostname in groups[service.group]
- service.enabled | bool
notify:
- Restart nova-compute container
- name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/nova/policy.json"
run_once: True

View File

@ -121,5 +121,6 @@
register: result
failed_when: result.stat.exists
when:
- nova_compute_virt_type in ['kvm', 'qemu']
- container_facts['nova_libvirt'] is not defined
- inventory_hostname in groups[nova_libvirt.group]

View File

@ -19,6 +19,12 @@
"dest": "/etc/ceph/",
"owner": "nova",
"perm": "0700"
}{% endif %}{% if nova_compute_virt_type == "vmware" and not vmware_vcenter_insecure | bool %},
{
"source": "{{ container_config_directory }}/vmware_ca",
"dest": "/etc/nova/vmware_ca",
"owner": "nova",
"perm": "0600"
}{% endif %}
],
"permissions": [

View File

@ -31,6 +31,8 @@ reserved_host_memory_mb = 0
{% elif enable_nova_fake | bool %}
host = {{ ansible_hostname }}_{{ service_name }}
compute_driver = fake.FakeDriver
{% elif nova_compute_virt_type == 'vmware' %}
compute_driver = vmwareapi.VMwareVCDriver
{% else %}
compute_driver = libvirt.LibvirtDriver
{% endif %}
@ -159,7 +161,7 @@ memcache_security_strategy = ENCRYPT
memcache_secret_key = {{ memcache_secret_key }}
memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}
{% if nova_compute_virt_type in ['kvm', 'qemu'] %}
[libvirt]
connection_uri = "qemu+tcp://{{ api_interface_address }}/system"
{% if enable_ceph | bool and nova_backend == "rbd" %}
@ -175,7 +177,21 @@ hw_disk_discard = {{ nova_hw_disk_discard }}
{% if nova_backend == "rbd" and external_ceph_cephx_enabled | bool %}
rbd_secret_uuid = {{ rbd_secret_uuid }}
{% endif %}
virt_type = {{ nova_compute_virt_type }}
{% endif %}
{% if nova_compute_virt_type == "vmware" %}
[vmware]
host_ip = {{ vmware_vcenter_host_ip }}
host_username = {{ vmware_vcenter_host_username }}
host_password = {{ vmware_vcenter_host_password }}
cluster_name = {{ vmware_vcenter_cluster_name }}
datastore_regex = {{ vmware_vcenter_datastore_regex }}
insecure = {{ vmware_vcenter_insecure }}
{% if not vmware_vcenter_insecure | bool %}
ca_file = /etc/nova/vmware_ca
{% endif %}
{% endif %}
[upgrade_levels]
compute = auto

View File

@ -307,6 +307,9 @@ kolla_internal_vip_address: "10.10.10.254"
#########################
#nova_backend_ceph: "{{ enable_ceph }}"
# Valid options are [ qemu, kvm, vmware ]
#nova_compute_virt_type: "kvm"
###################
# Hyper-V options
###################