elastic-beanstalk 1.1.6 → 1.1.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8ac39f21da7ab6b45f1575dbb743c27df32ed6d4
4
- data.tar.gz: 1111780e7f1fadbc700824f30e5e304d6ae6d520
3
+ metadata.gz: db486b8d00fc9b4c31c75b6b9c879e204d5017f3
4
+ data.tar.gz: 0c4b527fca49fe0456492b364b02f7414db5e2a3
5
5
  SHA512:
6
- metadata.gz: 96caf4b9dc9c72c38e6c18389dcd5e76299ae99e50266d647784485c4467039665d7986634806d0016bbdcbf6704b10a77ca697051a3575a9e300bf274cf053d
7
- data.tar.gz: 1642bb10dcd9c7ee06c8f0f338b18988823e0f5c74bbf273d02eb752ce5227088575b23ed063d98ea2a677b6dd3cf51f58ff8099d81a54d75ed9ff323572dcf7
6
+ metadata.gz: 833300ff20288c4b09aaf1750ec1b87a085feccbc02dbfb7cff2feea4918277eb6194943923b505858e7dfee19e65157ed613da348a182c14c49e0769e2b629f
7
+ data.tar.gz: a7bad06e982e9a6f5273aff034bc9712bcc45c91377df7e1e597bb195384ef3799b9a97b81a4dd84ae5b4598d4c2267a0fa60e9218cee07c023bdd0d97c62321
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 AlienFast, LLC
1
+ Copyright (c) 2014-2015 AlienFast, LLC
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -29,9 +29,9 @@ Or install it yourself as:
29
29
 
30
30
  ### Plus
