summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2016-09-26 14:39:23 -0400
committerTim Rozet <trozet@redhat.com>2016-10-05 16:21:17 -0400
commit136bfee6d8a4dddd18d621047086031a1bb584d2 (patch)
tree05453b75d24ef75686d77137928daa26bfd9a61f /build
parent9b06e3cbd8d24ec9cf9cb0cbbf16b6b98b8e4b67 (diff)
VPP version update
- Update VPP version to latest on 16.09 branch - Change networking-vpp repo to point to openstack. - Update VPP python API rpm location - Configure etcd for networking-vpp ML2 plugin opnfv-tht-pr: 85 JIRA: APEX-283 Change-Id: I4e69de3c51b1f4221995cc8568cdfa18aacbc55c Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'build')
-rw-r--r--build/Makefile6
-rwxr-xr-xbuild/overcloud-full.sh6
-rw-r--r--build/puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb15
-rw-r--r--build/puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb28
-rw-r--r--build/puppet-neutron/manifests/agents/ml2/networking-vpp.pp33
-rw-r--r--build/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp28
-rw-r--r--build/rpm_specs/networking-vpp.spec50
-rw-r--r--build/variables.sh10
8 files changed, 149 insertions, 27 deletions
diff --git a/build/Makefile b/build/Makefile
index 90eeea5..796b7bc 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -200,11 +200,11 @@ $(MAVEN_FILE):
networking-vpp-rpm: networking-vpp.noarch.rpm
networking-vpp.noarch.rpm: networking-vpp
- pushd networking-vpp && python setup.py bdist_rpm --binary-only
- mv networking-vpp/dist/*.rpm networking-vpp.noarch.rpm
+ pushd networking-vpp && rpmbuild --clean -bb ../rpm_specs/networking-vpp.spec
+ mv networking-vpp/build/rpm/noarch/*.rpm networking-vpp.noarch.rpm
networking-vpp:
- git clone -b stable_vlan_rewrite https://github.com/fepan/networking-vpp.git
+ git clone https://git.openstack.org/openstack/networking-vpp
###############
# UNDERCLOUD #
diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh
index 88f9685..7af3f83 100755
--- a/build/overcloud-full.sh
+++ b/build/overcloud-full.sh
@@ -118,6 +118,7 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--run-command "pip install distro flask_restful" \
--run-command "yum install -y etcd" \
--run-command "pip install python-etcd" \
+ --run-command "puppet module install cristifalcas/etcd" \
--install "centos-release-qemu-ev" \
--run-command "yum update -y" \
--run-command "yum remove -y qemu-system-x86" \
@@ -132,7 +133,6 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--run-command "sed -i \"s/'--detailed-exitcodes',/'--detailed-exitcodes','-l','syslog','-l','console',/g\" /var/lib/heat-config/hooks/puppet" \
--run-command "yum install -y /root/fdio/*.rpm" \
--run-command "rm -f /etc/sysctl.d/80-vpp.conf" \
- --run-command "tar zxvf /root/fdio/vpp_papi*.tar.gz -C /" \
--install unzip \
--upload puppet-fdio.tar.gz:/etc/puppet/modules \
--run-command "cd /etc/puppet/modules && tar xzf puppet-fdio.tar.gz" \
@@ -144,7 +144,6 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--install /root/openstack-tacker-2015.2-1.trozet.noarch.rpm \
--upload puppet-tacker.tar.gz:/etc/puppet/modules/ \
--run-command "cd /etc/puppet/modules/ && tar xzf puppet-tacker.tar.gz" \
- --run-command "yum install -y https://dl.dropboxusercontent.com/u/7079970/rabbitmq-server-3.6.3-5.el7ost.noarch.rpm" \
--run-command "pip install python-senlinclient" \
--upload ../neutron/agent/interface/interface.py:/usr/lib/python2.7/site-packages/neutron/agent/linux/ \
--run-command "mkdir /root/fdio_neutron_l3" \
@@ -152,6 +151,9 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--upload ../neutron/agent/l3/router_info.py:/root/fdio_neutron_l3/ \
--upload ../puppet-neutron/manifests/agents/ml2/networking-vpp.pp:/etc/puppet/modules/neutron/manifests/agents/ml2/ \
--upload ../puppet-neutron/manifests/plugins/ml2/networking-vpp.pp:/etc/puppet/modules/neutron/manifests/plugins/ml2/ \
+ --upload ../puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb:/etc/puppet/modules/neutron/lib/puppet/type/ \
+ --mkdir /etc/puppet/modules/neutron/lib/puppet/provider/neutron_agent_vpp \
+ --upload ../puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb:/etc/puppet/modules/neutron/lib/puppet/provider/neutron_agent_vpp/ \
-a overcloud-full_build.qcow2
rm -rf ovs_nsh_patches
diff --git a/build/puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb b/build/puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb
new file mode 100644
index 0000000..595904c
--- /dev/null
+++ b/build/puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.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 \ No newline at end of file
diff --git a/build/puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb b/build/puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb
new file mode 100644
index 0000000..f43a8b4
--- /dev/null
+++ b/build/puppet-neutron/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
+ 'networking-vpp'
+ end
+
+end \ No newline at end of file
diff --git a/build/puppet-neutron/manifests/agents/ml2/networking-vpp.pp b/build/puppet-neutron/manifests/agents/ml2/networking-vpp.pp
index c25c281..6184e00 100644
--- a/build/puppet-neutron/manifests/agents/ml2/networking-vpp.pp
+++ b/build/puppet-neutron/manifests/agents/ml2/networking-vpp.pp
@@ -21,20 +21,34 @@
# tuples mapping physical network names to agent's node-specific physical
# network interfaces. Defaults to empty list.
#
-# [*flat_network_if*]
-# VPP interface used for flat network
-# Defaults to ''.
+# [*etcd_host*]
+# etcd server host name/ip
+# Defaults to 127.0.0.1.
+#
+# [*etcd_port*]
+# etcd server listening port.
+# Defaults to 4001.
#
class neutron::agents::ml2::networking-vpp (
$package_ensure = 'present',
$enabled = true,
$manage_service = true,
$physnets = '',
- $flat_network_if = '',
+ $etcd_host = '127.0.0.1',
+ $etcd_port = 4001,
) {
include ::neutron::params
+ Neutron_agent_vpp<||> ~> Service['networking-vpp-agent']
+
+ neutron_agent_vpp {
+ 'ml2_vpp/physnets': value => $physnets;
+ 'ml2_vpp/etcd_host': value => $etcd_host;
+ 'ml2_vpp/etcd_port': value => $etcd_port;
+ 'DEFAULT/host': value => $::fqdn;
+ }
+
if $manage_service {
if $enabled {
$service_ensure = 'running'
@@ -43,14 +57,9 @@ class neutron::agents::ml2::networking-vpp (
}
}
- neutron_plugin_ml2 {
- 'ml2_vpp/physnets': value => $physnets;
- 'ml2_vpp/flat_network_if': value => $flat_network_if;
- }->
service { 'networking-vpp-agent':
- ensure => $service_ensure,
- name => 'networking-vpp-agent',
- enable => $enabled,
- tag => 'neutron-service',
+ ensure => $service_ensure,
+ name => 'networking-vpp-agent',
+ enable => $enabled,
}
} \ No newline at end of file
diff --git a/build/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp b/build/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp
index 26548d3..cf8fe17 100644
--- a/build/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp
+++ b/build/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp
@@ -10,13 +10,28 @@
# property for a package resource type.
# Defaults to 'present'
#
-# [*agents*]
-# Networking-vpp agents's addresses
-# Defaults to $::os_service_default
+# [*etcd_host*]
+# (required) etcd server host name or IP.
+# Defaults to '127.0.0.1'
+#
+# [*etcd_port*]
+# (optional) etcd server listening port.
+# Defaults to 4001.
+#
+# [*etcd_user*]
+# (optional) User name for etcd authentication
+# Defaults to ''.
+#
+# [*etcd_pass*]
+# (optional) Password for etcd authentication
+# Defaults to ''.
#
class neutron::plugins::ml2::networking-vpp (
$package_ensure = 'present',
- $agents = $::os_service_default,
+ $etcd_host = '127.0.0.1',
+ $etcd_port = 4001,
+ $etcd_user = '',
+ $etcd_pass = '',
) {
require ::neutron::plugins::ml2
@@ -28,6 +43,9 @@ class neutron::plugins::ml2::networking-vpp (
)
neutron_plugin_ml2 {
- 'ml2_vpp/agents': value => $agents;
+ '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;
}
}
diff --git a/build/rpm_specs/networking-vpp.spec b/build/rpm_specs/networking-vpp.spec
new file mode 100644
index 0000000..28d3482
--- /dev/null
+++ b/build/rpm_specs/networking-vpp.spec
@@ -0,0 +1,50 @@
+%define name networking-vpp
+%define version %(python setup.py --version)
+%define release 1
+%define _topdir %(pwd)/build/rpm
+%define _builddir %(pwd)
+%define _rpmdir %(pwd)/build/rpm
+
+Summary: OpenStack Networking for VPP
+Name: %{name}
+Version: %{version}
+Release: %{release}
+License: Apache 2.0
+Group: Development/Libraries
+BuildArch: noarch
+Requires: vpp
+Vendor: OpenStack <openstack-dev@lists.openstack.org>
+Packager: Feng Pan <fpan@redhat.com>
+Url: http://www.openstack.org/
+
+%description
+ML2 Mechanism driver and small control plane for OpenVPP forwarder
+
+%prep
+cat << EOF > %{_builddir}/networking-vpp-agent.service
+[Unit]
+Description=Networking VPP ML2 Agent
+
+[Service]
+ExecStartPre=/usr/bin/systemctl is-active vpp
+ExecStart=/usr/bin/vpp-agent --config-file /etc/neutron/plugins/ml2/vpp_agent.ini
+Type=simple
+Restart=on-failure
+RestartSec=5s
+
+[Install]
+WantedBy=multi-user.target
+
+EOF
+
+%install
+python setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
+mkdir -p %{buildroot}/usr/lib/systemd/system
+install %{_builddir}/networking-vpp-agent.service %{buildroot}/usr/lib/systemd/system
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files -f INSTALLED_FILES
+%defattr(-,root,root)
+%attr(644,root,root) /usr/lib/systemd/system/networking-vpp-agent.service
diff --git a/build/variables.sh b/build/variables.sh
index 2eb0584..ce9eb03 100644
--- a/build/variables.sh
+++ b/build/variables.sh
@@ -29,12 +29,12 @@ dpdk_rpms=(
fdio_uri_base=http://artifacts.opnfv.org/apex/colorado
fdio_pkgs=(
-'vpp-16.09-rc1~7_gea60221~b1030.x86_64.rpm'
-'vpp-devel-16.09-rc1~7_gea60221~b1030.x86_64.rpm'
-'vpp-lib-16.09-rc1~7_gea60221~b1030.x86_64.rpm'
-'vpp_papi-1.0.linux-x86_64.tar.gz'
+'vpp-16.09-release.x86_64.rpm'
+'vpp-devel-16.09-release.x86_64.rpm'
+'vpp-lib-16.09-release.x86_64.rpm'
+'vpp-python-api-16.09-release.x86_64.rpm'
)
-honeycomb_pkg='honeycomb-1.0.0-1066.noarch.rpm'
+honeycomb_pkg='honeycomb-1.16.9-FINAL.noarch.rpm'
ovs_rpm_name=openvswitch-2.5.90-1.el7.centos.x86_64.rpm