Class: DPL::Provider::ElasticBeanstalk
- Inherits:
-
DPL::Provider
- Object
- DPL::Provider
- DPL::Provider::ElasticBeanstalk
- Defined in:
- lib/dpl/provider/elastic_beanstalk.rb
Constant Summary collapse
- DEFAULT_REGION =
'us-east-1'
Instance Method Summary collapse
- #access_key_id ⇒ Object
- #check_app ⇒ Object
- #check_auth ⇒ Object
- #needs_key? ⇒ Boolean
- #only_create_app_version ⇒ Object
- #push_app ⇒ Object
- #secret_access_key ⇒ Object
Instance Method Details
#access_key_id ⇒ Object
16 17 18 |
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 16 def access_key_id [:access_key_id] || context.env['AWS_ACCESS_KEY_ID'] || raise(Error, "missing access_key_id") end |
#check_app ⇒ Object
32 33 |
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 32 def check_app end |
#check_auth ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 24 def check_auth = { :region => region, :credentials => Aws::Credentials.new(access_key_id, secret_access_key) } Aws.config.update() end |
#needs_key? ⇒ Boolean
12 13 14 |
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 12 def needs_key? false end |
#only_create_app_version ⇒ Object
35 36 37 |
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 35 def only_create_app_version [:only_create_app_version] end |
#push_app ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 39 def push_app @start_time = Time.now create_bucket unless bucket_exists? if [:zip_file] zip_file = File.([:zip_file]) else zip_file = create_zip end s3_object = upload(archive_name, zip_file) sleep 5 #s3 eventual consistency version = create_app_version(s3_object) if !only_create_app_version update_app(version) wait_until_deployed if [:wait_until_deployed] end end |
#secret_access_key ⇒ Object
20 21 22 |
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 20 def secret_access_key [:secret_access_key] || context.env['AWS_SECRET_ACCESS_KEY'] || raise(Error, "missing secret_access_key") end |