diff --git a/automan.gemspec b/automan.gemspec index ea2e3f5..00e0734 100644 --- a/automan.gemspec +++ b/automan.gemspec @@ -22,7 +22,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency "rspec-core", "~> 3" spec.add_development_dependency "rspec-mocks", "~> 3" spec.add_development_dependency "rspec-expectations", "~> 3" - spec.add_dependency "aws-sdk", "< 2.0" + spec.add_dependency "aws-sdk-v1" + spec.add_dependency "aws-sdk","~> 2" spec.add_dependency "thor" spec.add_dependency "json" spec.add_dependency "wait" diff --git a/lib/automan/beanstalk/configuration.rb b/lib/automan/beanstalk/configuration.rb index 832ef84..09f15a8 100644 --- a/lib/automan/beanstalk/configuration.rb +++ b/lib/automan/beanstalk/configuration.rb @@ -17,8 +17,8 @@ def config_template_exists? } begin - response = eb.describe_configuration_settings opts - rescue AWS::ElasticBeanstalk::Errors::InvalidParameterValue => e + response = eb2.describe_configuration_settings opts + rescue Aws::ElasticBeanstalk::Errors::InvalidParameterValue => e if e.message.start_with? "No Configuration Template named" return false end @@ -43,7 +43,7 @@ def delete_config_template template_name: name } - response = eb.delete_configuration_template opts + response = eb2.delete_configuration_template opts unless response.successful? raise RequestFailedError, "delete_configuration_template failed: #{response.error}" @@ -94,7 +94,7 @@ def create_config_template option_settings: configuration_options } - response = eb.create_configuration_template opts + response = eb2.create_configuration_template opts unless response.successful? raise RequestFailedError, "create_configuration_template failed: #{response.error}" diff --git a/lib/automan/cloudformation/launcher.rb b/lib/automan/cloudformation/launcher.rb index ad4c272..dbb18f6 100644 --- a/lib/automan/cloudformation/launcher.rb +++ b/lib/automan/cloudformation/launcher.rb @@ -21,7 +21,7 @@ def initialize(options={}) super @wait = Wait.new({ delay: 120, - attempts: 15, # 15 x 2m == 30m + attempts: 25, # 25 x 2m == 50m debug: true, rescuer: WaitRescuer.new(), logger: @logger diff --git a/lib/automan/mixins/aws_caller.rb b/lib/automan/mixins/aws_caller.rb index 0f71eb2..d5e2960 100644 --- a/lib/automan/mixins/aws_caller.rb +++ b/lib/automan/mixins/aws_caller.rb @@ -1,4 +1,5 @@ require 'aws-sdk' +require 'aws-sdk-v1' module Automan module Mixins @@ -31,6 +32,14 @@ def eb end @eb end + + attr_writer :eb2 + def eb2 + if @eb2.nil? + @eb2 = Aws::ElasticBeanstalk::Client.new + end + @eb2 + end attr_writer :s3 def s3 diff --git a/lib/automan/version.rb b/lib/automan/version.rb index 1e32749..eeee602 100644 --- a/lib/automan/version.rb +++ b/lib/automan/version.rb @@ -1,3 +1,3 @@ module Automan - VERSION = "2.4.1" + VERSION = "2.6.1" end