#!/usr/bin/env ruby #^syntax detection shell_provision_script = <<-EOF set -x apt-get -y update apt-get -y install dnsutils EOF config Hash[ :domain => "default.zone" ] node :localhost do components %w(resolv bind) route true 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 }, :repo => File.dirname(__FILE__) ] network :testnet do address '192.168.255.254/16' bridge :br0 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" provisioner TestLab::Provisioner::Shell config Hash[ :shell => "/bin/bash", :setup => shell_provision_script ] interface do name :eth0 network_id :testnet address '192.168.0.200/16' end end end