Sha256: 834e9fd5219139a13b46ea4e77414c0846fe6f4b2abd59086235aa879f30da2e

Contents?: true

Size: 1.27 KB

Versions: 8

Compression:

Stored size: 1.27 KB

Contents

#!/usr/bin/env ruby
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require "poolparty"
require "poolpartycl"

o = PoolParty::Optioner.new(ARGV) do |opts, optioner|
  opts.on('-n cloudname', '--name name', 'Start cloud by this name')    { |c| optioner.cloudname c }
  opts.on('-p', '--slave', 'Provision slave (default: false)')    { optioner.provision_slave true }
  opts.on('-i num', '--id num', 'Instance num to provision')    { |i| optioner.instance_number i }
end

o.loaded_clouds.each do |cloud|

  with_cloud(cloud) do
    setup_dev
    instance_num = instance_number.to_i if instance_number
    
    if instance_num
      @instance = get_instance_by_number( instance_num )
      instance_num == 0 ? provisioner_for(master).install(testing) : provisioner_for(@instance).install(testing)
      # Provisioner.process_clean_reconfigure_for!(@instance, self, testing)
    else
      if provision_slave
        vputs "Provisioning slaves"
        verbose ? provisioner_for(nil).install(testing) : hide_output { provisioner_for(nil).install(testing) }
      else
        vputs "Provisioning master"
        verbose ? provisioner_for(master).install(testing) : hide_output { provisioner_for(master).install(testing) }
      end
    end
    
    clear_base_directory unless testing
  end

end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
auser-poolparty-0.2.84 bin/cloud-provision
auser-poolparty-0.2.85 bin/cloud-provision
auser-poolparty-0.2.88 bin/cloud-provision
auser-poolparty-0.2.89 bin/cloud-provision
auser-poolparty-0.2.90 bin/cloud-provision
auser-poolparty-0.2.91 bin/cloud-provision
auser-poolparty-0.2.92 bin/cloud-provision
poolparty-0.2.84 bin/cloud-provision