summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--core/vswitch_controller_op2p.py18
-rw-r--r--fuel-plugin-vsperf/deployment_scripts/puppet/manifests/vsperf-install.pp10
-rw-r--r--fuel-plugin-vsperf/deployment_tasks.yaml20
-rw-r--r--fuel-plugin-vsperf/environment_config.yaml7
-rw-r--r--fuel-plugin-vsperf/metadata.yaml10
-rw-r--r--fuel-plugin-vsperf/node_roles.yaml2
-rwxr-xr-xfuel-plugin-vsperf/pre_build_hook14
-rw-r--r--fuel-plugin-vsperf/tasks.yaml8
-rw-r--r--fuel-plugin-vsperf/vagrant/Vagrantfile21
-rwxr-xr-xfuel-plugin-vsperf/vagrant/build_fuel_plugin.sh11
-rw-r--r--vnfs/qemu/qemu.py18
-rw-r--r--vswitches/ovs_vanilla.py8
13 files changed, 95 insertions, 53 deletions
diff --git a/.gitignore b/.gitignore
index 1a23762c..9d803438 100644
--- a/.gitignore
+++ b/.gitignore
@@ -66,3 +66,4 @@ target/
/src/qemu/qemu/
/src_cuse/
/src_vanilla/
+.vagrant
diff --git a/core/vswitch_controller_op2p.py b/core/vswitch_controller_op2p.py
index 77797b8f..ee8ada8b 100644
--- a/core/vswitch_controller_op2p.py
+++ b/core/vswitch_controller_op2p.py
@@ -77,11 +77,13 @@ class VswitchControllerOP2P(IVswitchController):
vtep_ip2 = settings.getValue('VTEP_IP2')
self._vswitch.add_switch(bridge)
- tasks.run_task(['sudo', 'ifconfig', bridge,
- settings.getValue('VTEP_IP1')],
+ tasks.run_task(['sudo', 'ip', 'addr', 'add',
+ settings.getValue('VTEP_IP1'), 'dev', bridge],
self._logger, 'Assign ' +
settings.getValue('VTEP_IP1') + ' to ' + bridge,
False)
+ tasks.run_task(['sudo', 'ip', 'link', 'set', 'dev', bridge, 'up'],
+ self._logger, 'Bring up ' + bridge, False)
tunnel_type = self._traffic['tunnel_type']
@@ -137,10 +139,12 @@ class VswitchControllerOP2P(IVswitchController):
tgen_ip1 = settings.getValue('TRAFFICGEN_PORT1_IP')
self._vswitch.add_switch(bridge)
- tasks.run_task(['sudo', 'ifconfig', bridge,
- settings.getValue('VTEP_IP1')],
+ tasks.run_task(['sudo', 'ip', 'addr', 'add',
+ settings.getValue('VTEP_IP1'), 'dev', bridge],
self._logger, 'Assign ' +
settings.getValue('VTEP_IP1') + ' to ' + bridge, False)
+ tasks.run_task(['sudo', 'ip', 'link', 'set', 'dev', bridge, 'up'],
+ self._logger, 'Bring up ' + bridge, False)
tunnel_type = self._traffic['tunnel_type']
@@ -195,10 +199,12 @@ class VswitchControllerOP2P(IVswitchController):
tgen_ip1 = settings.getValue('TRAFFICGEN_PORT1_IP')
self._vswitch.add_switch(bridge)
- tasks.run_task(['sudo', 'ifconfig', bridge,
- settings.getValue('TUNNEL_INT_BRIDGE_IP')],
+ tasks.run_task(['sudo', 'ip', 'addr', 'add',
+ settings.getValue('TUNNEL_INT_BRIDGE_IP'), 'dev', bridge],
self._logger, 'Assign ' +
settings.getValue('TUNNEL_INT_BRIDGE_IP') + ' to ' + bridge, False)
+ tasks.run_task(['sudo', 'ip', 'link', 'set', 'dev', bridge, 'up'],
+ self._logger, 'Bring up ' + bridge, False)
tunnel_type = self._traffic['tunnel_type']
diff --git a/fuel-plugin-vsperf/deployment_scripts/puppet/manifests/vsperf-install.pp b/fuel-plugin-vsperf/deployment_scripts/puppet/manifests/vsperf-install.pp
index bd38dbb7..7d075add 100644
--- a/fuel-plugin-vsperf/deployment_scripts/puppet/manifests/vsperf-install.pp
+++ b/fuel-plugin-vsperf/deployment_scripts/puppet/manifests/vsperf-install.pp
@@ -1,11 +1,7 @@
$fuel_settings = parseyaml(file('/etc/astute.yaml'))
$master_ip = $::fuel_settings['master_ip']
-exec { "wget vsperf":
- command => "wget http://$master_ip:8080/plugins/fuel-plugin-vsperf-1.0/repositories/ubuntu/vswitchperf.tgz -O /opt/vswitchperf.tgz",
- path => "/usr/bin:/usr/sbin:/bin:/sbin",
-}
-exec { "untar vsperf":
- command => "tar xf /opt/vswitchperf.tgz -C /opt",
- path => "/usr/bin:/usr/sbin:/bin:/sbin",
+exec { "install vsperf":
+ command => "mkdir -p /opt/vswitchperf; curl http://$master_ip:8080/plugins/fuel-plugin-vsperf-1.0/repositories/ubuntu/vswitchperf.tgz | tar xzv -C /opt/vswitchperf",
+ path => "/usr/bin:/usr/sbin:/bin:/sbin";
}
diff --git a/fuel-plugin-vsperf/deployment_tasks.yaml b/fuel-plugin-vsperf/deployment_tasks.yaml
index fe51488c..02a7c56b 100644
--- a/fuel-plugin-vsperf/deployment_tasks.yaml
+++ b/fuel-plugin-vsperf/deployment_tasks.yaml
@@ -1 +1,19 @@
-[]
+- id: vsperf
+ type: group
+ role: [vsperf]
+ requires: [deploy_start]
+ required_for: [deploy_end]
+ tasks: [hiera, setup_repositories, fuel_pkgs, globals, tools, logging, vsperf_install]
+ parameters:
+ strategy:
+ type: parallel
+- id: vsperf_install
+ type: puppet
+ version: 2.0.0
+ groups: [vsperf]
+ required_for: [post_deployment_end]
+ requires: [post_deployment_start]
+ parameters:
+ puppet_manifest: puppet/manifests/vsperf-install.pp
+ puppet_modules: puppet/modules:/etc/puppet/modules
+ timeout: 720
diff --git a/fuel-plugin-vsperf/environment_config.yaml b/fuel-plugin-vsperf/environment_config.yaml
index 1dd28b54..e69de29b 100644
--- a/fuel-plugin-vsperf/environment_config.yaml
+++ b/fuel-plugin-vsperf/environment_config.yaml
@@ -1,7 +0,0 @@
-attributes:
- fuel-plugin-vsperf_text:
- value: 'Set default value'
- label: 'Text field'
- description: 'Description for text field'
- weight: 25
- type: "text"
diff --git a/fuel-plugin-vsperf/metadata.yaml b/fuel-plugin-vsperf/metadata.yaml
index 998a2593..2b28fc58 100644
--- a/fuel-plugin-vsperf/metadata.yaml
+++ b/fuel-plugin-vsperf/metadata.yaml
@@ -3,11 +3,11 @@ name: fuel-plugin-vsperf
# Human-readable name for your plugin
title: Enable VSPERF plugin
# Plugin version
-version: '1.0.0'
+version: '1.0.9'
# Description
description: Deploy VSPERF code
# Required fuel version
-fuel_version: ['8.0']
+fuel_version: ['9.0']
# Specify license of your plugin
licenses: ['Apache License Version 2.0']
# Specify author or company name
@@ -21,10 +21,12 @@ groups: ['network']
# The plugin is compatible with releases in the list
releases:
- os: ubuntu
- version: liberty-8.0
+ version: mitaka-9.0
mode: ['ha']
deployment_scripts_path: deployment_scripts/
repository_path: repositories/ubuntu
# Version of plugin package
-package_version: '3.0.0'
+package_version: '4.0.0'
+
+is_hotpluggable: true
diff --git a/fuel-plugin-vsperf/node_roles.yaml b/fuel-plugin-vsperf/node_roles.yaml
index 88b258a2..0f4f8350 100644
--- a/fuel-plugin-vsperf/node_roles.yaml
+++ b/fuel-plugin-vsperf/node_roles.yaml
@@ -1,5 +1,5 @@
vsperf:
- name: "VSPERF node"
+ name: "VSPERF"
description: "Install VSPERF on nodes with this role"
has_primary: false # whether has primary role or not
public_ip_required: false # whether requires public net or not
diff --git a/fuel-plugin-vsperf/pre_build_hook b/fuel-plugin-vsperf/pre_build_hook
index 12517bcc..b4da204f 100755
--- a/fuel-plugin-vsperf/pre_build_hook
+++ b/fuel-plugin-vsperf/pre_build_hook
@@ -7,22 +7,14 @@
set -eux
-VSPERF_REV=${VSPERF_REV:-stable/brahmaputra}
BUILD_FOR=${BUILD_FOR:-ubuntu}
DIR="$(dirname `readlink -f $0`)"
-INCLUDE_DEPENDENCIES=${INCLUDE_DEPENDENCIES:-true}
-
function build_pkg {
case $1 in
ubuntu)
- cd ${DIR}
- rm -rf vswitchperf
- git clone https://gerrit.opnfv.org/gerrit/vswitchperf
- cd vswitchperf && git checkout ${VSPERF_REV} && cd ..
- rm -rf vswitchperf/.git
- tar cfvz ${DIR}/repositories/ubuntu/vswitchperf.tgz vswitchperf
- rm -rf vswitchperf
+ cd ${DIR}/..
+ tar cfvz ${DIR}/repositories/ubuntu/vswitchperf.tgz . --exclude=vswitchperf.tgz
;;
*) echo "Not supported system"; exit 1;;
esac
@@ -32,5 +24,3 @@ for system in $BUILD_FOR
do
build_pkg $system
done
-
-
diff --git a/fuel-plugin-vsperf/tasks.yaml b/fuel-plugin-vsperf/tasks.yaml
index 0cc003ef..fe51488c 100644
--- a/fuel-plugin-vsperf/tasks.yaml
+++ b/fuel-plugin-vsperf/tasks.yaml
@@ -1,7 +1 @@
-- role: ['compute']
- stage: post_deployment/8998
- type: puppet
- parameters:
- puppet_manifest: puppet/manifests/vsperf-install.pp
- puppet_modules: puppet/modules:/etc/puppet/modules
- timeout: 720
+[]
diff --git a/fuel-plugin-vsperf/vagrant/Vagrantfile b/fuel-plugin-vsperf/vagrant/Vagrantfile
new file mode 100644
index 00000000..d83ac4cc
--- /dev/null
+++ b/fuel-plugin-vsperf/vagrant/Vagrantfile
@@ -0,0 +1,21 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+
+ config.vm.box = "trusty-server-cloudimg-amd64"
+ config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
+
+ config.vm.define "fuel" do | h |
+ h.vm.host_name = "fuel"
+ h.vm.provision :shell, :inline => "/vagrant/build_fuel_plugin.sh"
+ h.vm.synced_folder "../..", "/vswitchperf"
+ h.vm.provider :virtualbox do |v|
+ v.customize ["modifyvm", :id, "--memory", 4096]
+ v.customize ["modifyvm", :id, "--cpus", 4]
+ end
+ end
+end
diff --git a/fuel-plugin-vsperf/vagrant/build_fuel_plugin.sh b/fuel-plugin-vsperf/vagrant/build_fuel_plugin.sh
new file mode 100755
index 00000000..77b6a33d
--- /dev/null
+++ b/fuel-plugin-vsperf/vagrant/build_fuel_plugin.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+sudo apt-get update -y
+sudo apt-get install createrepo rpm dpkg-dev -y
+sudo apt-get install python-setuptools -y
+sudo apt-get install python-pip -y
+sudo easy_install pip
+sudo pip install fuel-plugin-builder
+sudo apt-get install ruby -y
+sudo gem install rubygems-update
+sudo gem install fpm
+fpb --debug --build /vswitchperf/fuel-plugin-vsperf
diff --git a/vnfs/qemu/qemu.py b/vnfs/qemu/qemu.py
index 87f77583..2de8df2a 100644
--- a/vnfs/qemu/qemu.py
+++ b/vnfs/qemu/qemu.py
@@ -384,17 +384,23 @@ class IVnfQemu(IVnf):
"""
self._configure_disable_firewall()
- self.execute('ifconfig ' + self._net1 + ' ' +
- S.getValue('VANILLA_NIC1_IP_CIDR')[self._number])
+ self.execute('ip addr add ' +
+ S.getValue('VANILLA_NIC1_IP_CIDR')[self._number] +
+ ' dev ' + self._net1)
+ self.execute('ip link set dev ' + self._net1 + ' up')
- self.execute('ifconfig ' + self._net2 + ' ' +
- S.getValue('VANILLA_NIC2_IP_CIDR')[self._number])
+ self.execute('ip addr add ' +
+ S.getValue('VANILLA_NIC2_IP_CIDR')[self._number] +
+ ' dev ' + self._net2)
+ self.execute('ip link set dev ' + self._net2 + ' up')
# configure linux bridge
self.execute('brctl addbr br0')
self.execute('brctl addif br0 ' + self._net1 + ' ' + self._net2)
- self.execute('ifconfig br0 ' +
- S.getValue('VANILLA_BRIDGE_IP')[self._number])
+ self.execute('ip addr add ' +
+ S.getValue('VANILLA_BRIDGE_IP')[self._number] +
+ ' dev br0')
+ self.execute('ip link set dev br0 up')
# Add the arp entries for the IXIA ports and the bridge you are using.
# Use command line values if provided.
diff --git a/vswitches/ovs_vanilla.py b/vswitches/ovs_vanilla.py
index a6b720ae..89023a79 100644
--- a/vswitches/ovs_vanilla.py
+++ b/vswitches/ovs_vanilla.py
@@ -94,8 +94,10 @@ class OvsVanilla(IVSwitchOvs):
params = []
# For PVP only
- tasks.run_task(['sudo', 'ifconfig', port_name, '0'],
+ tasks.run_task(['sudo', 'ip', 'addr', 'flush', 'dev', port_name],
self._logger, 'Remove IP', False)
+ tasks.run_task(['sudo', 'ip', 'link', 'set', 'dev', port_name, 'up'],
+ self._logger, 'Bring up ' + port_name, False)
of_port = bridge.add_port(port_name, params)
self._current_id += 1
@@ -119,7 +121,9 @@ class OvsVanilla(IVSwitchOvs):
tap_name, 'mode', 'tap'],
self._logger, 'Creating tap device...', False)
- tasks.run_task(['sudo', 'ifconfig', tap_name, '0'],
+ tasks.run_task(['sudo', 'ip', 'addr', 'flush', 'dev', tap_name],
+ self._logger, 'Remove IP', False)
+ tasks.run_task(['sudo', 'ip', 'link', 'set', 'dev', tap_name, 'up'],
self._logger, 'Bring up ' + tap_name, False)
bridge = self._bridges[switch_name]