Class: DPL::Provider::ElasticBeanstalk
Constant Summary
collapse
- DEFAULT_REGION =
'us-east-1'
Instance Attribute Summary
#context, #options
Instance Method Summary
collapse
apt_get, #cleanup, #commit_msg, context, #create_key, #default_text_charset, #default_text_charset?, #deploy, deprecated, #detect_encoding?, #encoding_for, #error, experimental, #initialize, #log, new, npm_g, #option, pip, requires, #run, #setup_git_credentials, #setup_git_ssh, #sha, shell, #uncleanup, #user_agent, #warn
Constructor Details
This class inherits a constructor from DPL::Provider
Instance Method Details
#access_key_id ⇒ Object
17
18
19
|
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 17
def access_key_id
options[:access_key_id] || context.env['AWS_ACCESS_KEY_ID'] || raise(Error, "missing access_key_id")
end
|
#check_app ⇒ Object
33
34
|
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 33
def check_app
end
|
#check_auth ⇒ Object
25
26
27
28
29
30
31
|
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 25
def check_auth
options = {
:region => region,
:credentials => Aws::Credentials.new(access_key_id, secret_access_key)
}
Aws.config.update(options)
end
|
#needs_key? ⇒ Boolean
13
14
15
|
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 13
def needs_key?
false
end
|
#only_create_app_version ⇒ Object
36
37
38
|
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 36
def only_create_app_version
options[:only_create_app_version]
end
|
#push_app ⇒ Object
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 40
def push_app
@start_time = Time.now
create_bucket unless bucket_exists?
if options[:zip_file]
zip_file = File.expand_path(options[:zip_file])
else
zip_file = create_zip
end
s3_object = upload(archive_name, zip_file)
sleep 5 version = create_app_version(s3_object)
if !only_create_app_version
update_app(version)
wait_until_deployed if options[:wait_until_deployed]
end
end
|
#secret_access_key ⇒ Object
21
22
23
|
# File 'lib/dpl/provider/elastic_beanstalk.rb', line 21
def secret_access_key
options[:secret_access_key] || context.env['AWS_SECRET_ACCESS_KEY'] || raise(Error, "missing secret_access_key")
end
|