Sha256: 8e7e0318a3b31c1c394a0b533968fdc5bb8a970fa6d25cb134ec0352d58169c9

Contents?: true

Size: 1007 Bytes

Versions: 5

Compression:

Stored size: 1007 Bytes

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 cloudname', '--cloud name', 'Start cloud by this name')    { |c| optioner.cloudname c }
end

load_pool(o.spec || Binary.get_existing_spec_location)

@testing = o.testing

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

@clouds.each do |name, cloud|
  
  with_cloud(cloud, {:testing => @testing}) do
    puts header("Starting cloud")
    puts "#{list_of_running_instances.size} running instances (#{minimum_instances} - #{maximum_instances})"
    if list_of_running_instances.size != 1
      puts "Starting the master instance"    
      if testing
        puts("\tNot launching while in testing mode")
      else
        provisioning_in_progress
        launch_and_configure_master!
        provisioning_complete
      end
    end
    clear_base_directory unless testing
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
auser-poolparty-0.2.22 bin/cloud-start
auser-poolparty-0.2.23 bin/cloud-start
auser-poolparty-0.2.24 bin/cloud-start
auser-poolparty-0.2.25 bin/cloud-start
auser-poolparty-0.2.26 bin/cloud-start