capistrano-asg 0.7.0 → 0.8.0

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
  SHA256:
3
- metadata.gz: c5cf7466ccf300560f72599cca1617b23dc97a0fc9fb47f555d947e4aed9754f
4
- data.tar.gz: f2dae7eaf2acbfacc9d5aef30e92b18c77584ad4f0958cee985992b6d0ff85dc
3
+ metadata.gz: af650b3a82db3a47faf36f7c6f63a94d67d43c8f02a0855e6eaa43a9d03bef6b
4
+ data.tar.gz: 96b6c111b9bd50b4700f83fe80edef7071c88819dcd39f306d174cec9fcb6da3
5
5
  SHA512:
6
- metadata.gz: 476cf23e974d98864f846cf4153b21a670b4c215f5d2edb2c866a564938bb5c6050ed32a4ceffd0667b51b0dbd230d9bc1186be1b20b0f0b667ced90fc305a29
7
- data.tar.gz: ebe4e1fc3dc267076174e5d89d676694d2bfa212e7a6769c81c99f49bebeceaf5cc314df07f3110748d7ac6b2ccf5b37cbe40e3f437fef6d537779ea6315f2c2
6
+ metadata.gz: 40af09ca069d13101ffb069f488f1dc9753ccf451f4d938e3fdaf7f5f2484f9617861423499b7951e59184aff407ee4eb24afd84130c37e9c985a9045123eec3
7
+ data.tar.gz: 7612f33c757b9b20b32f1a1b3323dbad84edcb9e21bc0e4dc763ec54fd4a0eafd7108222bea4440c21b071c1f63134856236eed97c84615b9ebc66e1d06b4f2e
@@ -1,3 +1,16 @@
1
+ # 0.8.0
2
+ **Breaking Change**
3
+ * Change name of the configuration options hash to include both the AWS region and
4
+ the ASG name. To use:
5
+
6
+ ```ruby
7
+ set "#{region}_#{asg}".to_sym, {
8
+ ...
9
+ }
10
+ ```
11
+
12
+ See the README for more details.
13
+
1
14
  # 0.7.0
2
15
 
3
16
  * Update to AWS SDK v3. Thanks @jpatters and @milgner
data/README.md CHANGED
@@ -31,7 +31,7 @@ set :aws_secret_access_key, ENV['AWS_SECRET_ACCESS_KEY']
31
31
  set :aws_region, ENV['AWS_REGION']
32
32
 
33
33
  # To set region specific things:
34
- set ENV['AWS_REGION'].to_sym, {
34
+ set "#{ENV['AWS_REGION']}_#{asg}".to_sym, {
35
35
  aws_no_reboot_on_create_ami: true,
36
36
  aws_autoscale_instance_size: 'm1.small',
37
37
  aws_launch_configuration_detailed_instance_monitoring: true,
@@ -40,6 +40,8 @@ set ENV['AWS_REGION'].to_sym, {
40
40
 
41
41
  ```
42
42
 
43
+ where `asg` is the name of the autoscaling group in the given region.
44
+
43
45
  ## Usage
44
46
 
45
47
  Instead of using Capistrano's `server` method, use `autoscale` instead in `deploy/production.rb` (or
@@ -57,17 +59,21 @@ autoscale 'asg-app', user: 'apps', roles: [:app, :web]
57
59
  autoscale 'asg-db', user: 'apps', roles: [:db]
58
60
  ```
59
61
 
60
- Similarly, if you are deploying to multiple regions:
62
+ Similarly, if you are deploying to multiple regions and/or multiple ASGs:
61
63
 
62
64
  ```ruby
65
+ asgs = %w(asg1 asg2)
63
66
  regions = %w(us-east-1 eu-west-1)
64
67
 
65
- regions.each do |region|
66
- set :aws_region, region
67
- set region.to_sym, {
68
- aws_autoscale_instance_size: 't2.medium'
69
- }
70
- autoscale 'production', user: 'apps', roles: [:app, :web, :db]
68
+ asgs.each do |asg|
69
+ regions.each do |region|
70
+ set :aws_region, region
71
+ set "#{region}_#{asg}".to_sym, {
72
+ aws_autoscale_instance_size: 't2.medium'
73
+ ...
74
+ }
75
+ autoscale asg, user: 'apps', roles: [:app, :web, :db]
76
+ end
71
77
  end
72
78
  ```
73
79
 
@@ -19,7 +19,7 @@ namespace :asg do
19
19
  set :aws_autoscale_group, asg
20
20
  Capistrano::Asg::AMI.create do |ami|
21
21
  puts "Autoscaling: Created AMI: #{ami.aws_counterpart.id} from region #{region} in ASG #{asg}"
22
- Capistrano::Asg::LaunchConfiguration.create(ami, fetch(region.to_sym, {})) do |lc|
22
+ Capistrano::Asg::LaunchConfiguration.create(ami, fetch("#{region}_#{asg}".to_sym, {})) do |lc|
23
23
  puts "Autoscaling: Created Launch Configuration: #{lc.aws_counterpart.name} from region #{region} in ASG #{asg}"
24
24
  asg_launch_config[region][asg] = lc.aws_counterpart.name
25
25
  asg_ami_id[region][asg] = ami.aws_counterpart.id
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Capistrano
4
4
  module Asg
5
- VERSION = '0.7.0'
5
+ VERSION = '0.8.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-asg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logan Serman
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-06-06 00:00:00.000000000 Z
13
+ date: 2019-02-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -208,8 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
208
208
  - !ruby/object:Gem::Version
209
209
  version: '0'
210
210
  requirements: []
211
- rubyforge_project:
212
- rubygems_version: 2.7.3
211
+ rubygems_version: 3.0.2
213
212
  signing_key:
214
213
  specification_version: 4
215
214
  summary: Capistrano plugin for deploying to AWS AutoScale Groups.