Sha256: 170ce19c1f250f0901da389ee643e1eb4f37ea69fecacc4046e13777e882e363
Contents?: true
Size: 1.18 KB
Versions: 5
Compression:
Stored size: 1.18 KB
Contents
#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), "..", "lib")) require "poolparty" require "poolpartycl" available_monitors = PoolParty::Monitors.available_monitors o = PoolParty::Optioner.new(ARGV) do |opts, optioner| opts.on('-n name', '--name name', 'Host name') { |h| optioner.hostname h } opts.on('-l', '--no-shell', 'No shell') {optioner.noshell true} end o.loaded_clouds.each do |cloud| with_cloud(cloud) do @nonprovisioned_nodes = list_of_running_instances.map {|a| a.name } - cloud.get_current_nodes # @tp = ThreadPool.new(10) @nonprovisioned_nodes.each do |node| vputs "Provisioning #{node}" next if node == "master" # @tp.process do str = returning Array.new do |s| s << cloud.dependency_resolver_command end.join(";") node_id = node.gsub(/node/, '') cmd = ". /etc/profile && #{str};server-provision -n #{cloud.name} -i #{node_id};#{str}" running_cmd = "ps aux | grep -v grep | grep \"server-provision -n #{cloud.name} -i #{node_id};\"" vputs "Executing #{cmd}" running = %x[#{running_cmd}] `#{cmd}` if running.chomp.empty? end # @tp.join end end
Version data entries
5 entries across 5 versions & 2 rubygems