fuel-plugin: Initial version targeting Fuel8 63/7863/1
authorBilly O'Mahony <billy.o.mahony@intel.com>
Tue, 19 Jan 2016 12:05:46 +0000 (12:05 +0000)
committerMaryam Tahhan <maryam.tahhan@intel.com>
Mon, 25 Jan 2016 09:54:51 +0000 (09:54 +0000)
Change-Id: I21b24527da480c713899bffdaec8381752354e53
Signed-off-by: Billy O'Mahony <billy.o.mahony@intel.com>
(cherry picked from commit 2a3ff071bd08ff02610286a5ad4ba46690b6bc6b)

fuel-plugin-vsperf/LICENSE [new file with mode: 0644]
fuel-plugin-vsperf/README.md [new file with mode: 0644]
fuel-plugin-vsperf/deployment_scripts/deploy.sh [new file with mode: 0755]
fuel-plugin-vsperf/deployment_scripts/puppet/manifests/vsperf-install.pp [new file with mode: 0644]
fuel-plugin-vsperf/deployment_tasks.yaml [new file with mode: 0644]
fuel-plugin-vsperf/environment_config.yaml [new file with mode: 0644]
fuel-plugin-vsperf/metadata.yaml [new file with mode: 0644]
fuel-plugin-vsperf/node_roles.yaml [new file with mode: 0644]
fuel-plugin-vsperf/pre_build_hook [new file with mode: 0755]
fuel-plugin-vsperf/repositories/centos/.gitkeep [new file with mode: 0644]
fuel-plugin-vsperf/repositories/ubuntu/.gitkeep [new file with mode: 0644]

diff --git a/fuel-plugin-vsperf/LICENSE b/fuel-plugin-vsperf/LICENSE
new file mode 100644 (file)
index 0000000..da96355
--- /dev/null
@@ -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 (file)
index 0000000..a7dca2c
--- /dev/null
@@ -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 (executable)
index 0000000..6c82e46
--- /dev/null
@@ -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 (file)
index 0000000..bd38dbb
--- /dev/null
@@ -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 (file)
index 0000000..6ce0126
--- /dev/null
@@ -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 (file)
index 0000000..1dd28b5
--- /dev/null
@@ -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 (file)
index 0000000..998a259
--- /dev/null
@@ -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 (file)
index 0000000..88b258a
--- /dev/null
@@ -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 (executable)
index 0000000..12517bc
--- /dev/null
@@ -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 (file)
index 0000000..e69de29
diff --git a/fuel-plugin-vsperf/repositories/ubuntu/.gitkeep b/fuel-plugin-vsperf/repositories/ubuntu/.gitkeep
new file mode 100644 (file)
index 0000000..e69de29