Sha256: e6d277ffed7901a101e8eb63e85440419d5ee948eb07a1a1a3efa77f8ea4f2f7

Contents?: true

Size: 1.16 KB

Versions: 28

Compression:

Stored size: 1.16 KB

Contents

#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"

require 'git-style-binary/command'

GitStyleBinary.command do
  banner <<-EOS
Usage: #{$0} #{all_options_string}

  starts a single instance in your cloud.
EOS

  short_desc "starts a single instance in your cloud"

  run do |command|    
    
    @loaded_clouds.each do |cld|

      if cld.nodes.size.zero?
        puts "Starting cloud #{cld.name} (#{cld.keypair})"
        puts "#{cld.nodes(:status => "running").size} running instances (#{cld.minimum_instances} - #{cld.maximum_instances})"
        
        cld.minimum_instances.times do |i|
          cld.expand
        end
        # cld.nodes.each do |node|
        #   vputs "Bootstrapping: #{node.instance_id}"
        #   node.bootstrap!
        #   node.configure!(:cloud => cld)
        # end
        
        msg = [
          "Your cloud has started with the following public_ips:"
        ]
        
        cld.nodes.each {|node| msg << "#{node.public_ip}"}
        
        print_msg(msg)
      else
        puts <<-EOE
          #{cld.nodes}
          Your cloud is already running.
        EOE
      end
      
    end
    
  end
end

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
auser-poolparty-1.3.0 bin/cloud-start
auser-poolparty-1.3.1 bin/cloud-start
auser-poolparty-1.3.10 bin/cloud-start
auser-poolparty-1.3.11 bin/cloud-start
auser-poolparty-1.3.12 bin/cloud-start
auser-poolparty-1.3.13 bin/cloud-start
auser-poolparty-1.3.14 bin/cloud-start
auser-poolparty-1.3.15 bin/cloud-start
auser-poolparty-1.3.16 bin/cloud-start
auser-poolparty-1.3.17 bin/cloud-start
auser-poolparty-1.3.2 bin/cloud-start
auser-poolparty-1.3.3 bin/cloud-start
auser-poolparty-1.3.4 bin/cloud-start
auser-poolparty-1.3.5 bin/cloud-start
auser-poolparty-1.3.6 bin/cloud-start
auser-poolparty-1.3.7 bin/cloud-start
auser-poolparty-1.3.8 bin/cloud-start
fairchild-poolparty-1.3.17 bin/cloud-start
fairchild-poolparty-1.3.5 bin/cloud-start
poolparty-1.3.15 bin/cloud-start