elastic-beanstalk 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 40a2e39a971bfd3c7c3de3c571af41a762dadbe6
4
- data.tar.gz: 5656483a2442d9c46754e9e2a43d6970dab9e6b4
3
+ metadata.gz: 78b136f50127269176467ba6b9acc6f6e66ecd68
4
+ data.tar.gz: 5f2ee1c26fadeccb7e900ba5f3113382532e05a4
5
5
  SHA512:
6
- metadata.gz: b2a52b39ea276ac7cdbe221063a92d0d95d323a362d2bc9a29ccad9f2a3327ca6d9efdd66a122bdf36dc02d51158d2a949bd442390c04b047d0422a47358d1e5
7
- data.tar.gz: f894dcbfb2890d9dd20618f4ac05e533bc50789fe95f47ca6d0f64fa4e08f65528e3e00a7063b6ab7c5c91d68b479a4c8f496e9eaa93ca7498dd2f76eb819f80
6
+ metadata.gz: 83d030e7f06d67f9fea40967532393e09782d759fbce5fbf30b1edddae842fb8200a2383f2739032f421921cf5c9bff44767ba1c4872c7c17c05860f44b47ace
7
+ data.tar.gz: 02409b252a1f8dd08f103f189144744ef67376cb738acd75ac389f3e263e3a19a3f08c33e3c3ee043fe155b7d3a37a1f21e9ea768bedf3cc9ebbcdb0486787e8
data/README.md CHANGED
@@ -46,21 +46,23 @@ This should contain the access and secret keys generated from the selected IAM u
46
46
  ### Step 2. Add a config/eb.yml to your rails project
47
47
  Something like this should get you started
48
48
 
49
- app: acme
50
- region: us-east-1
51
- # http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html
52
- solution_stack_name: 64bit Amazon Linux 2013.09 running Ruby 1.9.3
53
-
54
- development:
55
- strategy: inplace_update
56
- options:
57
- aws:autoscaling:launchconfiguration:
58
- InstanceType: t1.micro
59
-
60
- production:
61
- options:
62
- aws:autoscaling:launchconfiguration:
63
- InstanceType: t1.small
49
+ ```ruby
50
+ app: acme
51
+ region: us-east-1
52
+ # http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html
53
+ solution_stack_name: 64bit Amazon Linux 2013.09 running Ruby 1.9.3
54
+
55
+ development:
56
+ strategy: inplace_update
57
+ options:
58
+ aws:autoscaling:launchconfiguration:
59
+ InstanceType: t1.micro
60
+
61
+ production:
62
+ options:
63
+ aws:autoscaling:launchconfiguration:
64
+ InstanceType: t1.small
65
+ ```
64
66
 
65
67
  ### Step 3. Package and deploy
66
68
  The default is the 'development' environment, change this via command line arguments
@@ -131,129 +133,133 @@ Deploy an MD5 hashed version of acme to development
131
133
 
132
134
  config/eb.yml
133
135
 
