Sha256: 48c65975375fa61d7b28428ef7828fe0ec574fc3a896b90ed2cf739928a2dc20
Contents?: true
Size: 1.37 KB
Versions: 6
Compression:
Stored size: 1.37 KB
Contents
#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) require "poolparty" require "poolparty/provision/boot_strapper" o = PoolParty::Optioner.new(ARGV) do |opts, optioner| opts.on('-n cloudname', '--name name', 'Start cloud by this name') { |c| optioner.cloudname c } opts.on('-i num', '--num i', 'Instance number') { |i| optioner.inst_num i.to_i } end o.loaded_clouds.each do |cld| # If an IP or DNS name is given, bootstrap that node, otherwise, bootstrap all running nodes. nodes = !o.unflagged_args.empty? ? o.unflagged_args : cld.remote_instances_list.collect {|inst| inst.ip if inst.running? }.compact if nodes.empty? puts "No nodes to bootstrap" else if o.inst_num? ::PoolParty::Provision::BootStrapper.new( nodes[o.inst_num], :full_keypair_path => cld.keypair.full_filepath, :cloud => cld ) ::PoolParty::Provision::DrConfigure.new( nodes[o.inst_num], :full_keypair_path => cld.keypair.full_filepath, :cloud => cld ) else nodes.each do |address| puts "bootstrapping: #{address}" ::PoolParty::Provision::BootStrapper.new( address, :full_keypair_path => cld.keypair.full_filepath, :cloud => cld ) ::PoolParty::Provision::DrConfigure.new( address, :full_keypair_path => cld.keypair.full_filepath, :cloud => cld ) end end end end
Version data entries
6 entries across 6 versions & 2 rubygems