2013-02-25 20:14:10 -03:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
2013-03-29 13:31:57 -03:00
|
|
|
# Not really needed, but useful while developing so that vagrant picks it up
|
2013-03-02 23:34:48 -03:00
|
|
|
Vagrant.require_plugin 'vagrant-lxc'
|
2013-02-25 20:14:10 -03:00
|
|
|
|
2013-03-02 16:51:28 -03:00
|
|
|
Vagrant.configure("2") do |config|
|
2013-03-03 22:42:18 -03:00
|
|
|
config.vm.synced_folder "/tmp", "/vagrant_data"
|
|
|
|
|
2013-03-02 16:51:28 -03:00
|
|
|
config.vm.provider :lxc do |lxc|
|
2013-04-05 22:08:02 -03:00
|
|
|
lxc.customize 'cgroup.memory.limit_in_bytes', '400M'
|
|
|
|
lxc.customize 'cgroup.memory.memsw.limit_in_bytes', '500M'
|
2013-03-02 16:51:28 -03:00
|
|
|
end
|
2013-03-04 01:14:38 -03:00
|
|
|
|
2013-03-08 01:07:41 -03:00
|
|
|
config.vm.provision :shell, :inline => <<-SCRIPT
|
|
|
|
echo "Hi there I'm a shell script used for provisioning"
|
|
|
|
SCRIPT
|
2013-03-04 01:14:38 -03:00
|
|
|
|
|
|
|
config.vm.provision :puppet do |puppet|
|
|
|
|
puppet.module_path = "puppet/modules"
|
|
|
|
puppet.manifests_path = "puppet/manifests"
|
|
|
|
puppet.manifest_file = "site.pp"
|
|
|
|
end
|
2013-03-29 13:50:04 -03:00
|
|
|
|
|
|
|
config.vm.provision :chef_solo do |chef|
|
|
|
|
chef.add_recipe "hello-world"
|
|
|
|
chef.log_level = :debug
|
|
|
|
end
|
2013-04-21 23:58:54 -03:00
|
|
|
|
2013-04-22 01:42:24 -03:00
|
|
|
port = 8080
|
2013-06-27 10:39:14 -03:00
|
|
|
releases = %w(precise quantal raring wheezy squeeze sid)
|
2013-04-22 01:42:24 -03:00
|
|
|
releases.each do |release|
|
2013-04-21 23:58:54 -03:00
|
|
|
config.vm.define(release) do |lxc_config|
|
|
|
|
lxc_config.vm.box = "#{release}64"
|
2013-05-08 16:40:44 -03:00
|
|
|
lxc_config.vm.box_url = "http://dl.dropbox.com/u/13510779/lxc-#{release}-amd64-2013-05-08.box"
|
|
|
|
lxc_config.vm.network :forwarded_port, guest: 80, host: (port += 1)
|
2013-04-21 23:58:54 -03:00
|
|
|
# Uncomment if you want to try out a box built locally
|
|
|
|
# lxc_config.vm.box_url = "../boxes/output/lxc-#{release}64.box"
|
|
|
|
lxc_config.vm.hostname = "lxc-#{release}64-example"
|
2013-05-08 16:40:44 -03:00
|
|
|
end
|
|
|
|
end
|
2013-02-25 20:14:10 -03:00
|
|
|
end
|