# -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.require_plugin 'vagrant-lxc' Vagrant.require_plugin 'vagrant-cachier' Vagrant.require_plugin 'vagrant-pristine' Vagrant.require_plugin 'vagrant-global-status' Vagrant.require_plugin 'ventriloquist' Vagrant.configure("2") do |config| config.vm.box = "raring64" config.vm.synced_folder "../", "/vagrant", id: 'vagrant-root' config.vm.network :private_network, ip: "192.168.123.123" config.cache.auto_detect = true config.vm.provider :virtualbox do |_, override| override.vm.box_url = 'http://cloud-images.ubuntu.com/vagrant/raring/current/raring-server-cloudimg-amd64-vagrant-disk1.box' end config.vm.provider :lxc do |lxc, override| # Required to boot nested containers lxc.customize 'aa_profile', 'unconfined' override.vm.box_url = 'http://bit.ly/vagrant-lxc-raring64-2013-10-23' end # Required to boot nested containers # Disable default lxc bridge config.vm.provision :shell, inline: %[ cat < /etc/default/lxc LXC_AUTO="false" USE_LXC_BRIDGE="false" STR ] config.vm.provision :ventriloquist do |env| # Basic examples env.services << %w( redis memcached pg mailcatcher mysql rethinkdb ) env.platforms << %w( nodejs phantomjs go erlang elixir python:2.7.5 ) # Test custom ports and tagging env.services << { 'es' => { image: 'fgrehm/ventriloquist-elasticsearch', # Check if container will get the built in elasticsearch configs type: 'elasticsearch', }, 'pg-9.1' => { image: 'fgrehm/ventriloquist-pg', tag: '9.1' }, 'es-2' => { image: 'fgrehm/ventriloquist-elasticsearch', tag: '0.90.3', ports: [':9200'] } } # Test hash usage env.platforms << { ruby: { version: '2.0.0' } } # Test packages installation env.packages << %w( htop sqlite3 curl wget ) end # Remove docker dependency on lxc-net config.vm.provision :shell, inline: %[ if $(grep -q 'and started' /etc/init/docker.conf); then sed -i.bkp 's/and started.*//' /etc/init/docker.conf fi ] end