From 0538c4b1c4691a64ef06242eb814602609ddf47e Mon Sep 17 00:00:00 2001 From: Matias Hermanrud Fjeld Date: Thu, 17 Dec 2015 14:31:40 +0100 Subject: [PATCH] Added Vagrantfile to automate setup of build environment --- .gitignore | 4 +++- README.md | 16 +++++++++++++++- Vagrantfile | 25 +++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 Vagrantfile diff --git a/.gitignore b/.gitignore index 1641fe59f5..208ce3c88e 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,6 @@ vmbuild/vmbuild *.gz -.DS_Store \ No newline at end of file +.DS_Store + +/.vagrant diff --git a/README.md b/README.md index 78c37e7a39..f82be19263 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,21 @@ Here is a video showing how to set it up and get started with IncludeOS: [![Getting started with IncludeOS video](http://img.youtube.com/vi/b2D6loApw3o/0.jpg)](http://www.youtube.com/watch?v=b2D6loApw3o) +## Building with Vagrant + +You can use +[Vagrant](https://github.com/hioa-cs/IncludeOS/wiki/Vagrant) to set up +a virtual machine with the correct environment for building +IncludeOS. The following commands will build and install IncludeOS +into your home directory (`~/IncludeOS_install/`). + +``` + $ git clone https://github.com/hioa-cs/IncludeOS.git + $ cd IncludeOS + $ vagrant up + $ vagrant ssh --command=/IncludeOS/etc/install_from_bundle.sh +``` + ## Prerequisites for building IncludeOS VM's * **Ubuntu 14.04 LTS x86_64**, Vanilla, either on a physical or virtual machine (A virtualbox VM works fine) * For the full source build, you'll need at least 1024 MB memory @@ -57,7 +72,6 @@ Here is a video showing how to set it up and get started with IncludeOS: * **Building on a Mac:** we have done a successful build from bundle, directly on a Mac. It's a work in progress, but see [./etc/install_osx.sh](./etc/install_osx.sh) for details. * You'll need `git` to clone from github. - Once you have a system with the prereqs (virtual or not), you can choose a full build from source, or a fast build from binaries: ## A) Install libraries from binary bundle (fast) diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000000..d2a4b36b07 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,25 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +VAGRANTFILE_API_VERSION = "2" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vm.define "IncludeOS" do |config| + config.vm.box = "ubuntu/trusty64" + config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box" + config.vm.provider :virtualbox do |vb| + vb.name = "IncludeOS" + end + + config.vm.synced_folder ".", "/vagrant", disable: true + + config.vm.synced_folder ".", "/IncludeOS", create: true + config.vm.provision "shell", + inline: "echo cd /IncludeOS >> /home/vagrant/.bashrc" + + config.vm.synced_folder "~/IncludeOS_install", + "/home/vagrant/IncludeOS_install", create: true + + config.vm.provision "shell", inline: "apt-get update && apt-get install -qq git" + end +end