Sha256: ede1832afe888844a1b024cfaa0f24bec203b83c36a63607553db8b32120b8b8
Contents?: true
Size: 808 Bytes
Versions: 8
Compression:
Stored size: 808 Bytes
Contents
namespace(:ec2) do task :init do %x[ec2-authorize default -P icmp -t -1:-1 -s 0.0.0.0/0] end # Start a new instance in the cloud desc "Add and start an instance to the pool" task :start_new_instance => [:init] do puts PoolParty::Remoting.new.launch_new_instance! end # Stop all the instances via command-line desc "Stop all running instances" task :stop_running_instances => [:init] do Thread.new {`ec2-describe-instances | grep INSTANCE | grep running | awk '{print $2}' | xargs ec2-terminate-instances`} end # Reboot the instances via commandline desc "Restart all running instances" task :restart_running_instances => [:init] do Thread.new {`ec2-describe-instances | grep INSTANCE | grep running | awk '{print $2}' | xargs ec2-reboot-instances`} end end
Version data entries
8 entries across 8 versions & 2 rubygems