2013-02-25 23:14:10 +00:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
2013-03-29 16:31:57 +00:00
|
|
|
# Not really needed, but useful while developing so that vagrant picks it up
|
2013-03-03 02:34:48 +00:00
|
|
|
Vagrant.require_plugin 'vagrant-lxc'
|
2013-02-25 23:14:10 +00:00
|
|
|
|
2013-03-02 19:51:28 +00:00
|
|
|
Vagrant.configure("2") do |config|
|
2013-03-08 04:07:41 +00:00
|
|
|
config.vm.box = "quantal64"
|
2013-03-31 04:04:51 +00:00
|
|
|
config.vm.box_url = 'http://dl.dropbox.com/u/13510779/lxc-quantal64-2013-03-31.box'
|
2013-03-29 16:31:57 +00:00
|
|
|
# Uncomment if you want to try out a box built locally
|
|
|
|
# config.vm.box_url = '../boxes/output/lxc-quantal64.box'
|
|
|
|
config.vm.hostname = 'lxc-quantal64-example'
|
2013-03-05 03:58:37 +00:00
|
|
|
|
2013-03-04 01:42:18 +00:00
|
|
|
config.vm.synced_folder "/tmp", "/vagrant_data"
|
|
|
|
|
2013-03-09 23:24:26 +00:00
|
|
|
|
2013-03-02 19:51:28 +00:00
|
|
|
config.vm.provider :lxc do |lxc|
|
2013-04-06 01:08:02 +00:00
|
|
|
lxc.customize 'cgroup.memory.limit_in_bytes', '400M'
|
|
|
|
lxc.customize 'cgroup.memory.memsw.limit_in_bytes', '500M'
|
2013-03-02 19:51:28 +00:00
|
|
|
end
|
2013-03-04 04:14:38 +00:00
|
|
|
|
2013-03-08 04:07:41 +00:00
|
|
|
config.vm.provision :shell, :inline => <<-SCRIPT
|
|
|
|
echo "Hi there I'm a shell script used for provisioning"
|
|
|
|
SCRIPT
|
2013-03-04 04:14:38 +00: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 16:50:04 +00:00
|
|
|
|
|
|
|
config.vm.provision :chef_solo do |chef|
|
|
|
|
chef.add_recipe "hello-world"
|
|
|
|
chef.log_level = :debug
|
|
|
|
end
|
2013-02-25 23:14:10 +00:00
|
|
|
end
|