eb_deployer 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.ruby-version +1 -1
- data/lib/eb_deployer.rb +10 -8
- data/lib/eb_deployer/application.rb +8 -3
- data/lib/eb_deployer/version.rb +1 -1
- data/test/deploy_test.rb +16 -1
- metadata +9 -5
- checksums.yaml +0 -15
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
1.9.3-p429
|
data/lib/eb_deployer.rb
CHANGED
@@ -231,12 +231,7 @@ module EbDeployer
|
|
231
231
|
action = options.delete(:action)
|
232
232
|
|
233
233
|
if File.exists?(options[:config_file])
|
234
|
-
|
235
|
-
puts "Found configuration at #{options[:config_file]}."
|
236
|
-
puts "Now execute 'eb_deploy -p <package name>' to deploy"
|
237
|
-
puts "'eb_deploy --help') for more options"
|
238
|
-
exit(2)
|
239
|
-
end
|
234
|
+
puts "Found configuration at #{options[:config_file]}."
|
240
235
|
else
|
241
236
|
puts "Generated default configuration at #{options[:config_file]}."
|
242
237
|
DefaultConfig.new(File.basename(Dir.pwd)).write_to(options[:config_file])
|
@@ -245,11 +240,11 @@ module EbDeployer
|
|
245
240
|
|
246
241
|
if !options[:package] && action == :deploy
|
247
242
|
puts "Missing options: -p (--package)"
|
243
|
+
puts "'eb_deploy --help' for details"
|
248
244
|
puts parser
|
249
245
|
exit(-1)
|
250
246
|
end
|
251
247
|
|
252
|
-
|
253
248
|
self.send(action, ConfigLoader.new.load(options))
|
254
249
|
end
|
255
250
|
|
@@ -258,7 +253,7 @@ module EbDeployer
|
|
258
253
|
def self.cli_parser(options)
|
259
254
|
OptionParser.new do |opts|
|
260
255
|
opts.banner = "Usage: eb_deployer [options]"
|
261
|
-
opts.on("-p", "--package [FILE]", "Package to deploy, for example a war file for java application") do |v|
|
256
|
+
opts.on("-p", "--package [FILE]", "Package to deploy, for example a war file for java application or yaml specification for package location on s3, see -h for format") do |v|
|
262
257
|
options[:package] = v
|
263
258
|
end
|
264
259
|
|
@@ -283,6 +278,13 @@ module EbDeployer
|
|
283
278
|
exit(0)
|
284
279
|
end
|
285
280
|
|
281
|
+
opts.on("-h", "--help", "help") do
|
282
|
+
puts opts
|
283
|
+
puts ""
|
284
|
+
puts "YAML package file format:"
|
285
|
+
puts "s3_bucket: <bucket_name>"
|
286
|
+
puts "s3_key: <object_path>"
|
287
|
+
end
|
286
288
|
end
|
287
289
|
end
|
288
290
|
|
@@ -11,12 +11,17 @@ module EbDeployer
|
|
11
11
|
def create_version(version_label, package)
|
12
12
|
create_application_if_not_exists
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
source_bundle = if package =~ /\.yml$/
|
15
|
+
YAML.load(File.read(package))
|
16
|
+
else
|
17
|
+
package = Package.new(package, @bucket + ".packages", @s3_driver)
|
18
|
+
package.upload
|
19
|
+
package.source_bundle
|
20
|
+
end
|
16
21
|
|
17
22
|
unless @eb_driver.application_version_labels(@name).include?(version_label)
|
18
23
|
log("Create application version with label #{version_label}")
|
19
|
-
@eb_driver.create_application_version(@name, version_label,
|
24
|
+
@eb_driver.create_application_version(@name, version_label, source_bundle)
|
20
25
|
end
|
21
26
|
end
|
22
27
|
|
data/lib/eb_deployer/version.rb
CHANGED
data/test/deploy_test.rb
CHANGED
@@ -8,7 +8,22 @@ class DeployTest < MiniTest::Unit::TestCase
|
|
8
8
|
@sample_package = sample_file('app-package.war')
|
9
9
|
end
|
10
10
|
|
11
|
-
def
|
11
|
+
def test_deployment_with_s3_package_specification
|
12
|
+
File.open('mingle_package.yml', 'w') do |f|
|
13
|
+
f.write("s3_bucket: test-bucket\n")
|
14
|
+
f.write("s3_key: test-mingle.war")
|
15
|
+
end
|
16
|
+
|
17
|
+
deploy(:application => 'simple', :environment => "production",
|
18
|
+
:package => 'mingle_package.yml', :version_label => 1)
|
19
|
+
assert @eb_driver.application_exists?('simple')
|
20
|
+
last_version = @eb_driver.application_versions('simple').last
|
21
|
+
assert_equal({'s3_bucket' => 'test-bucket', 's3_key' => 'test-mingle.war'}, last_version[:source_bundle])
|
22
|
+
ensure
|
23
|
+
FileUtils.rm_rf('mingle_package.yml')
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_first_deployment_create_eb_application
|
12
27
|
assert !@eb_driver.application_exists?('simple')
|
13
28
|
deploy(:application => 'simple', :environment => "production")
|
14
29
|
assert @eb_driver.application_exists?('simple')
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
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.1
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- wpc
|
@@ -9,11 +10,12 @@ authors:
|
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2014-
|
13
|
+
date: 2014-02-05 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: aws-sdk
|
16
17
|
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
17
19
|
requirements:
|
18
20
|
- - ! '>='
|
19
21
|
- !ruby/object:Gem::Version
|
@@ -21,6 +23,7 @@ dependencies:
|
|
21
23
|
type: :runtime
|
22
24
|
prerelease: false
|
23
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
24
27
|
requirements:
|
25
28
|
- - ! '>='
|
26
29
|
- !ruby/object:Gem::Version
|
@@ -68,26 +71,27 @@ files:
|
|
68
71
|
homepage: https://github.com/ThoughtWorksStudios/eb_deployer
|
69
72
|
licenses:
|
70
73
|
- MIT
|
71
|
-
metadata: {}
|
72
74
|
post_install_message:
|
73
75
|
rdoc_options: []
|
74
76
|
require_paths:
|
75
77
|
- lib
|
76
78
|
required_ruby_version: !ruby/object:Gem::Requirement
|
79
|
+
none: false
|
77
80
|
requirements:
|
78
81
|
- - ! '>='
|
79
82
|
- !ruby/object:Gem::Version
|
80
83
|
version: '0'
|
81
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
82
86
|
requirements:
|
83
87
|
- - ! '>='
|
84
88
|
- !ruby/object:Gem::Version
|
85
89
|
version: '0'
|
86
90
|
requirements: []
|
87
91
|
rubyforge_project:
|
88
|
-
rubygems_version:
|
92
|
+
rubygems_version: 1.8.23
|
89
93
|
signing_key:
|
90
|
-
specification_version:
|
94
|
+
specification_version: 3
|
91
95
|
summary: Low friction deployments should be a breeze. Elastic Beanstalk provides a
|
92
96
|
great foundation for performing Blue-Green deployments, and EbDeployer add a missing
|
93
97
|
top to automate the whole flow out of box.
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
Y2M0YzZlNzgzYzJkODBlNzhmYWEzNjNhZDA5MWVjYTlhMWRmYzkyMg==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MTc3YTc2ODk4YjAzYjEyNzEwYmI3ODE2MTkyNDgzM2FlYjA3MTM1Yw==
|
7
|
-
SHA512:
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MmQwNGE5ZTViNzlmNGE4MDhhMDBjNDg0M2NiNmM3YjIzZWFiZjYyMmQ1NGE5
|
10
|
-
MTE1MDNjYzMwZGMzMjI5NmFmMGQ3OTdkODY1M2E1NGIzOTkyYjZkNGFkNGQw
|
11
|
-
MWY5Mjc1ZTVlOTA0NjU0YmM3NzI1ZWUwODY1YmY3ZDQxMGVhN2I=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
Y2UwZTliNTE1ZWI1OTRkMWM0Mzk3NmIxNTJmZDYzNGU4ZGMzOGRiNjIwYTYw
|
14
|
-
ZWM5ZDgyMjkzZmRiNWRkZTQwZDU0ODYyZDM3ZTJkMGQ1M2Q1ZjA0YTk5MWI1
|
15
|
-
OWY5Y2EyOTgzODA4MmM1NzU4MTA5NThkMTU4ODA2ODgxZjQxZWU=
|