| 1 |
# -*- mode: ruby -*- |
| 2 |
# vi: set ft=ruby : |
| 3 |
|
| 4 |
# Build your own debian base box : |
| 5 |
# |
| 6 |
# 1) Install kameleon |
| 7 |
# $ gem install kameleon-builder |
| 8 |
# |
| 9 |
# 2) Build a new vagrant box |
| 10 |
# a) For virtualbox users : |
| 11 |
# $ cd misc/kameleon/kameleon2 |
| 12 |
# $ sudo kameleon build debian_oar_vagrant |
| 13 |
# $ vagrant box add 'oar-team/debian-oar-2.5' builds/debian_oar_vagrant/debian_oar_vagrant.box |
| 14 |
# $ sudo rm -rf builds |
| 15 |
# |
| 16 |
# 3) Up ! |
| 17 |
# $ vagrant up |
| 18 |
|
| 19 |
Vagrant.configure("2") do |config| |
| 20 |
config.vm.box = "oar-team/debian-oar-2.5" |
| 21 |
config.vm.hostname = "oar-devel" |
| 22 |
|
| 23 |
# share src folder with all nodes |
| 24 |
config.vm.synced_folder ".", "/vagrant", disabled: true |
| 25 |
config.vm.synced_folder ".", "/home/vagrant/oar", type: "rsync" |
| 26 |
|
| 27 |
# enable ssh forward agent for all VMs |
| 28 |
config.ssh.forward_agent = true |
| 29 |
config.vm.network "forwarded_port", guest: 80, host: 8080 |
| 30 |
|
| 31 |
# Config provider |
| 32 |
config.vm.provider :virtualbox do |vm| |
| 33 |
vm.memory = 1024 |
| 34 |
vm.cpus = 1 |
| 35 |
end |
| 36 |
|
| 37 |
# proxy cache with polipo |
| 38 |
if Vagrant.has_plugin?("vagrant-proxyconf") |
| 39 |
config.proxy.http = "http://10.10.10.1:8123/" |
| 40 |
config.proxy.https = "http://10.10.10.1:8123/" |
| 41 |
config.proxy.ftp = "http://10.10.10.1:8123/" |
| 42 |
config.proxy.no_proxy = "localhost,127.0.0.1" |
| 43 |
config.apt_proxy.http = "http://10.10.10.1:8123/" |
| 44 |
config.apt_proxy.https = "http://10.10.10.1:8123/" |
| 45 |
config.apt_proxy.ftp = "http://10.10.10.1:8123/" |
| 46 |
end |
| 47 |
end |