Browse Source

support vagrant based build

Change-Id: Iaf1e6c101a7a8472baa2710ac95837051b4c03d0
Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Guo Ruijing 3 years ago
parent
commit
1a9bf6cd02
3 changed files with 36 additions and 3 deletions
  1. 3
    3
      pre_build_hook
  2. 21
    0
      vagrant/Vagrantfile
  3. 12
    0
      vagrant/build_fuel_plugin.sh

+ 3
- 3
pre_build_hook View File

@@ -22,9 +22,9 @@ function build_pkg {
22 22
       popd
23 23
       cd ${DIR}/ovs_build
24 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
26
-      sudo docker run -v ${DIR}/repositories/ubuntu/ovs-dpdk:/build -ti  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
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 -t  ovs_build /ovs_build/build-ovs-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 29
     *) echo "Not supported system"; exit 1;;
30 30
   esac

+ 21
- 0
vagrant/Vagrantfile View File

@@ -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!
5
+VAGRANTFILE_API_VERSION = "2"
6
+
7
+Vagrant.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
21
+end

+ 12
- 0
vagrant/build_fuel_plugin.sh View File

@@ -0,0 +1,12 @@
1
+#!/bin/bash
2
+sudo apt-get update -y
3
+sudo apt-get install createrepo rpm dpkg-dev -y
4
+sudo apt-get install python-setuptools -y
5
+sudo apt-get install python-pip -y
6
+sudo easy_install pip
7
+sudo pip install fuel-plugin-builder
8
+sudo apt-get install ruby -y
9
+sudo gem install rubygems-update
10
+sudo gem install fpm
11
+sudo apt-get install docker.io -y
12
+cd /fuel-plugin; fpb --debug --build .

Loading…
Cancel
Save