Sha256: 4cd7d48e4995ae055b0126d0b5e7cf87fbb3195e7b09f7b7db18f395cdff6484

Contents?: true

Size: 733 Bytes

Versions: 1

Compression:

Stored size: 733 Bytes

Contents

#!/usr/bin/ruby
require 'rubygems'
require 'pool_party'

# Set defaults
list = PoolParty::Optioner.parse(ARGV.dup)
options = PoolParty::Application.options(ARGV.dup)
master = PoolParty::Master.new

# if list.empty?
#   puts "Usage: pool [options] {start|stop|list|maintain}"
#   exit
# end

case list[0]
when "start"
  PoolParty.message "Starting cloud"
  master.start_cloud!
when "stop"
  PoolParty.message "Stopping cloud"
  master.request_termination_of_all_instances  
when "list"
  puts master.list
when "maintain"
  PoolParty.message "Maintaining cloud"
  master.start_monitor!
when "restart"
  PoolParty.message "Restarting cloud"
  master.request_termination_of_all_instances
  master.start_cloud!
else
  puts master.list
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
poolparty-0.0.4 bin/pool