summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2017-02-27 23:09:33 -0500
committerTim Rozet <trozet@redhat.com>2017-03-17 00:47:30 +0000
commit679ba461b34afac878361b53c6016b48fd06603e (patch)
treed6750ed6b8abe95bdad22576f17bf0f8f392b277
parent5a9a47fc0c3b3e7d53093ce97010fe441af6bb47 (diff)
Add networking-vpp ML2 support
opnfv-tht-pr: 113 opnfv-puppet-tripleo-pr: 16 os-net-config-pr: 5 Change-Id: I0c34889db27fd71e1b73e860850b81a08707c324 Signed-off-by: Feng Pan <fpan@redhat.com>
-rw-r--r--build/opnfv-environment.yaml3
-rwxr-xr-xbuild/overcloud-full.sh2
-rw-r--r--build/patches/puppet-neutron-vpp-ml2.patch244
-rw-r--r--build/rpm_specs/opnfv-apex-common.spec4
-rw-r--r--config/deploy/os-nosdn-fdio-ha.yaml35
-rw-r--r--config/deploy/os-nosdn-fdio-noha.yaml4
-rwxr-xr-xlib/overcloud-deploy-functions.sh19
7 files changed, 306 insertions, 5 deletions
diff --git a/build/opnfv-environment.yaml b/build/opnfv-environment.yaml
index ff8d501d..8b58b359 100644
--- a/build/opnfv-environment.yaml
+++ b/build/opnfv-environment.yaml
@@ -9,6 +9,7 @@ parameter_defaults:
NeutronEnableForceMetadata: true
NeutronEnableDHCPMetadata: true
NeutronEnableIsolatedMetadata: true
+ #NeutronVPPAgentPhysnets: 'datacentre:GigabitEthernet2/2/0'
#NovaSchedulerDefaultFilters: "RamFilter,ComputeFilter,AvailabilityZoneFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,NUMATopologyFilter"
# Kernel arguments, this value will be set to kernel arguments specified for compute nodes in deploy setting file.
#ComputeKernelArgs: "intel_iommu=on iommu=pt default_hugepagesz=2MB hugepagesz=2MB hugepages=2048"
@@ -109,6 +110,7 @@ parameter_defaults:
- OS::TripleO::Services::Tacker
- OS::TripleO::Services::NeutronHoneycombAgent
- OS::TripleO::Services::Congress
+ - OS::TripleO::Services::NeutronVppAgent
ComputeServices:
- OS::TripleO::Services::CACerts
- OS::TripleO::Services::CephClient
@@ -133,3 +135,4 @@ parameter_defaults:
- OS::TripleO::Services::FluentdClient
- OS::TripleO::Services::VipHosts
- OS::TripleO::Services::NeutronHoneycombAgent
+ - OS::TripleO::Services::NeutronVppAgent
diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh
index a3033025..59544d7b 100755
--- a/build/overcloud-full.sh
+++ b/build/overcloud-full.sh
@@ -150,6 +150,8 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--upload ${BUILD_ROOT}/patches/puppet-neutron-add-odl-settings.patch:/usr/share/openstack-puppet/modules/neutron/ \
--run-command "cd /usr/share/openstack-puppet/modules/neutron && patch -p1 < puppet-neutron-add-odl-settings.patch" \
--upload ${CACHE_DIR}/$kvmfornfv_kernel_rpm:/root/ \
+ --upload ${BUILD_ROOT}/patches/puppet-neutron-vpp-ml2.patch:/usr/share/openstack-puppet/modules/neutron/ \
+ --run-command "cd /usr/share/openstack-puppet/modules/neutron && patch -p1 < puppet-neutron-vpp-ml2.patch" \
-a overcloud-full_build.qcow2
mv -f overcloud-full_build.qcow2 overcloud-full.qcow2
diff --git a/build/patches/puppet-neutron-vpp-ml2.patch b/build/patches/puppet-neutron-vpp-ml2.patch
new file mode 100644
index 00000000..5e1313f8
--- /dev/null
+++ b/build/patches/puppet-neutron-vpp-ml2.patch
@@ -0,0 +1,244 @@
+From 72afc22fbba73fdb474bd6e5c1c47ab31219a9b9 Mon Sep 17 00:00:00 2001
+From: Feng Pan <fpan@redhat.com>
+Date: Tue, 28 Feb 2017 18:07:53 -0500
+Subject: [PATCH] Add support for networking-vpp ML2 driver
+
+Change-Id: Ib45681b1e414001c42070a32e8f81778b4e9f15f
+---
+ .../provider/neutron_agent_vpp/ini_settings.rb | 15 ++++
+ lib/puppet/type/neutron_agent_vpp.rb | 28 +++++++
+ manifests/agents/ml2/vpp.pp | 91 ++++++++++++++++++++++
+ manifests/deps.pp | 1 +
+ manifests/params.pp | 3 +
+ manifests/plugins/ml2/vpp.pp | 38 +++++++++
+ 6 files changed, 176 insertions(+)
+ create mode 100644 lib/puppet/provider/neutron_agent_vpp/ini_settings.rb
+ create mode 100644 lib/puppet/type/neutron_agent_vpp.rb
+ create mode 100644 manifests/agents/ml2/vpp.pp
+ create mode 100644 manifests/plugins/ml2/vpp.pp
+
+diff --git a/lib/puppet/provider/neutron_agent_vpp/ini_settings.rb b/lib/puppet/provider/neutron_agent_vpp/ini_settings.rb
+new file mode 100644
+index 0000000..d8da7ab
+--- /dev/null
++++ b/lib/puppet/provider/neutron_agent_vpp/ini_settings.rb
+@@ -0,0 +1,15 @@
++Puppet::Type.type(:neutron_agent_vpp).provide(
++ :ini_setting,
++ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
++) do
++
++ def self.file_path
++ '/etc/neutron/plugins/ml2/vpp_agent.ini'
++ end
++
++ # added for backwards compatibility with older versions of inifile
++ def file_path
++ self.class.file_path
++ end
++
++end
+diff --git a/lib/puppet/type/neutron_agent_vpp.rb b/lib/puppet/type/neutron_agent_vpp.rb
+new file mode 100644
+index 0000000..0718db8
+--- /dev/null
++++ b/lib/puppet/type/neutron_agent_vpp.rb
+@@ -0,0 +1,28 @@
++Puppet::Type.newtype(:neutron_agent_vpp) do
++
++ ensurable
++
++ newparam(:name, :namevar => true) do
++ desc 'Section/setting name to manage from vpp agent config.'
++ newvalues(/\S+\/\S+/)
++ end
++
++ newproperty(:value) do
++ desc 'The value of the setting to be defined.'
++ munge do |value|
++ value = value.to_s.strip
++ value.capitalize! if value =~ /^(true|false)$/i
++ value
++ end
++ end
++
++ newparam(:ensure_absent_val) do
++ desc 'A value that is specified as the value property will behave as if ensure => absent was specified'
++ defaultto('<SERVICE DEFAULT>')
++ end
++
++ autorequire(:package) do
++ 'neutron-vpp-agent'
++ end
++
++end
+diff --git a/manifests/agents/ml2/vpp.pp b/manifests/agents/ml2/vpp.pp
+new file mode 100644
+index 0000000..faae279
+--- /dev/null
++++ b/manifests/agents/ml2/vpp.pp
+@@ -0,0 +1,91 @@
++# == Class: neutron::agents::ml2::vpp
++#
++# Configure networking-vpp Neutron agent for ML2 plugin.
++#
++# === Parameters
++#
++# [*package_ensure*]
++# (optional) Package ensure state.
++# Defaults to 'present'.
++#
++# [*enabled*]
++# (required) Whether or not to enable the agent.
++# Defaults to true.
++#
++# [*manage_service*]
++# (optional) Whether to start/stop the service
++# Defaults to true
++#
++# [*physnets*]
++# (optional) Comma-separated list of <physical_network>:<physical_interface>
++# tuples mapping physical network names to agent's node-specific physical
++# network interfaces. Defaults to $::os_service_default.
++#
++# [*etcd_host*]
++# (optional) etcd server host name/ip
++# Defaults to $::os_service_default.
++#
++# [*etcd_port*]
++# (optional) etcd server listening port.
++# Defaults to $::os_service_default.
++#
++# [*etcd_user*]
++# (optional) User name for etcd authentication
++# Defaults to $::os_service_default.
++#
++# [*etcd_pass*]
++# (optional) Password for etcd authentication
++# Defaults to $::os_service_default.
++#
++# [*purge_config*]
++# (optional) Whether to set only the specified config options
++# in the vpp config.
++# Defaults to false.
++#
++class neutron::agents::ml2::vpp (
++ $package_ensure = 'present',
++ $enabled = true,
++ $manage_service = true,
++ $physnets = $::os_service_default,
++ $etcd_host = $::os_service_default,
++ $etcd_port = $::os_service_default,
++ $etcd_user = $::os_service_default,
++ $etcd_pass = $::os_service_default,
++ $purge_config = false,
++) {
++ include ::neutron::deps
++ include ::neutron::params
++
++ resources { 'neutron_agent_vpp':
++ purge => $purge_config,
++ }
++
++ neutron_agent_vpp {
++ 'ml2_vpp/physnets': value => $physnets;
++ 'ml2_vpp/etcd_host': value => $etcd_host;
++ 'ml2_vpp/etcd_port': value => $etcd_port;
++ 'ml2_vpp/etcd_user': value => $etcd_user;
++ 'ml2_vpp/etcd_pass': value => $etcd_pass;
++ }
++
++ package { 'neutron-vpp-agent':
++ ensure => $package_ensure,
++ name => $::neutron::params::vpp_plugin_package,
++ tag => ['openstack', 'neutron-package'],
++ }
++
++ if $manage_service {
++ if $enabled {
++ $service_ensure = 'running'
++ } else {
++ $service_ensure = 'stopped'
++ }
++ }
++
++ service { 'neutron-vpp-agent-service':
++ ensure => $service_ensure,
++ name => $::neutron::params::vpp_agent_service,
++ enable => $enabled,
++ tag => ['neutron-service'],
++ }
++}
+diff --git a/manifests/deps.pp b/manifests/deps.pp
+index 94b6f78..835e906 100644
+--- a/manifests/deps.pp
++++ b/manifests/deps.pp
+@@ -35,6 +35,7 @@ class neutron::deps {
+ # All other inifile providers need to be processed in the config block
+ Anchor['neutron::config::begin'] -> Neutron_agent_linuxbridge<||> ~> Anchor['neutron::config::end']
+ Anchor['neutron::config::begin'] -> Neutron_agent_ovs<||> ~> Anchor['neutron::config::end']
++ Anchor['neutron::config::begin'] -> Neutron_agent_vpp<||> ~> Anchor['neutron::config::end']
+ Anchor['neutron::config::begin'] -> Neutron_api_config<||> ~> Anchor['neutron::config::end']
+ Anchor['neutron::config::begin'] -> Neutron_api_paste_ini<||> ~> Anchor['neutron::config::end']
+ Anchor['neutron::config::begin'] -> Neutron_config<||> ~> Anchor['neutron::config::end']
+diff --git a/manifests/params.pp b/manifests/params.pp
+index 05ef627..02b9be1 100644
+--- a/manifests/params.pp
++++ b/manifests/params.pp
+@@ -86,6 +86,9 @@ class neutron::params {
+
+ $kernel_headers = "linux-headers-${::kernelrelease}"
+
++ $vpp_plugin_package = 'python-networking-vpp'
++ $vpp_agent_service = 'neutron-vpp-agent'
++
+ } elsif($::osfamily == 'Debian') {
+
+ $nobody_user_group = 'nogroup'
+diff --git a/manifests/plugins/ml2/vpp.pp b/manifests/plugins/ml2/vpp.pp
+new file mode 100644
+index 0000000..837a614
+--- /dev/null
++++ b/manifests/plugins/ml2/vpp.pp
+@@ -0,0 +1,38 @@
++#
++# Install the networking-vpp ML2 mechanism driver and generate config file
++# from parameters in the other classes.
++#
++# === Parameters
++#
++# [*etcd_host*]
++# (optional) etcd server host name or IP.
++# Defaults to $::os_service_default
++#
++# [*etcd_port*]
++# (optional) etcd server listening port.
++# Defaults to $::os_service_default.
++#
++# [*etcd_user*]
++# (optional) User name for etcd authentication
++# Defaults to $::os_service_default.
++#
++# [*etcd_pass*]
++# (optional) Password for etcd authentication
++# Defaults to $::os_service_default.
++#
++class neutron::plugins::ml2::vpp (
++ $etcd_host = $::os_service_default,
++ $etcd_port = $::os_service_default,
++ $etcd_user = $::os_service_default,
++ $etcd_pass = $::os_service_default,
++) {
++ include ::neutron::deps
++ require ::neutron::plugins::ml2
++
++ neutron_plugin_ml2 {
++ 'ml2_vpp/etcd_host': value => $etcd_host;
++ 'ml2_vpp/etcd_port': value => $etcd_port;
++ 'ml2_vpp/etcd_user': value => $etcd_user;
++ 'ml2_vpp/etcd_pass': value => $etcd_pass;
++ }
++}
+--
+2.9.3
+
diff --git a/build/rpm_specs/opnfv-apex-common.spec b/build/rpm_specs/opnfv-apex-common.spec
index 702e26b4..3f89da1b 100644
--- a/build/rpm_specs/opnfv-apex-common.spec
+++ b/build/rpm_specs/opnfv-apex-common.spec
@@ -39,6 +39,7 @@ install build/bash_completion_apex %{buildroot}%{_sysconfdir}/bash_completion.d/
mkdir -p %{buildroot}%{_sysconfdir}/opnfv-apex/
install config/deploy/os-nosdn-nofeature-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-noha.yaml
install config/deploy/os-nosdn-fdio-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-fdio-noha.yaml
+install config/deploy/os-nosdn-fdio-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-fdio-ha.yaml
install config/deploy/os-nosdn-ovs-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-ovs-noha.yaml
install config/deploy/os-nosdn-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-ha.yaml
install config/deploy/os-nosdn-performance-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-performance-ha.yaml
@@ -120,6 +121,7 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
%{_sysconfdir}/bash_completion.d/apex
%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-noha.yaml
%{_sysconfdir}/opnfv-apex/os-nosdn-fdio-noha.yaml
+%{_sysconfdir}/opnfv-apex/os-nosdn-fdio-ha.yaml
%{_sysconfdir}/opnfv-apex/os-nosdn-ovs-noha.yaml
%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-ha.yaml
%{_sysconfdir}/opnfv-apex/os-nosdn-performance-ha.yaml
@@ -153,6 +155,8 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
%doc %{_docdir}/opnfv/inventory.yaml.example
%changelog
+* Mon Mar 12 2017 Feng Pan <fpan@redhat.com> - 4.0-7
+- Add os-nosdn-fdio-ha.yaml
* Fri Mar 10 2017 Feng Pan <fpan@redhat.com> - 4.0-6
- Add os-odl_l3-fdio-noha.yaml and os-odl_l3-fdio-ha.yaml
* Wed Mar 08 2017 Dan Radez <dradez@redhat.com> - 4.0-5
diff --git a/config/deploy/os-nosdn-fdio-ha.yaml b/config/deploy/os-nosdn-fdio-ha.yaml
new file mode 100644
index 00000000..05b075ac
--- /dev/null
+++ b/config/deploy/os-nosdn-fdio-ha.yaml
@@ -0,0 +1,35 @@
+global_params:
+ ha_enabled: true
+
+deploy_options:
+ sdn_controller: false
+ sdn_l3: false
+ tacker: true
+ congress: true
+ sfc: false
+ vpn: false
+ vpp: true
+ dataplane: fdio
+ performance:
+ Controller:
+ kernel:
+ hugepages: 1024
+ hugepagesz: 2M
+ intel_iommu: 'on'
+ iommu: pt
+ isolcpus: 1,2
+ vpp:
+ main-core: 1
+ corelist-workers: 2
+ uio-driver: uio_pci_generic
+ Compute:
+ kernel:
+ hugepagesz: 2M
+ hugepages: 2048
+ intel_iommu: 'on'
+ iommu: pt
+ isolcpus: 1,2
+ vpp:
+ main-core: 1
+ corelist-workers: 2
+ uio-driver: uio_pci_generic
diff --git a/config/deploy/os-nosdn-fdio-noha.yaml b/config/deploy/os-nosdn-fdio-noha.yaml
index dd87803d..321d90c6 100644
--- a/config/deploy/os-nosdn-fdio-noha.yaml
+++ b/config/deploy/os-nosdn-fdio-noha.yaml
@@ -4,8 +4,8 @@ global_params:
deploy_options:
sdn_controller: false
sdn_l3: false
- tacker: false
- congress: false
+ tacker: true
+ congress: true
sfc: false
vpn: false
vpp: true
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh
index 72364ae4..36346d85 100755
--- a/lib/overcloud-deploy-functions.sh
+++ b/lib/overcloud-deploy-functions.sh
@@ -55,7 +55,7 @@ function overcloud_deploy {
elif [[ -z "${deploy_options_array['sdn_controller']}" || "${deploy_options_array['sdn_controller']}" == 'False' ]]; then
echo -e "${blue}INFO: SDN Controller disabled...will deploy nosdn scenario${reset}"
if [ "${deploy_options_array['vpp']}" == 'True' ]; then
- DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-ml2-networking-vpp.yaml"
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-ml2-vpp.yaml"
fi
SDN_IMAGE=opendaylight
else
@@ -172,6 +172,19 @@ EOI
EOI
fi
+ if [[ -z "${deploy_options_array['sdn_controller']}" || "${deploy_options_array['sdn_controller']}" == 'False' ]]; then
+ if [ "${deploy_options_array['dataplane']}" == "fdio" ]; then
+ if [ "$tenant_nic_mapping_controller_members" == "$tenant_nic_mapping_compute_members" ]; then
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+ sed -i "/NeutronVPPAgentPhysnets:/c\ NeutronVPPAgentPhysnets: 'datacentre:${tenant_nic_mapping_controller_members}'" ${ENV_FILE}
+EOI
+ else
+ echo -e "${red}Compute and Controller must use the same tenant nic name, please modify network setting file.${reset}"
+ exit 1
+ fi
+ fi
+ fi
+
# Set ODL version accordingly
if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && -n "${deploy_options_array['odl_version']}" ]]; then
case "${deploy_options_array['odl_version']}" in
@@ -193,8 +206,8 @@ EOI
EOI
fi
- # Override any previous packages if FDIO and L2
- if [[ "${deploy_options_array['vpp']}" == 'True' && "${deploy_options_array['sdn_l3']}" == "False" ]]; then
+ # Override any previous packages if FDIO and ODL L2
+ if [[ "${deploy_options_array['vpp']}" == 'True' && "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "${deploy_options_array['sdn_l3']}" == "False" ]]; then
ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum -y remove opendaylight vpp vpp-api-python vpp-lib vpp-plugins honeycomb" \
--run-command "yum -y install /root/fdio_l2/*.rpm" \