Sha256: 587f1e7197b751a48b21ab5b0ce5452933b5f852e23186fe787fd42456b19566

Contents?: true

Size: 1.59 KB

Versions: 17

Compression:

Stored size: 1.59 KB

Contents

#!/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"

    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

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
testlab-0.5.0 spec/support/Labfile
testlab-0.4.16 spec/support/Labfile
testlab-0.4.15 spec/support/Labfile
testlab-0.4.14 spec/support/Labfile
testlab-0.4.13 spec/support/Labfile
testlab-0.4.12 spec/support/Labfile
testlab-0.4.11 spec/support/Labfile
testlab-0.4.10 spec/support/Labfile
testlab-0.4.9 spec/support/Labfile
testlab-0.4.8 spec/support/Labfile
testlab-0.4.7 spec/support/Labfile
testlab-0.4.6 spec/support/Labfile
testlab-0.4.5 spec/support/Labfile
testlab-0.4.4 spec/support/Labfile
testlab-0.4.3 spec/support/Labfile
testlab-0.4.2 spec/support/Labfile
testlab-0.4.1 spec/support/Labfile