Class: Cucumber::Chef::Provisioner

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/chef/provisioner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(test_lab, ui = ZTK::UI.new) ⇒ Provisioner

Returns a new instance of Provisioner.



32
33
34
35
36
37
38
39
40
# File 'lib/cucumber/chef/provisioner.rb', line 32

def initialize(test_lab, ui=ZTK::UI.new)
  test_lab.nil? and raise ProvisionerError, "You must supply a test lab!"

  @test_lab = test_lab
  @ui       = ui

  @cookbooks_path = File.join(Cucumber::Chef.root_dir, "chef_repo", "cookbooks")
  @roles_path = File.join(Cucumber::Chef.root_dir, "chef_repo", "roles")
end

Instance Attribute Details

#test_labObject

Returns the value of attribute test_lab.



28
29
30
# File 'lib/cucumber/chef/provisioner.rb', line 28

def test_lab
  @test_lab
end

Instance Method Details

#buildObject



44
45
46
47
48
49
50
51
52
53
# File 'lib/cucumber/chef/provisioner.rb', line 44

def build
  upload_chef_repo
  bootstrap
  wait_for_chef_server

  download_chef_credentials
  download_ssh_credentials

  reboot_test_lab
end