134
- # This is a sample that has not been executed so it may not be exactly 100%, but is intended to show
135
- # that access to full options_settings and .ebextensions is intended.
136
- #---
137
- app: acme
138
- region: us-east-1
139
- solution_stack_name: 64bit Amazon Linux running Ruby 1.9.3
140
- package:
141
- verbose: true
142
- exclude_dirs: [solr, features] # additional dirs that merge with default excludes
143
- exclude_files: [rspec.xml, README*, db/*.sqlite3]
144
- smoke_test: |
145
- lambda { |host|
146
-
147
- EbSmokeTester.test_url("http://#{host}/ping", 600, 5, 'All good! Everything is up and checks out.')
148
- }
149
- #--
150
- ebextensions:
151
- 01settings.config:
152
- # Run rake tasks before an application deployment
153
- container_commands:
154
- 01seed:
155
- command: rake db:seed
156
- leader_only: true
157
- # run any necessary commands
158
- 02commands.config:
159
- container_commands:
160
- 01timezone:
161
- command: "ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime"
162
-
163
- # These are things that make sense for any Ruby application see:
164
- # https://github.com/gkop/elastic-beanstalk-ruby/blob/master/.ebextensions/ruby.config
165
- 03-ruby.config:
166
-
167
- # Install git in order to be able to bundle gems from git
168
- packages:
169
- yum:
170
- git: []
171
- commands:
172
- # Run rake with bundle exec to be sure you get the right version
173
- add_bundle_exec:
174
- test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
175
- cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
176
- command: perl -pi -e 's/(rake)/bundle exec $1/' 11_asset_compilation.sh 12_db_migration.sh
177
- # Bundle with --deployment as recommended by bundler docs
178
- # cf. http://gembundler.com/v1.2/rationale.html under Deploying Your Application
179
- add_deployment_flag:
180
- test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
181
- cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
182
- command: perl -pi -e 's/(bundle install)/$1 --deployment/' 10_bundle_install.sh
183
- # Vendor gems to a persistent directory for speedy subsequent bundling
184
- make_vendor_bundle_dir:
185
- test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
186
- command: mkdir /var/app/support/vendor_bundle
187
- # Store the location of vendored gems in a handy env var
188
- set_vendor_bundle_var:
189
- test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
190
- cwd: /opt/elasticbeanstalk/support
191
- command: sed -i '12iexport EB_CONFIG_APP_VENDOR_BUNDLE=$EB_CONFIG_APP_SUPPORT/vendor_bundle' envvars
192
- # The --deployment flag tells bundler to install gems to vendor/bundle/, so
193
- # symlink that to the persistent directory
194
- symlink_vendor_bundle:
195
- test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
196
- cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
197
- command: sed -i '6iln -s $EB_CONFIG_APP_VENDOR_BUNDLE ./vendor/bundle' 10_bundle_install.sh
198
- # Don't run the above commands again on this instance
199
- # cf. http://stackoverflow.com/a/16846429/283398
200
- z_write_post_provisioning_complete_file:
201
- cwd: /opt/elasticbeanstalk/support
202
- command: touch .post-provisioning-complete
203
- #---
204
- options:
205
- aws:autoscaling:launchconfiguration:
206
- EC2KeyName: eb-ssh
207
- SecurityGroups: 'acme-production-control'
208
-
209
- aws:autoscaling:asg:
210
- MinSize: 1
211
- MaxSize: 5
212
-
213
- aws:elb:loadbalancer:
214
- SSLCertificateId: 'arn:aws:iam::XXXXXXX:server-certificate/acme'
215
- LoadBalancerHTTPSPort: 443
216
-
217
- aws:elb:policies:
218
- Stickiness Policy: true
219
-
220
- aws:elasticbeanstalk:sns:topics:
221
- Notification Endpoint: 'alerts@acme.com'
222
-
223
- aws:elasticbeanstalk:application:
224
- Application Healthcheck URL: '/'
225
- #---
226
- development:
227
- strategy: inplace_update
228
- options:
229
- aws:autoscaling:launchconfiguration:
230
- InstanceType: t1.micro
231
- aws:elasticbeanstalk:application:environment:
232
- RAILS_SKIP_ASSET_COMPILATION: true
233
- #---
234
- production:
235
- options:
236
- aws:autoscaling:launchconfiguration:
237
- InstanceType: t1.small
238
-
136
+ ```ruby
137
+ # This is a sample that has not been executed so it may not be exactly 100%, but is intended to show
138
+ # that access to full options_settings and .ebextensions is intended.
139
+ #---
140
+ app: acme
141
+ region: us-east-1
142
+ solution_stack_name: 64bit Amazon Linux running Ruby 1.9.3
143
+ package:
144
+ verbose: true
145
+ exclude_dirs: [solr, features] # additional dirs that merge with default excludes
146
+ exclude_files: [rspec.xml, README*, db/*.sqlite3]
147
+ smoke_test: |
148
+ lambda { |host|
149
+ EbSmokeTester.test_url("http://#{host}/ping", 600, 5, 'All good! Everything is up and checks out.')
150
+ }
151
+ #--
152
+ ebextensions:
153
+ 01settings.config:
154
+ # Run rake tasks before an application deployment
155
+ container_commands:
156
+ 01seed:
157
+ command: rake db:seed
158
+ leader_only: true
159
+ # run any necessary commands
160
+ 02commands.config:
161
+ container_commands:
162
+ 01timezone:
163
+ command: "ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime"
164
+
165
+ # These are things that make sense for any Ruby application see:
166
+ # https://github.com/gkop/elastic-beanstalk-ruby/blob/master/.ebextensions/ruby.config
167
+ 03-ruby.config:
168
+
169
+ # Install git in order to be able to bundle gems from git
170
+ packages:
171
+ yum:
172
+ git: []
173
+ commands:
174
+ # Run rake with bundle exec to be sure you get the right version
175
+ add_bundle_exec:
176
+ test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
177
+ cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
178
+ command: perl -pi -e 's/(rake)/bundle exec $1/' 11_asset_compilation.sh 12_db_migration.sh
179
+ # Bundle with --deployment as recommended by bundler docs
180
+ # cf. http://gembundler.com/v1.2/rationale.html under Deploying Your Application
181
+ add_deployment_flag:
182
+ test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
183
+ cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
184
+ command: perl -pi -e 's/(bundle install)/$1 --deployment/' 10_bundle_install.sh
185
+ # Vendor gems to a persistent directory for speedy subsequent bundling
186
+ make_vendor_bundle_dir:
187
+ test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
188
+ command: mkdir /var/app/support/vendor_bundle
189
+ # Store the location of vendored gems in a handy env var
190
+ set_vendor_bundle_var:
191
+ test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
192
+ cwd: /opt/elasticbeanstalk/support
193
+ command: sed -i '12iexport EB_CONFIG_APP_VENDOR_BUNDLE=$EB_CONFIG_APP_SUPPORT/vendor_bundle' envvars
194
+ # The --deployment flag tells bundler to install gems to vendor/bundle/, so
195
+ # symlink that to the persistent directory
196
+ symlink_vendor_bundle:
197
+ test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
198
+ cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
199
+ command: sed -i '6iln -s $EB_CONFIG_APP_VENDOR_BUNDLE ./vendor/bundle' 10_bundle_install.sh
200
+ # Don't run the above commands again on this instance
201
+ # cf. http://stackoverflow.com/a/16846429/283398
202
+ z_write_post_provisioning_complete_file:
203
+ cwd: /opt/elasticbeanstalk/support
204
+ command: touch .post-provisioning-complete
205
+ #---
206
+ options:
207
+ aws:autoscaling:launchconfiguration:
208
+ EC2KeyName: eb-ssh
209
+ SecurityGroups: 'acme-production-control'
210
+
211
+ aws:autoscaling:asg:
212
+ MinSize: 1
213
+ MaxSize: 5
214
+
215
+ aws:elb:loadbalancer:
216
+ SSLCertificateId: 'arn:aws:iam::XXXXXXX:server-certificate/acme'
217
+ LoadBalancerHTTPSPort: 443
218
+
219
+ aws:elb:policies:
220
+ Stickiness Policy: true
221
+
222
+ aws:elasticbeanstalk:sns:topics:
223
+ Notification Endpoint: 'alerts@acme.com'
224
+
225
+ aws:elasticbeanstalk:application:
226
+ Application Healthcheck URL: '/'
227
+ #---
228
+ development:
229
+ strategy: inplace_update
230
+ options:
231
+ aws:autoscaling:launchconfiguration:
232
+ InstanceType: t1.micro
233
+ aws:elasticbeanstalk:application:environment:
234
+ RAILS_SKIP_ASSET_COMPILATION: true
235
+ #---
236
+ production:
237
+ options:
238
+ aws:autoscaling:launchconfiguration:
239
+ InstanceType: t1.small
240
+ ```
239
241
 
240
242
  ## Additional options
241
243
  Most of the configurations are defaulted. The following are less obvious but may be useful:
242
244
 
243
- secrets_dir: (default: '~/.aws')
244
- package:
245
- verbose: (default: false)
246
- dir: (default: 'pkg')
245
+ ```ruby
246
+ secrets_dir: (default: '~/.aws')
247
+ package:
248
+ verbose: (default: false)
249
+ dir: (default: 'pkg')
250
+ ```
247
251
 
248
252
  ### eb_deployer additional options
249
253
  The following are passed if not nil, otherwise eb_deployer assigns an appropriate default.
250
254
 
251
- package_bucket:
252
- keep_latest:
253
- version_prefix:
255
+ ```ruby
256
+ package_bucket:
257
+ keep_latest:
258
+ version_prefix:
259
+ ```
254
260
 
255
261
  ## Still to come
256
- 1. Caching sample config
262
+ 1. Caching sample config?
257
263
  2. More thorough access to the Elastic Beanstalk api as-needed.
258
264
 
259
265
  ## Contributing
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
32
32
 
33
33
  # runtime
34
34
  s.add_runtime_dependency 'railties', '>= 3.2'
35
- s.add_runtime_dependency 'eb_deployer', '>= 0.4.4'
35
+ s.add_runtime_dependency 'eb_deployer', '>= 0.6.1'
36
36
  s.add_runtime_dependency 'awesome_print'
37
37
  s.add_runtime_dependency 'time_diff'
38
38
  s.add_runtime_dependency 'rubyzip'
@@ -68,11 +68,11 @@ namespace :eb do
68
68
  end
69
69
 
70
70
  def snapshot(snapshot_id)
71
- AWS::RDS::DBSnapshot.new(snapshot_id)
71
+ Aws::RDS::DBSnapshot.new(snapshot_id)
72
72
  end
73
73
 
74
74
  def db(instance_id)
75
- db_instance = AWS::RDS::DBInstance.new(instance_id)
75
+ db_instance = Aws::RDS::DBInstance.new(instance_id)
76
76
  raise "DB Instance[#{instance_id}] does not exist." unless db_instance.exists?
77
77
  db_instance
78
78
  end
@@ -181,11 +181,16 @@ namespace :eb do
181
181
 
182
182
  #-------------------------------------------------------------------------------
183
183
  # configure aws credentials. Depending on the called task, this may not be necessary parent task should call #credentials! for validation.
184
- AWS.config(credentials) unless credentials.nil?
184
+ Aws.config.update({
185
+ credentials: Aws::Credentials.new(credentials['access_key_id'], credentials['secret_access_key']),
186
+ }) unless credentials.nil?
185
187
 
186
188
  #-------------------------------------------------------------------------------
187
189
  # configure aws region if specified in the eb.yml
188
- AWS.config(region: EbConfig.region) unless EbConfig.region.nil?
190
+ Aws.config.update({
191
+ region: EbConfig.region,
192
+ }) unless EbConfig.region.nil?
193
+
189
194
  end
190
195
 
191
196
  ###########################################
@@ -1,5 +1,5 @@
1
1
  module Elastic
2
2
  module Beanstalk
3
- VERSION = '1.1.3'
3
+ VERSION = '1.1.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic-beanstalk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Ross
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-29 00:00:00.000000000 Z
11
+ date: 2015-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 0.4.4
89
+ version: 0.6.1
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 0.4.4
96
+ version: 0.6.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: awesome_print
99
99
  requirement: !ruby/object:Gem::Requirement