Merge "VPP version update"
authorTim Rozet <trozet@redhat.com>
Thu, 6 Oct 2016 18:48:40 +0000 (18:48 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Thu, 6 Oct 2016 18:48:40 +0000 (18:48 +0000)
build/Makefile
build/overcloud-full.sh
build/puppet-neutron/lib/puppet/provider/neutron_agent_vpp/ini_setting.rb [new file with mode: 0644]
build/puppet-neutron/lib/puppet/type/neutron_agent_vpp.rb [new file with mode: 0644]
build/puppet-neutron/manifests/agents/ml2/networking-vpp.pp
build/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp
build/rpm_specs/networking-vpp.spec [new file with mode: 0644]
build/variables.sh

index b002ed6..d17b8b5 100644 (file)
@@ -197,11 +197,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 #
index 8ea5221..7af3f83 100755 (executable)
@@ -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" \
@@ -151,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 (file)
index 0000000..595904c
--- /dev/null
@@ -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 (file)
index 0000000..f43a8b4
--- /dev/null
@@ -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
index c25c281..6184e00 100644 (file)
 #   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
index 26548d3..cf8fe17 100644 (file)
 # 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 (file)
index 0000000..28d3482
--- /dev/null
@@ -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
index 0308580..ce9eb03 100644 (file)
@@ -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-1609.noarch.rpm'
+honeycomb_pkg='honeycomb-1.16.9-FINAL.noarch.rpm'
 
 
 ovs_rpm_name=openvswitch-2.5.90-1.el7.centos.x86_64.rpm