eb_deployer 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/eb_deployer.gemspec +3 -3
- data/lib/eb_deployer/application.rb +14 -4
- data/lib/eb_deployer/config_loader.rb +12 -7
- data/lib/eb_deployer/version.rb +1 -1
- data/lib/eb_deployer.rb +8 -2
- metadata +20 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e8d42e8522c7f436251552c366a5728fc18e296
|
4
|
+
data.tar.gz: c1a3115f32a1af1e620f6459297ecc6e555352ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6699965fc55694e54849017d63dfef003a30e122a98d3a58deff42ef4c22670d83e57f5cb4fb2b33362c9fe117b8c18e3e165809d58b7c2648195554399fc19
|
7
|
+
data.tar.gz: c14d0f2152bebd7326fe1206ae9bb0b9208cd0c7ad317f10f6e2f117277ef578e7636043032fdc505f6bb77eec794c3efffa1abf2e3f6acd1aad96a05b353a7d
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.9.3-p429
|
1
|
+
ruby-1.9.3-p429
|
data/eb_deployer.gemspec
CHANGED
@@ -4,10 +4,10 @@ require File.expand_path('../lib/eb_deployer/version', __FILE__)
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.authors = ["wpc", "betarelease"]
|
6
6
|
gem.email = ["alex.hal9000@gmail.com", "sudhindra.r.rao@gmail.com"]
|
7
|
-
gem.description = %q{For
|
8
|
-
gem.summary = %q{Low friction deployments should be a breeze. Elastic Beanstalk provides a great foundation for performing Blue-Green deployments, and EbDeployer add a missing top to automate the whole flow out of box.}
|
7
|
+
gem.description = %q{For automating Blue-Green deployment flows on Elastic Beanstalk.}
|
8
|
+
gem.summary = %q{Low friction deployments should be a breeze. Elastic Beanstalk provides a great foundation for performing Blue-Green deployments, and EbDeployer add a missing top to automate the whole flow out of the box.}
|
9
9
|
gem.homepage = "https://github.com/ThoughtWorksStudios/eb_deployer"
|
10
|
-
gem.license
|
10
|
+
gem.license = 'MIT'
|
11
11
|
|
12
12
|
gem.add_runtime_dependency 'aws-sdk'
|
13
13
|
|
@@ -25,15 +25,25 @@ module EbDeployer
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
def delete
|
28
|
+
def delete(env_name=nil)
|
29
29
|
if @eb_driver.application_exists?(@name)
|
30
|
-
|
30
|
+
env_name = Environment.unique_ebenv_name(@name, env_name) unless env_name.nil?
|
31
|
+
available_envs = @eb_driver.environment_names_for_application(@name)
|
32
|
+
|
33
|
+
unless env_name.nil? || available_envs.include?(env_name)
|
34
|
+
log("Environment #{env_name.inspect} does not exist in application #{@name.inspect}. Skipping delete.")
|
35
|
+
return
|
36
|
+
end
|
37
|
+
|
38
|
+
available_envs.select { |e| env_name.nil? || e == env_name }.each do |env|
|
31
39
|
log("Terminating environment #{env}")
|
32
40
|
@eb_driver.delete_environment(@name, env)
|
33
41
|
end
|
34
42
|
|
35
|
-
|
36
|
-
|
43
|
+
if env_name.nil?
|
44
|
+
log("Deleting application")
|
45
|
+
@eb_driver.delete_application(@name)
|
46
|
+
end
|
37
47
|
end
|
38
48
|
end
|
39
49
|
|
@@ -27,16 +27,21 @@ module EbDeployer
|
|
27
27
|
common_settings = symbolize_keys(config_settings.delete(:common))
|
28
28
|
common_settings[:version_label] ||= package_digest
|
29
29
|
|
30
|
-
env = options[:environment]
|
31
30
|
envs = config_settings.delete(:environments)
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
ret = options.merge(config_settings).merge(common_settings)
|
32
|
+
unless ret.delete(:all_envs)
|
33
|
+
env = ret[:environment]
|
34
|
+
raise "Environment #{env} is not defined in #{config_file}" unless envs.has_key?(env)
|
35
|
+
env_settings = symbolize_keys(envs[env] || {})
|
36
|
+
env_option_settings = env_settings.delete(:option_settings) || []
|
35
37
|
|
36
|
-
|
38
|
+
ret.merge!(env_settings)
|
37
39
|
|
38
|
-
|
39
|
-
|
40
|
+
ret[:option_settings] ||= []
|
41
|
+
ret[:option_settings] += env_option_settings
|
42
|
+
else
|
43
|
+
ret.delete(:environment)
|
44
|
+
end
|
40
45
|
ret
|
41
46
|
end
|
42
47
|
|
data/lib/eb_deployer/version.rb
CHANGED
data/lib/eb_deployer.rb
CHANGED
@@ -214,7 +214,7 @@ module EbDeployer
|
|
214
214
|
bs = opts[:bs_driver] || Beanstalk.new
|
215
215
|
s3 = opts[:s3_driver] || S3Driver.new
|
216
216
|
cf = opts[:cf_driver] || CloudFormationDriver.new
|
217
|
-
Application.new(app, bs, s3).delete
|
217
|
+
Application.new(app, bs, s3).delete(opts[:environment])
|
218
218
|
end
|
219
219
|
|
220
220
|
def self.cli
|
@@ -228,6 +228,8 @@ module EbDeployer
|
|
228
228
|
parser.parse!
|
229
229
|
action = options.delete(:action)
|
230
230
|
|
231
|
+
raise "--all is only valid with --destroy" if (options[:all_envs] && action != :destroy)
|
232
|
+
|
231
233
|
if File.exists?(options[:config_file])
|
232
234
|
puts "Found configuration at #{options[:config_file]}."
|
233
235
|
else
|
@@ -255,7 +257,7 @@ module EbDeployer
|
|
255
257
|
options[:package] = v
|
256
258
|
end
|
257
259
|
|
258
|
-
opts.on("-e", "--environment [ENV_NAME]", "(
|
260
|
+
opts.on("-e", "--environment [ENV_NAME]", "(Defaults to 'dev') Environment on which to operate (e.g. dev, staging, production). This must be defined in 'environments' section of the config file") do |v|
|
259
261
|
options[:environment] = v
|
260
262
|
end
|
261
263
|
|
@@ -267,6 +269,10 @@ module EbDeployer
|
|
267
269
|
options[:action] = :destroy
|
268
270
|
end
|
269
271
|
|
272
|
+
opts.on("--all", "Operate on all environments, only valid with --destroy") do |v|
|
273
|
+
options[:all_envs] = true
|
274
|
+
end
|
275
|
+
|
270
276
|
opts.on("--skip-resource-stack-update", "skip cloud-formation stack update. (only for extreme situation like hitting a cloudformation bug)") do |v|
|
271
277
|
options[:skip_resource_stack_update] = true
|
272
278
|
end
|
metadata
CHANGED
@@ -1,31 +1,31 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eb_deployer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- wpc
|
8
8
|
- betarelease
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-03-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|
16
|
-
|
16
|
+
version_requirements: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - '>='
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '0'
|
21
|
-
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
21
|
+
requirement: !ruby/object:Gem::Requirement
|
24
22
|
requirements:
|
25
|
-
- -
|
23
|
+
- - '>='
|
26
24
|
- !ruby/object:Gem::Version
|
27
25
|
version: '0'
|
28
|
-
|
26
|
+
prerelease: false
|
27
|
+
type: :runtime
|
28
|
+
description: For automating Blue-Green deployment flows on Elastic Beanstalk.
|
29
29
|
email:
|
30
30
|
- alex.hal9000@gmail.com
|
31
31
|
- sudhindra.r.rao@gmail.com
|
@@ -34,9 +34,9 @@ executables:
|
|
34
34
|
extensions: []
|
35
35
|
extra_rdoc_files: []
|
36
36
|
files:
|
37
|
-
-
|
38
|
-
-
|
39
|
-
-
|
37
|
+
- .gitignore
|
38
|
+
- .ruby-gemset
|
39
|
+
- .ruby-version
|
40
40
|
- Gemfile
|
41
41
|
- LICENSE
|
42
42
|
- README.md
|
@@ -70,28 +70,26 @@ homepage: https://github.com/ThoughtWorksStudios/eb_deployer
|
|
70
70
|
licenses:
|
71
71
|
- MIT
|
72
72
|
metadata: {}
|
73
|
-
post_install_message:
|
73
|
+
post_install_message:
|
74
74
|
rdoc_options: []
|
75
75
|
require_paths:
|
76
76
|
- lib
|
77
77
|
required_ruby_version: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- -
|
79
|
+
- - '>='
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: '0'
|
82
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
|
-
- -
|
84
|
+
- - '>='
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '0'
|
87
87
|
requirements: []
|
88
|
-
rubyforge_project:
|
89
|
-
rubygems_version: 2.2.
|
90
|
-
signing_key:
|
88
|
+
rubyforge_project:
|
89
|
+
rubygems_version: 2.2.1
|
90
|
+
signing_key:
|
91
91
|
specification_version: 4
|
92
|
-
summary: Low friction deployments should be a breeze. Elastic Beanstalk provides a
|
93
|
-
great foundation for performing Blue-Green deployments, and EbDeployer add a missing
|
94
|
-
top to automate the whole flow out of box.
|
92
|
+
summary: Low friction deployments should be a breeze. Elastic Beanstalk provides a great foundation for performing Blue-Green deployments, and EbDeployer add a missing top to automate the whole flow out of the box.
|
95
93
|
test_files:
|
96
94
|
- test/aws_driver_stubs.rb
|
97
95
|
- test/cloud_formation_provisioner_test.rb
|