#!/usr/bin/env ruby #^syntax detection shell_provision_script = <<-EOF set -x apt-get -y update apt-get -y install dnsutils EOF REPO = File.dirname(__FILE__) node :vagrant do provider TestLab::Provider::Vagrant provisioners [ TestLab::Provisioner::Bind ] config ({ :vagrant => { :id => "mytestlab-#{ENV['USER']}".downcase, :ip => "192.168.255.1", :user => "vagrant", :port => 22, :cpus => 1, :memory => 512, :file => Dir.pwd }, :bind => { :domain => "default.zone" } }) network 'testnet' do provisioners [TestLab::Provisioner::Route] address '192.168.255.254/16' bridge :br0 end # DUAL NICs container "server-dual-nic" do distro "ubuntu" release "precise" provisioners [ TestLab::Provisioner::Resolv, TestLab::Provisioner::AptCacherNG, TestLab::Provisioner::Apt ] interface do name :eth0 network_id 'testnet' address '192.168.0.254/16' primary true end interface do name :eth1 network_id 'testnet' address '192.168.0.253/16' end end # SINGLE NIC container "server-single-nic" do distro "ubuntu" release "precise" provisioners [ TestLab::Provisioner::Resolv, TestLab::Provisioner::AptCacherNG, TestLab::Provisioner::Apt ] interface do name :eth0 network_id 'testnet' address '192.168.0.200/16' end end # SHELL PROVISIONER container "server-shell" do distro "ubuntu" release "precise" provisioners [ TestLab::Provisioner::Resolv, TestLab::Provisioner::AptCacherNG, TestLab::Provisioner::Apt, TestLab::Provisioner::Shell ] config ({ :shell => "/bin/bash", :script => shell_provision_script }) interface do name :eth0 network_id 'testnet' address '192.168.0.200/16' end end end