summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBilly O'Mahony <billy.o.mahony@intel.com>2016-01-19 12:05:46 +0000
committerMaryam Tahhan <maryam.tahhan@intel.com>2016-01-25 09:54:51 +0000
commit44bc6ec61edaca48d5c6a9d8a894c6afa6919ed8 (patch)
tree4ef7c71e77a957c3f2e3925a624b037b79578bda
parentc9413319f67ef305bf19d57ebcf45530215d2ac7 (diff)
fuel-plugin: Initial version targeting Fuel8
Change-Id: I21b24527da480c713899bffdaec8381752354e53 Signed-off-by: Billy O'Mahony <billy.o.mahony@intel.com> (cherry picked from commit 2a3ff071bd08ff02610286a5ad4ba46690b6bc6b)
-rw-r--r--fuel-plugin-vsperf/LICENSE13
-rw-r--r--fuel-plugin-vsperf/README.md4
-rwxr-xr-xfuel-plugin-vsperf/deployment_scripts/deploy.sh4
-rw-r--r--fuel-plugin-vsperf/deployment_scripts/puppet/manifests/vsperf-install.pp11
-rw-r--r--fuel-plugin-vsperf/deployment_tasks.yaml23
-rw-r--r--fuel-plugin-vsperf/environment_config.yaml7
-rw-r--r--fuel-plugin-vsperf/metadata.yaml30
-rw-r--r--fuel-plugin-vsperf/node_roles.yaml8
-rwxr-xr-xfuel-plugin-vsperf/pre_build_hook36
-rw-r--r--fuel-plugin-vsperf/repositories/centos/.gitkeep0
-rw-r--r--fuel-plugin-vsperf/repositories/ubuntu/.gitkeep0
11 files changed, 136 insertions, 0 deletions
diff --git a/fuel-plugin-vsperf/LICENSE b/fuel-plugin-vsperf/LICENSE
new file mode 100644
index 00000000..da963557
--- /dev/null
+++ b/fuel-plugin-vsperf/LICENSE
@@ -0,0 +1,13 @@
+Copyright 2015-2016 Intel Corporation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/fuel-plugin-vsperf/README.md b/fuel-plugin-vsperf/README.md
new file mode 100644
index 00000000..a7dca2c1
--- /dev/null
+++ b/fuel-plugin-vsperf/README.md
@@ -0,0 +1,4 @@
+fuel-plugin-vsperf
+==================
+
+Install VSPERF tool as part of OVSNFV deployment.
diff --git a/fuel-plugin-vsperf/deployment_scripts/deploy.sh b/fuel-plugin-vsperf/deployment_scripts/deploy.sh
new file mode 100755
index 00000000..6c82e46d
--- /dev/null
+++ b/fuel-plugin-vsperf/deployment_scripts/deploy.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+# It's a script which deploys your plugin
+
diff --git a/fuel-plugin-vsperf/deployment_scripts/puppet/manifests/vsperf-install.pp b/fuel-plugin-vsperf/deployment_scripts/puppet/manifests/vsperf-install.pp
new file mode 100644
index 00000000..bd38dbb7
--- /dev/null
+++ b/fuel-plugin-vsperf/deployment_scripts/puppet/manifests/vsperf-install.pp
@@ -0,0 +1,11 @@
+$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",
+}
diff --git a/fuel-plugin-vsperf/deployment_tasks.yaml b/fuel-plugin-vsperf/deployment_tasks.yaml
new file mode 100644
index 00000000..6ce01267
--- /dev/null
+++ b/fuel-plugin-vsperf/deployment_tasks.yaml
@@ -0,0 +1,23 @@
+# These tasks will be merged into deployment graph. Here you
+# can specify new tasks for any roles, even built-in ones.
+
+- id: vsperf
+ type: group
+ role: [vsperf]
+ requires: [deploy_start]
+ required_for: [deploy_end]
+ tasks: [fuel_pkgs, hiera, globals, tools, logging, netconfig,
+ hosts, firewall, deploy_start, vsperf_install]
+ parameters:
+ strategy:
+ type: parallel
+
+- id: vsperf_install
+ type: puppet
+ groups: [vsperf]
+ requires: [deploy_start]
+ required_for: [deploy_end]
+ parameters:
+ puppet_manifest: puppet/manifests/vsperf-install.pp
+ puppet_modules: puppet/modules:/etc/puppet/modules
+ timeout: 3600
diff --git a/fuel-plugin-vsperf/environment_config.yaml b/fuel-plugin-vsperf/environment_config.yaml
new file mode 100644
index 00000000..1dd28b54
--- /dev/null
+++ b/fuel-plugin-vsperf/environment_config.yaml
@@ -0,0 +1,7 @@
+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
new file mode 100644
index 00000000..998a2593
--- /dev/null
+++ b/fuel-plugin-vsperf/metadata.yaml
@@ -0,0 +1,30 @@
+# Plugin name
+name: fuel-plugin-vsperf
+# Human-readable name for your plugin
+title: Enable VSPERF plugin
+# Plugin version
+version: '1.0.0'
+# Description
+description: Deploy VSPERF code
+# Required fuel version
+fuel_version: ['8.0']
+# Specify license of your plugin
+licenses: ['Apache License Version 2.0']
+# Specify author or company name
+authors: ['billy.o.mahony@intel.com']
+# A link to the plugin's page
+homepage: 'https://github.com/stackforge/fuel-plugins'
+# Specify a group which your plugin implements, possible options:
+# network, storage, storage::cinder, storage::glance, hypervisor
+groups: ['network']
+
+# The plugin is compatible with releases in the list
+releases:
+ - os: ubuntu
+ version: liberty-8.0
+ mode: ['ha']
+ deployment_scripts_path: deployment_scripts/
+ repository_path: repositories/ubuntu
+
+# Version of plugin package
+package_version: '3.0.0'
diff --git a/fuel-plugin-vsperf/node_roles.yaml b/fuel-plugin-vsperf/node_roles.yaml
new file mode 100644
index 00000000..88b258a2
--- /dev/null
+++ b/fuel-plugin-vsperf/node_roles.yaml
@@ -0,0 +1,8 @@
+vsperf:
+ name: "VSPERF node"
+ 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
+ weight: 50 # weight that will be used for ordering on fuel ui
+ limits:
+ min: 0
diff --git a/fuel-plugin-vsperf/pre_build_hook b/fuel-plugin-vsperf/pre_build_hook
new file mode 100755
index 00000000..12517bcc
--- /dev/null
+++ b/fuel-plugin-vsperf/pre_build_hook
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# Add here any the actions which are required before plugin build
+# like packages building, packages downloading from mirrors and so on.
+# The script should return 0 if there were no errors.
+#!/bin/bash
+
+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
+ ;;
+ *) echo "Not supported system"; exit 1;;
+ esac
+}
+
+for system in $BUILD_FOR
+do
+ build_pkg $system
+done
+
+
diff --git a/fuel-plugin-vsperf/repositories/centos/.gitkeep b/fuel-plugin-vsperf/repositories/centos/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/fuel-plugin-vsperf/repositories/centos/.gitkeep
diff --git a/fuel-plugin-vsperf/repositories/ubuntu/.gitkeep b/fuel-plugin-vsperf/repositories/ubuntu/.gitkeep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/fuel-plugin-vsperf/repositories/ubuntu/.gitkeep