summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2016-04-21 16:45:32 +0800
committerGuo Ruijing <ruijing.guo@intel.com>2016-04-21 16:49:50 +0800
commit1a9bf6cd02e7a468cd24ad4cb91eb3d670073aad (patch)
tree0a5e71d1bf5c75dc918ac4a5e63e942a9eef56a4
parentbed772adcab711c545534c8c37e03acce3b3dde6 (diff)
support vagrant based build
Change-Id: Iaf1e6c101a7a8472baa2710ac95837051b4c03d0 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Notes
Notes (review): Code-Review+2: Ruijing <ruijing.guo@intel.com> Workflow+1: Ruijing <ruijing.guo@intel.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 21 Apr 2016 08:54:21 +0000 Reviewed-on: https://review.openstack.org/308842 Project: openstack/fuel-plugin-ovs Branch: refs/heads/master
-rwxr-xr-xpre_build_hook6
-rw-r--r--vagrant/Vagrantfile21
-rwxr-xr-xvagrant/build_fuel_plugin.sh12
3 files changed, 36 insertions, 3 deletions
diff --git a/pre_build_hook b/pre_build_hook
index cdfc09c..fc5f1b1 100755
--- a/pre_build_hook
+++ b/pre_build_hook
@@ -22,9 +22,9 @@ function build_pkg {
22 popd 22 popd
23 cd ${DIR}/ovs_build 23 cd ${DIR}/ovs_build
24 sudo docker build -t ovs_build . 24 sudo docker build -t ovs_build .
25 sudo docker run -v ${DIR}/repositories/ubuntu/ovs-nsh:/build -ti ovs_build /ovs_build/build-ovs-nsh.sh 25 sudo docker run -v ${DIR}/repositories/ubuntu/ovs-nsh:/build -t ovs_build /ovs_build/build-ovs-nsh.sh
26 sudo docker run -v ${DIR}/repositories/ubuntu/ovs-dpdk:/build -ti ovs_build /ovs_build/build-ovs-dpdk.sh 26 sudo docker run -v ${DIR}/repositories/ubuntu/ovs-dpdk:/build -t ovs_build /ovs_build/build-ovs-dpdk.sh
27 sudo docker run -v ${DIR}/repositories/ubuntu/ovs-nsh-dpdk:/build -ti ovs_build /ovs_build/build-ovs-nsh-dpdk.sh 27 sudo docker run -v ${DIR}/repositories/ubuntu/ovs-nsh-dpdk:/build -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh
28 ;; 28 ;;
29 *) echo "Not supported system"; exit 1;; 29 *) echo "Not supported system"; exit 1;;
30 esac 30 esac
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile
new file mode 100644
index 0000000..bd4ed6b
--- /dev/null
+++ b/vagrant/Vagrantfile
@@ -0,0 +1,21 @@
1# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
4# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5VAGRANTFILE_API_VERSION = "2"
6
7Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8
9 config.vm.box = "trusty-server-cloudimg-amd64"
10 config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
11
12 config.vm.define "fuel" do | h |
13 h.vm.host_name = "fuel"
14 h.vm.provision :shell, :inline => "/vagrant/build_fuel_plugin.sh"
15 h.vm.synced_folder "..", "/fuel-plugin"
16 h.vm.provider :virtualbox do |v|
17 v.customize ["modifyvm", :id, "--memory", 4096]
18 v.customize ["modifyvm", :id, "--cpus", 4]
19 end
20 end
21end
diff --git a/vagrant/build_fuel_plugin.sh b/vagrant/build_fuel_plugin.sh
new file mode 100755
index 0000000..d5ca675
--- /dev/null
+++ b/vagrant/build_fuel_plugin.sh
@@ -0,0 +1,12 @@
1#!/bin/bash
2sudo apt-get update -y
3sudo apt-get install createrepo rpm dpkg-dev -y
4sudo apt-get install python-setuptools -y
5sudo apt-get install python-pip -y
6sudo easy_install pip
7sudo pip install fuel-plugin-builder
8sudo apt-get install ruby -y
9sudo gem install rubygems-update
10sudo gem install fpm
11sudo apt-get install docker.io -y
12cd /fuel-plugin; fpb --debug --build .