Sha256: 070155ac4660b880e8aaf2962a5bfb7e917eae3cdf65c5a605e50a84281b3687
Contents?: true
Size: 578 Bytes
Versions: 12
Compression:
Stored size: 578 Bytes
Contents
require 'meroku/infrastructure/server' module Meroku # Logic related to the infratructure that powers meroku module Infrastructure extend Meroku::Aws::Ec2 def self.servers ec2_client.describe_instances( filters: [ { name: 'tag:Name', values: ['node'] }, { name: 'instance-state-name', values: %w[running pending] } ] ).reservations.map do |xx| Meroku::Infrastructure::Server.new(xx.instances.first.instance_id) end end def self.each_server servers.each { |s| yield s } end end end
Version data entries
12 entries across 12 versions & 1 rubygems