Class: Arnold::Provisioner::CloudProvisioner

Inherits:
Arnold::Provisioner show all
Defined in:
lib/arnold/provisioner/cloud_provisioner.rb

Instance Attribute Summary

Attributes inherited from Arnold::Provisioner

#node

Instance Method Summary collapse

Methods inherited from Arnold::Provisioner

#initialize, #provision

Constructor Details

This class inherits a constructor from Arnold::Provisioner

Instance Method Details

#createObject



6
7
8
9
10
# File 'lib/arnold/provisioner/cloud_provisioner.rb', line 6

def create
  puts "provisioning node #{@node.name}"
  puts "Would have called:"
  puts "puppet node_vmware create --name=#{@node.name} --template='#{@node.parameters['template']}' --wait-for-boot"
end

#installObject



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/arnold/provisioner/cloud_provisioner.rb', line 12

def install
  enc_server = "--enc-server=#{$CONFIG[:enc_server]} --enc-port=#{$CONFIG[:enc_port]}"
  enc_auth   = "--enc-ssl --enc-auth-user=#{$CONFIG[:enc_user]} --enc-auth-passwd=#{$CONFIG[:enc_password]}"

  enc        = "#{enc_server} #{enc_auth}"
        = "--keyfile=#{$CONFIG[:keyfile]} --login=root"

  puts "installing and classifying"
  puts "would have called:"
  puts "puppet node init --node-group=#{@node.parameters['group']} #{enc} #{} #{@node.name}"
end