support vagrant based build

Change-Id: Ia716a7e40135e0eaffb413ef4579a754f7e505cd
Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
This commit is contained in:
Guo Ruijing 2016-04-22 10:26:44 +08:00
parent c35ce3377b
commit a253d1ea92
3 changed files with 35 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.build
.vagrant

21
vagrant/Vagrantfile vendored Normal file
View File

@ -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 "..", "/fuel-plugin"
h.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", 4096]
v.customize ["modifyvm", :id, "--cpus", 4]
end
end
end

12
vagrant/build_fuel_plugin.sh Executable file
View File

@ -0,0 +1,12 @@
#!/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
sudo apt-get install docker.io -y
cd /fuel-plugin; fpb --debug --build .