Sha256: 01525a79635c5555c5b29ce587ce1bf7b55bee9fe44aee2b9d0ec5c4a2a64e74

Contents?: true

Size: 976 Bytes

Versions: 1

Compression:

Stored size: 976 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

include Remote

if o.cloudname
  @cloud = cloud(o.cloudname.downcase.to_sym)
else
  puts "Cloud name or pool name required. Please specify it with -c name"
  exit(0)
end

with_cloud(@cloud, {:testing => @testing}) do
  puts header("Starting cloud")
  puts "#{list_of_running_instances.size} running instances (#{minimum_instances} - #{maximum_instances})"
  if (minimum_instances - list_of_running_instances.size) > 0
    puts "Starting #{minimum_instances - list_of_running_instances.size} instances"    
    testing ? puts("\tNot launching while in testing mode") : launch_minimum_number_of_instances
  end  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
auser-poolparty-0.2.2 bin/cloud-start