Merge "Add VMware NSXV support to neutron"

This commit is contained in:
Jenkins 2017-07-06 22:46:39 +00:00 committed by Gerrit Code Review
commit 7c789a662c
8 changed files with 79 additions and 9 deletions

View File

@ -96,7 +96,7 @@ neutron_services:
container_name: "neutron_dhcp_agent" container_name: "neutron_dhcp_agent"
image: "{{ neutron_dhcp_agent_image_full }}" image: "{{ neutron_dhcp_agent_image_full }}"
privileged: True privileged: True
enabled: True enabled: "{{ neutron_plugin_agent != 'vmware_nsxv' }}"
group: "neutron-dhcp-agent" group: "neutron-dhcp-agent"
host_in_groups: "{{ True if orchestration_engine == 'KUBERNETES' else inventory_hostname in groups['neutron-dhcp-agent'] }}" host_in_groups: "{{ True if orchestration_engine == 'KUBERNETES' else inventory_hostname in groups['neutron-dhcp-agent'] }}"
volumes: volumes:
@ -109,7 +109,7 @@ neutron_services:
container_name: "neutron_l3_agent" container_name: "neutron_l3_agent"
image: "{{ neutron_l3_agent_image_full }}" image: "{{ neutron_l3_agent_image_full }}"
privileged: True privileged: True
enabled: "{{ not enable_neutron_vpnaas | bool }}" enabled: "{{ not enable_neutron_vpnaas | bool and neutron_plugin_agent != 'vmware_nsxv' }}"
host_in_groups: >- host_in_groups: >-
{{ {{
True if orchestration_engine == 'KUBERNETES' else True if orchestration_engine == 'KUBERNETES' else
@ -126,7 +126,7 @@ neutron_services:
container_name: "neutron_lbaas_agent" container_name: "neutron_lbaas_agent"
image: "{{ neutron_lbaas_agent_image_full }}" image: "{{ neutron_lbaas_agent_image_full }}"
privileged: True privileged: True
enabled: "{{ enable_neutron_lbaas | bool }}" enabled: "{{ enable_neutron_lbaas | bool and neutron_plugin_agent != 'vmware_nsxv' }}"
group: "neutron-lbaas-agent" group: "neutron-lbaas-agent"
host_in_groups: "{{ True if orchestration_engine == 'KUBERNETES' else inventory_hostname in groups['neutron-lbaas-agent'] }}" host_in_groups: "{{ True if orchestration_engine == 'KUBERNETES' else inventory_hostname in groups['neutron-lbaas-agent'] }}"
volumes: volumes:
@ -138,7 +138,7 @@ neutron_services:
container_name: "neutron_metadata_agent" container_name: "neutron_metadata_agent"
image: "{{ neutron_metadata_agent_image_full }}" image: "{{ neutron_metadata_agent_image_full }}"
privileged: True privileged: True
enabled: true enabled: "{{ neutron_plugin_agent != 'vmware_nsxv' }}"
host_in_groups: >- host_in_groups: >-
{{ {{
True if orchestration_engine == 'KUBERNETES' else True if orchestration_engine == 'KUBERNETES' else
@ -155,7 +155,7 @@ neutron_services:
container_name: "neutron_vpnaas_agent" container_name: "neutron_vpnaas_agent"
image: "{{ neutron_vpnaas_agent_image_full }}" image: "{{ neutron_vpnaas_agent_image_full }}"
privileged: True privileged: True
enabled: "{{ enable_neutron_vpnaas | bool }}" enabled: "{{ enable_neutron_vpnaas | bool and neutron_plugin_agent != 'vmware_nsxv' }}"
group: "neutron-vpnaas-agent" group: "neutron-vpnaas-agent"
host_in_groups: "{{ True if orchestration_engine == 'KUBERNETES' else inventory_hostname in groups['neutron-vpnaas-agent'] }}" host_in_groups: "{{ True if orchestration_engine == 'KUBERNETES' else inventory_hostname in groups['neutron-vpnaas-agent'] }}"
volumes: volumes:
@ -168,7 +168,7 @@ neutron_services:
container_name: "neutron_bgp_dragent" container_name: "neutron_bgp_dragent"
image: "{{ neutron_bgp_dragent_image_full }}" image: "{{ neutron_bgp_dragent_image_full }}"
privileged: True privileged: True
enabled: "{{ enable_neutron_bgp_dragent | bool }}" enabled: "{{ enable_neutron_bgp_dragent | bool and neutron_plugin_agent != 'vmware_nsxv' }}"
group: "neutron-bgp-dragent" group: "neutron-bgp-dragent"
host_in_groups: "{{ False if orchestration_engine == 'KUBERNETES' else inventory_hostname in groups['neutron-bgp-dragent'] }}" host_in_groups: "{{ False if orchestration_engine == 'KUBERNETES' else inventory_hostname in groups['neutron-bgp-dragent'] }}"
volumes: volumes:
@ -293,3 +293,23 @@ neutron_notification_topics:
enabled: "{{ enable_designate | bool }}" enabled: "{{ enable_designate | bool }}"
neutron_enabled_notification_topics: "{{ neutron_notification_topics | selectattr('enabled', 'equalto', true) | list }}" neutron_enabled_notification_topics: "{{ neutron_notification_topics | selectattr('enabled', 'equalto', true) | list }}"
####################
# VMware NSXV
####################
vmware_nsxv_user: "nsx_manager_user"
vmware_nsxv_password: "nsx_manager_password"
vmware_nsxv_manager_uri: "https://127.0.0.1"
vmware_nsxv_insecure: "True"
vmware_nsxv_cluster_moid: "TestCluster"
vmware_nsxv_datacenter_moid: "TestDataCeter"
vmware_nsxv_resource_pool_id: "TestRSGroup"
vmware_nsxv_datastore_id: "TestDataStore"
vmware_nsxv_external_network: "TestDVSPort-Ext"
vmware_nsxv_vdn_scope_id: "TestVDNScope"
vmware_nsxv_dvs_id: "TestDVS"
vmware_nsxv_backup_edge_pool: "service:compact:1:2"
vmware_nsxv_spoofguard_enabled: "false"
vmware_nsxv_metadata_initializer: "false"
vmware_nsxv_edge_ha: "false"

View File

@ -25,6 +25,7 @@
or neutron_lbaas_conf | changed or neutron_lbaas_conf | changed
or neutron_vpnaas_conf | changed or neutron_vpnaas_conf | changed
or neutron_ml2_conf | changed or neutron_ml2_conf | changed
or nsx_ini | changed
or policy_json | changed or policy_json | changed
or neutron_server_container | changed or neutron_server_container | changed

View File

@ -267,6 +267,24 @@
local_action: stat path="{{ node_custom_config }}/neutron/policy.json" local_action: stat path="{{ node_custom_config }}/neutron/policy.json"
register: neutron_policy register: neutron_policy
- name: Copying over nsx.ini
vars:
service_name: "neutron-server"
neutron_server: "{{ neutron_services[service_name] }}"
merge_configs:
sources:
- "{{ role_path }}/templates/nsx.ini.j2"
- "{{ node_custom_config }}/neutron/nsx.ini"
- "{{ node_custom_config }}/neutron/{{ inventory_hostname }}/nsx.ini"
dest: "{{ node_config_directory }}/{{ service_name }}/nsx.ini"
register: nsx_ini
when:
- neutron_server.enabled | bool
- neutron_server.host_in_groups | bool
- neutron_plugin_agent == 'vmware_nsxv'
notify:
- "Restart {{ service_name }} container"
- name: Copying over existing policy.json - name: Copying over existing policy.json
vars: vars:
service_name: "{{ item.key }}" service_name: "{{ item.key }}"

View File

@ -1,5 +1,5 @@
{ {
"command": "neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/neutron_lbaas.conf --config-file /etc/neutron/neutron_vpnaas.conf", "command": "neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-file /etc/neutron/neutron_lbaas.conf --config-file /etc/neutron/neutron_vpnaas.conf {% if neutron_plugin_agent == 'vmware_nsxv' %} --config-file /etc/neutron/plugins/vmware/nsx.ini {% endif %}",
"config_files": [ "config_files": [
{ {
"source": "{{ container_config_directory }}/neutron.conf", "source": "{{ container_config_directory }}/neutron.conf",
@ -31,7 +31,14 @@
"owner": "neutron", "owner": "neutron",
"perm": "0600", "perm": "0600",
"optional": true "optional": true
}{% if neutron_plugin_agent == 'vmware_nsxv' -%},
{
"source": "{{ container_config_directory }}/nsx.ini",
"dest": "/etc/neutron/plugins/vmware/nsx.ini",
"owner": "neutron",
"perm": "0600"
} }
{% endif -%}
], ],
"permissions": [ "permissions": [
{ {

View File

@ -34,9 +34,13 @@ host = {{ ansible_hostname }}_{{ item }}
{% endif %} {% endif %}
allow_overlapping_ips = true allow_overlapping_ips = true
core_plugin = ml2
{% if neutron_plugin_agent == 'vmware_nsxv' %}
core_plugin = vmware_nsx.plugin.NsxVPlugin
{% else %}
core_plugin = ml2
service_plugins = {{ neutron_service_plugins|map(attribute='name')|join(',') }} service_plugins = {{ neutron_service_plugins|map(attribute='name')|join(',') }}
{% endif %}
{% if enable_neutron_agent_ha | bool %} {% if enable_neutron_agent_ha | bool %}
dhcp_agents_per_network = {{ dhcp_agents_per_network }} dhcp_agents_per_network = {{ dhcp_agents_per_network }}

View File

@ -0,0 +1,17 @@
[nsxv]
user = {{ vmware_nsxv_user }}
password = {{ vmware_nsxv_password }}
manager_uri = {{ vmware_nsxv_manager_uri }}
insecure = {{ vmware_nsxv_insecure }}
cluster_moid = {{ vmware_nsxv_cluster_moid }}
datacenter_moid = {{ vmware_nsxv_datacenter_moid }}
resource_pool_id = {{ vmware_nsxv_resource_pool_id }}
datastore_id = {{ vmware_nsxv_datastore_id }}
external_network = {{ vmware_nsxv_external_network }}
vdn_scope_id = {{ vmware_nsxv_vdn_scope_id }}
dvs_id = {{ vmware_nsxv_dvs_id }}
backup_edge_pool = {{ vmware_nsxv_backup_edge_pool }}
spoofguard_enabled = {{ vmware_nsxv_spoofguard_enabled }}
metadata_initializer = {{ vmware_nsxv_metadata_initializer }}
edge_ha = {{ vmware_nsxv_edge_ha }}

View File

@ -86,7 +86,7 @@ kolla_internal_vip_address: "10.10.10.254"
# addresses for that reason. # addresses for that reason.
#neutron_external_interface: "eth1" #neutron_external_interface: "eth1"
# Valid options are [ openvswitch, linuxbridge ] # Valid options are [ openvswitch, linuxbridge, vmware_nsxv ]
#neutron_plugin_agent: "openvswitch" #neutron_plugin_agent: "openvswitch"

View File

@ -0,0 +1,3 @@
---
features:
- Add OpenStack VMWare NSX support into neutron service.