Sha256: 85b466b13c79725435f559f58a01bb68499d4ad70a959f58221c959694b14d9c

Contents?: true

Size: 1.21 KB

Versions: 9

Compression:

Stored size: 1.21 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}

  Bootstrap a cloud instance
EOS

  short_desc "Bootstrap a cloud instance"
  
  opt :inst_num, "The number of the instance to run bootstrap on", :type => :int

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

        # If an IP or DNS name is given, bootstrap that node, otherwise, bootstrap all running nodes.
        if cld.nodes(:status => "running").empty?
          puts "No nodes to bootstrap"
        else
          if command[:inst_num]
            vputs "\nBootStrapping: #{nodes[o.inst_num]}\n--------------------"
            ::PoolParty::Provision::BootStrapper.new cld.nodes(:status => "running")[ command[:inst_num] ], :cloud => cld
          else
            cld.nodes(:status => "running").each do |address|
              cld.vputs "\nBootStrapping: #{address[:ip]}\n--------------------"      
              ::PoolParty::Provision::BootStrapper.new address[:ip], :cloud => cld
            end
          end
        end
      
    end
    
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
auser-poolparty-1.2.10 bin/cloud-bootstrap
auser-poolparty-1.2.11 bin/cloud-bootstrap
auser-poolparty-1.2.12 bin/cloud-bootstrap
auser-poolparty-1.2.3 bin/cloud-bootstrap
auser-poolparty-1.2.4 bin/cloud-bootstrap
auser-poolparty-1.2.7 bin/cloud-bootstrap
auser-poolparty-1.2.8 bin/cloud-bootstrap
auser-poolparty-1.2.9 bin/cloud-bootstrap
fairchild-poolparty-1.2.12 bin/cloud-bootstrap