Module: Elb::Helper
- Included in:
- Deploy
- Defined in:
- lib/elb/helper.rb
Constant Summary collapse
- @@setup_aws =
nil
Instance Method Summary collapse
- #as ⇒ Object
- #cfn ⇒ Object
- #ec2 ⇒ Object
- #r53 ⇒ Object
- #rds ⇒ Object
- #setup_aws(region = 'us-east-1', options = {}) ⇒ Object
Instance Method Details
#as ⇒ Object
32 33 34 |
# File 'lib/elb/helper.rb', line 32 def as @as ||= AWS::AutoScaling.new end |
#cfn ⇒ Object
24 25 26 |
# File 'lib/elb/helper.rb', line 24 def cfn @cfn ||= AWS::CloudFormation.new end |
#ec2 ⇒ Object
20 21 22 |
# File 'lib/elb/helper.rb', line 20 def ec2 @ec2 ||= AWS::EC2.new end |
#r53 ⇒ Object
36 37 38 |
# File 'lib/elb/helper.rb', line 36 def r53 @r53 ||= AWS::Route53.new end |
#rds ⇒ Object
28 29 30 |
# File 'lib/elb/helper.rb', line 28 def rds @rds ||= AWS::RDS.new end |
#setup_aws(region = 'us-east-1', options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/elb/helper.rb', line 6 def setup_aws(region='us-east-1', ={}) return if @@setup_aws path = Elb::Settings.new.aws_path if File.exist?(path) @config = YAML.load(IO.read(path)) AWS.config( :http_wire_trace => [:debug], :access_key_id => @config[:aws_access_key_id], :secret_access_key => @config[:aws_secret_access_key] ) end @@setup_aws = true end |