spec/support/Labfile in testlab-1.9.2 vs spec/support/Labfile in testlab-1.10.0
- old
+ new
@@ -9,10 +9,17 @@
apt-get -y install dnsutils
EOF
REPO = File.dirname(__FILE__)
+TestLab::Container.new "simple-template" do
+ distro "ubuntu"
+ release "precise"
+
+ template true
+end
+
node 'vagrant' do
provider TestLab::Provider::Vagrant
provisioners [TestLab::Provisioner::Bind]
config ({
@@ -30,78 +37,166 @@
}
})
network 'testnet' do
provisioners [TestLab::Provisioner::Route]
- address '192.168.255.254/16'
+ address '100.64.0.254/24'
bridge :br0
end
- # DUAL NICs
- container "server-dual-nic" do
+ container "master" do
distro "ubuntu"
release "precise"
+ aa_profile "unconfined"
+ cap_drop "thing"
+
provisioners [
TestLab::Provisioner::Resolv,
TestLab::Provisioner::AptCacherNG,
TestLab::Provisioner::Apt
]
+ user do
+ username "deployer"
+ password "deployer"
+ uid 2600
+ gid 2600
+ public_identity [File.join(Dir.pwd, 'test')]
+ identity [File.join(Dir.pwd, 'test.pub')]
+ end
+
interface do
name :eth0
network_id 'testnet'
- address '192.168.0.254/16'
+ address '100.64.0.10/24'
primary true
end
interface do
name :eth1
network_id 'testnet'
- address '192.168.0.253/16'
+ address '100.64.0.20/24'
end
end
- # SINGLE NIC
- container "server-single-nic" do
- distro "ubuntu"
- release "precise"
+ # SHELL PROVISIONER
+ container "server-shell" do
+ inherit "simple-template"
- provisioners [
- TestLab::Provisioner::Resolv,
- TestLab::Provisioner::AptCacherNG,
- TestLab::Provisioner::Apt
- ]
+ provisioners [TestLab::Provisioner::Shell]
+ config ({:script => "echo 'hello world!'"})
interface do
name :eth0
network_id 'testnet'
- address '192.168.0.200/16'
+ address '100.64.0.40/24'
end
end
- # SHELL PROVISIONER
- container "server-shell" do
- distro "ubuntu"
- release "precise"
+ # BIND PROVISIONER
+ container "server-bind" do
+ inherit "simple-template"
- provisioners [
- TestLab::Provisioner::Resolv,
- TestLab::Provisioner::AptCacherNG,
- TestLab::Provisioner::Apt,
- TestLab::Provisioner::Shell
- ]
+ provisioners [TestLab::Provisioner::Bind]
- config ({
- :shell => "/bin/bash",
- :script => shell_provision_script
- })
+ interface do
+ name :eth0
+ network_id 'testnet'
+ address '100.64.0.50/24'
+ end
+ end
+ # RESOLV PROVISIONER
+ container "server-resolv" do
+ inherit "simple-template"
+
+ provisioners [TestLab::Provisioner::Resolv]
+
interface do
name :eth0
network_id 'testnet'
- address '192.168.0.200/16'
+ address '100.64.0.60/24'
end
end
+ # RARING PROVISIONER
+ container "server-raring" do
+ inherit "simple-template"
+
+ provisioners [TestLab::Provisioner::Raring]
+
+ interface do
+ name :eth0
+ network_id 'testnet'
+ address '100.64.0.70/24'
+ end
+ end
+
+ # HOSTSFILE PROVISIONER
+ container "server-hostsfile" do
+ inherit "simple-template"
+
+ provisioners [TestLab::Provisioner::HostsFile]
+
+ interface do
+ name :eth0
+ network_id 'testnet'
+ address '100.64.0.80/24'
+ end
+ end
+
+ # APT PROVISIONER
+ container "server-apt" do
+ inherit "simple-template"
+
+ provisioners [TestLab::Provisioner::Apt]
+
+ interface do
+ name :eth0
+ network_id 'testnet'
+ address '100.64.0.80/24'
+ end
+ end
+
+ # APTCACHERNG PROVISIONER
+ container "server-aptcacherng" do
+ inherit "simple-template"
+
+ provisioners [TestLab::Provisioner::AptCacherNG]
+
+ interface do
+ name :eth0
+ network_id 'testnet'
+ address '100.64.0.80/24'
+ end
+ end
+
+ # ROUTE PROVISIONER
+ container "server-route" do
+ inherit "simple-template"
+
+ provisioners [TestLab::Provisioner::Route]
+
+ interface do
+ name :eth0
+ network_id 'testnet'
+ address '100.64.0.80/24'
+ end
+ end
+
+ # NFSMOUNT PROVISIONER
+ container "server-nfsmount" do
+ inherit "simple-template"
+
+ provisioners [TestLab::Provisioner::NFSMount]
+
+ config ({:nfs_mounts => %w( 127.0.0.1 /share /local)})
+
+ interface do
+ name :eth0
+ network_id 'testnet'
+ address '100.64.0.80/24'
+ end
+ end
end