Sha256: 8cde39d65cccc0c17bfbc3e65f74cbb6b335701cc0d3d868385bd56c3ba8694e

Contents?: true

Size: 1.04 KB

Versions: 5

Compression:

Stored size: 1.04 KB

Contents

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

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

available_monitors = PoolParty::Monitors.available_monitors

@hostname = o.hostname ? o.hostname : `hostname`.chomp
@hostname = "node0" if @hostname == "master" # Quick fix to make sure we have a node running on the master as well

o.loaded_clouds.each do |cloud|
  
  with_cloud(cloud, {:testing => o.testing, :hostname => @hostname, :noshell => o.noshell }) do
    # TODO: Change this to be app specfic
    # SECURITY RISK
    
    boot_file = "#{Messenger.append_dir}/pm_node_rel-0.1"
    command = Messenger.erl_command(hostname, "-boot #{boot_file} #{noshell ? "" : "-detached -heart"} -- #{available_monitors.join(" ")}")
    
    vputs "Running #{command}"
    
    Kernel.system "exec #{command}" unless testing
  end  
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
auser-poolparty-0.2.46 bin/server-start-node
auser-poolparty-0.2.47 bin/server-start-node
auser-poolparty-0.2.48 bin/server-start-node
auser-poolparty-0.2.49 bin/server-start-node
auser-poolparty-0.2.50 bin/server-start-node