capistrano-asg 0.7.0 → 0.8.0
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/CHANGELOG.md +13 -0
- data/README.md +14 -8
- data/lib/capistrano/asg/tasks/asg.rake +1 -1
- data/lib/capistrano/asg/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af650b3a82db3a47faf36f7c6f63a94d67d43c8f02a0855e6eaa43a9d03bef6b
|
4
|
+
data.tar.gz: 96b6c111b9bd50b4700f83fe80edef7071c88819dcd39f306d174cec9fcb6da3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40af09ca069d13101ffb069f488f1dc9753ccf451f4d938e3fdaf7f5f2484f9617861423499b7951e59184aff407ee4eb24afd84130c37e9c985a9045123eec3
|
7
|
+
data.tar.gz: 7612f33c757b9b20b32f1a1b3323dbad84edcb9e21bc0e4dc763ec54fd4a0eafd7108222bea4440c21b071c1f63134856236eed97c84615b9ebc66e1d06b4f2e
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
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
|
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.
|
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:
|
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
|
-
|
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.
|