Sha256: 5657bed9baea6d9d2c405db2b56508515ba753b7a4e0765bcc941bd562f9ffb0

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 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('-c [master|slaves|all]', '--class [master|slaves|all]', 'Provision class (default: all)')    { |c| optioner.provision_class c }
  opts.on('-n name', '--name name', 'Listing for cloud name')    { |c| optioner.cloudname c }
end

load_pool(o.spec || Binary.get_existing_spec_location)

@provision_class = o.provision_class || "all"

include Remote

@clouds = o.cloudname ? {:cloud => cloud(o.cloudname.downcase.to_sym)} : clouds

@clouds.each do |name, cloud|
  
  with_cloud(cloud, {:testing => o.testing, :location => @location, :provision_class => @provision_class}) do
    
    provisioning_in_progress
    
    if provision_class == "slave" || provision_class == "all"
      Provisioner.provision_slaves(self, testing)
    end
    if provision_class == "master" || provision_class == "all"
      Provisioner.provision_master(self, testing)
    end
    
    provisioning_complete

    clear_base_directory unless testing
  end    
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
auser-poolparty-0.2.15 bin/cloud-provision