31
31
  Since [eb_deployer](https://github.com/ThoughtWorksStudios/eb_deployer) is doing the heavy lifting, by proxy you get access to great continuous delivery features such as:
32
- * Blue Green deployment strategy
33
- * In Place deployment strategy
34
- * Smoke Testing upon deployment before Blue Green DNS switching
32
+ * `blue-green` deployment strategy
33
+ * `inplace-update` deployment strategy
34
+ * Smoke Testing upon deployment before `blue-green` CNAME switching
35
35
 
36
36
  ## Usage
37
37
 
@@ -49,16 +49,15 @@ Something like this should get you started
49
49
  ```ruby
50
50
  app: acme
51
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
-
52
+ solution_stack_name: 64bit Amazon Linux 2015.03 v2.0.0 running Ruby 2.2 (Passenger Standalone)
53
+ strategy: inplace-update
55
54
  development:
56
- strategy: inplace_update
57
55
  options:
58
56
  aws:autoscaling:launchconfiguration:
59
57
  InstanceType: t1.micro
60
58
 
61
59
  production:
60
+ strategy: blue-green
62
61
  options:
63
62
  aws:autoscaling:launchconfiguration:
64
63
  InstanceType: t1.small
@@ -70,18 +69,20 @@ The default is the 'development' environment, change this via command line argum
70
69
  $ rake eb:package eb:deploy
71
70
 
72
71
  ### Step 4. Get some coffee
73
- This will take a while. We intend to provide an example in the wiki and/or samples dir that implements a [caching strategy detailed here](http://horewi.cz/faster-rails-3-deployments-to-aws-elastic-beanstalk.html) to speed up deployment.
72
+ This will take a while. TODO: investigate methods to speed up deployment i.e. cache bundle. Feel free to post yours in the wiki.
73
+
74
+ ## Rake Tasks
74
75
 
75
- ## EB Rake Tasks
76
+ ### EB
76
77
 
77
- rake eb:clobber # Remove any generated package
78
- rake eb:config # Setup AWS.config and merge/override environments into one resolved configuration
79
- rake eb:deploy[version] # Deploy to Elastic Beanstalk
80
- rake eb:destroy[force] # ** Warning: Destroy Elastic Beanstalk application and *all* environments
81
- rake eb:package # Package zip source bundle for Elastic Beanstalk
82
- rake eb:show_config[version] # Show resolved configuration without doing anything
78
+ rake eb:clobber # Remove any generated package
79
+ rake eb:config[environment,version] # Setup AWS.config and merge/override environments into one resolved configuration
80
+ rake eb:deploy[environment,version] # Deploy to Elastic Beanstalk
81
+ rake eb:destroy[force] # ** Warning: Destroy Elastic Beanstalk application and *all* environments
82
+ rake eb:package[environment,version] # Package zip source bundle for Elastic Beanstalk
83
+ rake eb:show_config[environment,version] # Show resolved configuration without doing anything
83
84
 
84
- ## EB:RDS Rake Tasks
85
+ ### EB:RDS Rake Tasks
85
86
 
86
87
  The EB:RDS tasks are intended to make use of RDS tasks simple given existing configuration in the eb.yml.
87
88
  i.e. create a snapshot before or after an `eb:deploy`. The following rake tasks exist:
@@ -94,9 +95,7 @@ For example, this would create a snapshot prior to the deployment (and migration
94
95
 
95
96
  rake eb:rds:create_snapshot[acme, pre-1.1.0] eb:deploy[1.1.0]
96
97
 
97
- ## Command line
98
-
99
- ### RAILS_ENV vs :environment:
98
+ ### Using RAILS_ENV vs :environment:
100
99
  Some people prefer to use `RAILS_ENV`, others prefer to use the `:environment` argument. Both are accepted. Depending on the use case, each one can be DRYer than the other.
101
100
  Where the task specifies `[:environment, :version]`, consider the `:environment` optional if you want to use the default of `development` or utilize the `RAILS_ENV` instead.
102
101
 
@@ -137,73 +136,54 @@ config/eb.yml
137
136
  # This is a sample that has not been executed so it may not be exactly 100%, but is intended to show
138
137
  # that access to full options_settings and .ebextensions is intended.
139
138
  #---
139
+ # http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html#command-options-ruby
140
+ #
141
+ # This is a sample that has not been executed so it may not be exactly 100%, but is intended to show
142
+ # that access to full options_settings and .ebextensions is intended.
143
+ #---
140
144
  app: acme
141
145
  region: us-east-1
142
- solution_stack_name: 64bit Amazon Linux running Ruby 1.9.3
146
+ # Choose a platform from http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html
147
+ solution_stack_name: 64bit Amazon Linux 2015.03 v2.0.0 running Ruby 2.2 (Passenger Standalone)
148
+ strategy: inplace-update # default to inplace-update to avoid starting new environments
143
149
  package:
144
150
  verbose: true
145
- exclude_dirs: [solr, features] # additional dirs that merge with default excludes
146
- exclude_files: [rspec.xml, README*, db/*.sqlite3]
151
+ exclude_dirs: [features, spec, target, coverage, vcr, flows] # additional dirs that merge with default excludes
152
+ exclude_files: [.ruby-*, rspec.xml, README*, db/*.sqlite3, bower.json]
147
153
  smoke_test: |
148
154
  lambda { |host|
149
- EbSmokeTester.test_url("http://#{host}/ping", 600, 5, 'All good! Everything is up and checks out.')
155
+ EbSmokeTester.test_url("http://#{host}/health", 600, 5, 'All good! Everything is up and checks out.')
150
156
  }
151
157
  #--
152
158
  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:
159
+ # General settings for the server environment
160
+ 01-environment.config:
161
+ commands:
162
162
  01timezone:
163
163
  command: "ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime"
164
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
-
165
+ # These are things that make sense for any Ruby application
166
+ 02-ruby.config:
169
167
  # Install git in order to be able to bundle gems from git
170
168
  packages:
171
169
  yum:
172
170
  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
171
+ patch: []
172
+
173
+ # Run rake tasks before an application deployment
174
+ 03-rake.config:
175
+ container_commands:
176
+ 01seed:
177
+ command: rake db:seed
178
+ leader_only: true
179
+
205
180
  #---
206
181
  options:
182
+
183
+ # Any environment variables - will be available in ENV
184
+ aws:elasticbeanstalk:application:environment:
185
+ FOO: 'bar'
186
+
207
187
  aws:autoscaling:launchconfiguration:
208
188
  EC2KeyName: eb-ssh
209
189
  SecurityGroups: 'acme-production-control'
@@ -223,10 +203,9 @@ options:
223
203
  Notification Endpoint: 'alerts@acme.com'
224
204
 
225
205
  aws:elasticbeanstalk:application:
226
- Application Healthcheck URL: '/'
206
+ Application Healthcheck URL: '/health'
227
207
  #---
228
208
  development:
229
- strategy: inplace_update
230
209
  options:
231
210
  aws:autoscaling:launchconfiguration:
232
211
  InstanceType: t1.micro
@@ -234,6 +213,7 @@ development:
234
213
  RAILS_SKIP_ASSET_COMPILATION: true
235
214
  #---
236
215
  production:
216
+ strategy: blue-green # always fire up a new environment and healthcheck before transitioning cname
237
217
  options:
238
218
  aws:autoscaling:launchconfiguration:
239
219
  InstanceType: t1.small
@@ -260,8 +240,7 @@ tier:
260
240
  ```
261
241
 
262
242
  ## Still to come
263
- 1. Caching sample config?
264
- 2. More thorough access to the Elastic Beanstalk api as-needed.
243
+ 1. Speedier deployments - investigate caching of bundle and asset pre-compilation to see if there is a common setting to be found
265
244
 
266
245
  ## Contributing
267
246
 
@@ -273,6 +252,7 @@ Please contribute! While this is working great, a greater scope of functionality
273
252
  4. Push to the branch (`git push origin my-new-feature`)
274
253
  5. Create new Pull Request
275
254
 
276
- ## Copyright
277
255
 
278
- Copyright (c) 2014 AlienFast, LLC. See LICENSE.txt for further details.
256
+ ## Copyright and License
257
+
258
+ Copyright (c) 2014-2015 AlienFast, LLC. MIT License, see LICENSE.txt for further details.
@@ -384,7 +384,7 @@ namespace :eb do
384
384
 
385
385
  def destroy
386
386
  Rake::Task['eb:config'].invoke
387
- EbDeployer.destroy(application: EbConfig.app)
387
+ EbDeployer.destroy(application: EbConfig.app, environment: EbConfig.environment)
388
388
  puts "Destroy issued to AWS."
389
389
  end
390
390
 
@@ -1,5 +1,5 @@
1
1
  module Elastic
2
2
  module Beanstalk
3
- VERSION = '1.1.6'
3
+ VERSION = '1.1.7'
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.6
4
+ version: 1.1.7
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-08-18 00:00:00.000000000 Z
11
+ date: 2015-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler