Sha256: 078e51313cd572e2dcd3ab5ed5e106f39813364d9c85c1fc4deb834016201a33

Contents?: true

Size: 909 Bytes

Versions: 22

Compression:

Stored size: 909 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('-p poolname', '--pool name', 'Start pool by this name')    { |p| optioner.poolname p }
end

o.loaded_pools.each do |pl|
  
  with_pool(pl) do
    
    puts header("Starting pool")
    clouds.each do |name, cloud|
      puts subheader("Cloud: #{name}")
      puts "#{cloud.list_of_running_instances.size} running instances (#{cloud.minimum_instances} - #{cloud.maximum_instances})"
      if (cloud.minimum_instances - cloud.list_of_running_instances.size) > 0
        puts "Starting #{cloud.minimum_instances - cloud.list_of_running_instances.size} instances (from #{cloud.keypair})"
        testing ? puts("\tNot launching while in testing mode") : cloud.launch_minimum_number_of_instances
      end
    end
  end
  
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
auser-poolparty-0.2.45 bin/pool-start
auser-poolparty-0.2.46 bin/pool-start
auser-poolparty-0.2.47 bin/pool-start
auser-poolparty-0.2.48 bin/pool-start
auser-poolparty-0.2.49 bin/pool-start
auser-poolparty-0.2.50 bin/pool-start
auser-poolparty-0.2.51 bin/pool-start
auser-poolparty-0.2.52 bin/pool-start
auser-poolparty-0.2.53 bin/pool-start
auser-poolparty-0.2.54 bin/pool-start
auser-poolparty-0.2.55 bin/pool-start
auser-poolparty-0.2.56 bin/pool-start
auser-poolparty-0.2.57 bin/pool-start
auser-poolparty-0.2.58 bin/pool-start
auser-poolparty-0.2.59 bin/pool-start
auser-poolparty-0.2.60 bin/pool-start
auser-poolparty-0.2.61 bin/pool-start
auser-poolparty-0.2.62 bin/pool-start
auser-poolparty-0.2.63 bin/pool-start
auser-poolparty-0.2.64 bin/pool-start