#!/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__) config Hash[ :domain => "default.zone", :repo => REPO ] node :localhost do components %w(resolv bind) provider TestLab::Provider::Vagrant config Hash[ :vagrant => { :id => "mytestlab-#{ENV['USER']}".downcase, :ip => "192.168.255.1", :user => "vagrant", :port => 22, :cpus => 1, :memory => 512, :file => REPO } ] network 'testnet' do address '192.168.255.254/16' bridge :br0 route true end # DUAL NICs container "server-dual-nic" do distro "ubuntu" release "precise" 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" 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::Shell] config Hash[ :shell => "/bin/bash", :script => shell_provision_script ] interface do name :eth0 network_id 'testnet' address '192.168.0.200/16' end end end