Sha256: ba1fa0422a1b5dee358d230e1aa1a292e8b957815b62b564839395da7a348dc3
Contents?: true
Size: 1.23 KB
Versions: 3
Compression:
Stored size: 1.23 KB
Contents
#!/usr/bin/env ruby $:.unshift(File.dirname(__FILE__) + "/../lib") require "poolparty" # require "poolpartycl" require 'git-style-binary/command' GitStyleBinary.command do version "PoolParty #{$0} command" banner <<-EOS Usage: #{$0} #{all_options_string} expands the cloud by a single instance EOS short_desc "expands the cloud by a single instance" run do |command| @loaded_clouds.each do |cld| vputs header("Expanding cloud #{cld.name}") vputs "#{cld.nodes(:status => "running").size} running instances of #{cld.maximum_instances} possible instances" vputs testing ? "Not expanding (test mode)" : "Expanding the cloud" if cld.maximum_instances > cld.nodes(:status => "running").size cld.launch_instance!(:cloud_name => cld.name) do |node| ::PoolParty::Provision::BootStrapper.new(node.ip, :cloud => cld) ::PoolParty::Provision::DrConfigure.new(node.ip, :cloud => cld) puts <<-EOM Your cloud has expanded. The new ip is #{node.ip} EOM end else puts "The cloud #{cld.name} has too many instances already (#{cld.nodes(:status => "running").size})" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
auser-poolparty-1.2.3 | bin/cloud-expand |
auser-poolparty-1.2.4 | bin/cloud-expand |
auser-poolparty-1.2.7 | bin/cloud-expand |