capistrano3-autoscaling-deploy 1.6 → 2.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b79dac02957c6ad494d4e1476acc266f9aaa71ad
4
- data.tar.gz: 88c0f026ee08d9882f742d07b6b57dbebde4e558
2
+ SHA256:
3
+ metadata.gz: 80b37dff420175fe7847d0a8e616fcbaceee86faafd553f29cc3fc9f11ed89ba
4
+ data.tar.gz: 5396a17a500ea2e2207f16cef9cc195270b647dceef4e0b875a9e867ac9acdbf
5
5
  SHA512:
6
- metadata.gz: 4ec1b602504796867baf0ae4bed90ee12cd08ecb5db4ae5002534b70447901df37656d7a523f36001d52249b970390e306bd053b15d924ac585a69e5337d4e85
7
- data.tar.gz: 6ec9011c862962dc5c772afc1bbd9d038fc28a69ae6823782cce899c769cdd9483025693d438a30b90fa2a2b06fd76d40581ab3adc996ece933b97922d78866f
6
+ metadata.gz: '0784cd784c2554a2ad8afc79384229cb6b938e7b2972ab9a5ed1174dcc4eba09cf4f388e70b38c76539cc9cc23a6f63e5530ceb6924392697c82f0cba9f29875'
7
+ data.tar.gz: e623f922647eb9352ff97301efea89aee135a1df2e2bfbd2210f661e164f8245ad0044fd889eeb34066ab8150c2a44e3ad5fd0ee6f6f5008ac9bb8c99d49d22b
data/CHANGELOG.md ADDED
@@ -0,0 +1,30 @@
1
+ # Changelog
2
+
3
+ ## 2.0.0
4
+
5
+ First release since 1.6 (2017). See [Upgrading to 2.0](README.md#upgrading-to-20) before updating.
6
+
7
+ ### Breaking changes
8
+ - Uses the current AWS SDK for Ruby (`aws-sdk-autoscaling` and `aws-sdk-ec2`) instead of the retired `aws-sdk` v2 ([#10](https://github.com/marcoschicote/capistrano3-autoscaling-deploy/issues/10)).
9
+ - No longer depends on or loads `capistrano-bundler`. Add it to your own Gemfile and Capfile if your deploy runs `bundle install` ([#11](https://github.com/marcoschicote/capistrano3-autoscaling-deploy/issues/11)).
10
+ - Only deploys to instances whose lifecycle state is `InService` ([#13](https://github.com/marcoschicote/capistrano3-autoscaling-deploy/issues/13)).
11
+ - Stops the deploy with an error if the Auto Scaling group doesn't exist or has no matching instances ([#13](https://github.com/marcoschicote/capistrano3-autoscaling-deploy/issues/13)).
12
+ - Requires Ruby 3.3 or newer.
13
+
14
+ ### Added
15
+ - Uses the AWS SDK's default credential chain (environment variables, shared config files, SSO, ECS and EC2 roles) when `aws_access_key_id` and `aws_secret_access_key` aren't set ([#12](https://github.com/marcoschicote/capistrano3-autoscaling-deploy/issues/12)).
16
+ - `aws_profile` setting to use a named AWS profile ([#12](https://github.com/marcoschicote/capistrano3-autoscaling-deploy/issues/12)).
17
+ - `aws_lifecycle_states` setting to choose which lifecycle states to deploy to ([#13](https://github.com/marcoschicote/capistrano3-autoscaling-deploy/issues/13)).
18
+
19
+ ### Fixed
20
+ - With the default roles, or roles given as strings, every instance got the `db` role instead of only the first one ([#19](https://github.com/marcoschicote/capistrano3-autoscaling-deploy/issues/19)).
21
+ - Setting only one of `aws_access_key_id` and `aws_secret_access_key` now raises a clear error instead of sending a `nil` key ([#12](https://github.com/marcoschicote/capistrano3-autoscaling-deploy/issues/12)).
22
+ - Instances are looked up in one EC2 call instead of one call per instance ([#10](https://github.com/marcoschicote/capistrano3-autoscaling-deploy/issues/10)).
23
+
24
+ ### Development
25
+ - Real test suite using the AWS SDK's stubbed responses, run on GitHub Actions for Ruby 3.3, 3.4 and 4.0 ([#14](https://github.com/marcoschicote/capistrano3-autoscaling-deploy/issues/14)).
26
+ - Releases are published to RubyGems from GitHub Actions with trusted publishing.
27
+
28
+ ## 1.6 and earlier
29
+
30
+ See the [commit history](https://github.com/marcoschicote/capistrano3-autoscaling-deploy/commits/master).
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/capistrano3-autoscaling-deploy.png)](http://badge.fury.io/rb/capistrano3-autoscaling-deploy)
2
+ [![Test](https://github.com/marcoschicote/capistrano3-autoscaling-deploy/actions/workflows/test.yml/badge.svg)](https://github.com/marcoschicote/capistrano3-autoscaling-deploy/actions/workflows/test.yml)
2
3
  # capistrano3-autoscaling-deploy
3
4
  Capistrano 3 plugin for AWS Auto Scaling deploys.
4
5
 
@@ -11,7 +12,8 @@ Capistrano 3 plugin for AWS Auto Scaling deploys.
11
12
 
12
13
  ## Requirements
13
14
 
14
- * aws-sdk ~> 2
15
+ * aws-sdk-autoscaling ~> 1
16
+ * aws-sdk-ec2 ~> 1
15
17
  * capistrano ~> 3
16
18
 
17
19
 
@@ -35,14 +37,28 @@ Add this line to your application's Capfile:
35
37
  require 'capistrano/autoscaling_deploy'
36
38
  ```
37
39
 
40
+ ### Upgrading to 2.0
41
+
42
+ 2.0 uses the current AWS SDK for Ruby (`aws-sdk-autoscaling` and `aws-sdk-ec2`) instead of the retired `aws-sdk` v2, so it no longer installs `aws-sdk` v2. If your own deploy code uses `aws-sdk` v2, add it to your Gemfile or, better, move that code to the current SDK.
43
+
44
+ 2.0 only deploys to instances whose lifecycle state is `InService`, and stops with an error if the Auto Scaling group doesn't exist or has no such instances. Before, it deployed to every instance in the group, including ones being launched or terminated, and carried on with no servers if the group was empty. To also deploy to other states, set `aws_lifecycle_states` (for example `%w(InService Standby)`).
45
+
46
+ Versions before 2.0 also loaded [capistrano-bundler](https://github.com/capistrano/bundler), which runs `bundle install` on your servers during deploy. 2.0 no longer does this. If your deploy relies on it, add it to your Gemfile:
47
+
48
+ gem 'capistrano-bundler'
49
+
50
+ and require it in your Capfile:
51
+
52
+ ```ruby
53
+ require 'capistrano/bundler'
54
+ ```
55
+
38
56
  ## Usage
39
57
 
40
- Set credentials with AmazonEC2ReadOnlyAccess permission in the capistrano deploy script / stage files add the following lines
58
+ In the capistrano deploy script / stage files add the following lines
41
59
 
42
60
  ```ruby
43
61
  set :aws_region, 'us-west-2'
44
- set :aws_access_key_id, 'YOUR AWS KEY ID'
45
- set :aws_secret_access_key, 'YOUR AWS SECRET KEY'
46
62
  set :aws_autoscaling_group_name, 'YOUR NAME OF AUTO SCALING GROUP NAME'
47
63
  set :aws_deploy_roles, [:app, :web, :db]
48
64
  set :aws_deploy_user, 'USER FOR SSH CONNECTION'
@@ -50,13 +66,38 @@ set :aws_deploy_user, 'USER FOR SSH CONNECTION'
50
66
  # optional: defaults to 'public_dns_name'
51
67
  # select from ['public_ip_address', 'public_dns_name', 'private_ip_address', 'private_dns_name']
52
68
  set :aws_ip_type, 'public_dns_name'
69
+
70
+ # optional: defaults to %w(InService)
71
+ # lifecycle states of the instances to deploy to
72
+ set :aws_lifecycle_states, %w(InService)
73
+ ```
74
+
75
+ ### AWS credentials
76
+
77
+ The credentials need read access to Auto Scaling and EC2 (`autoscaling:DescribeAutoScalingGroups` and `ec2:DescribeInstances`; the `AmazonEC2ReadOnlyAccess` managed policy covers both).
78
+
79
+ By default the gem uses the [AWS SDK's default credential chain](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/credential-providers.html): environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`), `AWS_PROFILE` and the shared config and credentials files, AWS SSO, and ECS task or EC2 instance roles. This is the recommended setup, and it needs no settings.
80
+
81
+ To use a specific profile from your shared config:
82
+
83
+ ```ruby
84
+ set :aws_profile, 'deploy'
85
+ ```
86
+
87
+ You can still set static keys, but avoid committing them to your repository. If both are set they take precedence over `aws_profile`:
88
+
89
+ ```ruby
90
+ set :aws_access_key_id, ENV['DEPLOY_AWS_ACCESS_KEY_ID']
91
+ set :aws_secret_access_key, ENV['DEPLOY_AWS_SECRET_ACCESS_KEY']
53
92
  ```
54
93
 
55
94
  you can add more auto scaling configs to deploy to multiple auto scaling groups like a cluster
56
95
 
57
96
  ## How this works
58
97
 
59
- This gem will fetch only running instances that have an auto scaling tag name you specified
98
+ This gem fetches the instances in the Auto Scaling group you specified and keeps only those whose [lifecycle state](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-lifecycle.html) is in `aws_lifecycle_states` (`InService` by default). Instances that are still launching, on standby or being terminated are skipped. It doesn't filter on health status, so you can still deploy a fix when every instance is failing its health checks.
99
+
100
+ The deploy stops with an error if the group doesn't exist or has no matching instances.
60
101
 
61
102
  It will then reject the roles of :db and the :primary => true for all servers found **but the first one**
62
103
 
@@ -74,11 +115,17 @@ server ip_address3, :app, :web
74
115
 
75
116
  ## Contributing
76
117
 
77
- 1. Fork it ( http://github.com/mchicote/capistrano3-autoscaling-deploy/fork )
118
+ 1. Fork it ( https://github.com/marcoschicote/capistrano3-autoscaling-deploy/fork )
78
119
  2. Create your feature branch (`git checkout -b my-new-feature`)
79
120
  3. Commit your changes (`git commit -am 'Add some feature'`)
80
121
  4. Push to the branch (`git push origin my-new-feature`)
81
122
  5. Create new Pull Request
82
123
 
83
- To test while developoing just `bundle console` on the project root directory and execute
84
- `Capistrano::AutoScalingDeploy::VERSION` for a quick test
124
+ Run the tests with `bundle exec rake test`. They use the AWS SDK's stubbed responses, so they don't need AWS credentials or network access.
125
+
126
+ ## Releasing
127
+
128
+ Releases are published to RubyGems from GitHub Actions using [trusted publishing](https://guides.rubygems.org/trusted-publishing/), so no API key is stored anywhere.
129
+
130
+ 1. Update the version in `lib/capistrano/autoscaling_deploy/version.rb` and add a section to `CHANGELOG.md`, and merge them to `master`.
131
+ 2. In the repository's **Actions** tab, run the **Release** workflow on `master`. It runs the tests, builds the gem, pushes the `vX.Y.Z` tag and publishes the gem.
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module AutoScalingDeploy
3
- VERSION = '1.6'
3
+ VERSION = '2.0.0'
4
4
  end
5
5
  end
@@ -1,2 +1 @@
1
- require 'capistrano/bundler'
2
1
  load File.expand_path('../tasks/autoscaling.rake', __FILE__)
@@ -1,36 +1,65 @@
1
- require 'aws-sdk'
1
+ require 'aws-sdk-autoscaling'
2
+ require 'aws-sdk-ec2'
2
3
 
3
4
  module AwsHelper
4
5
  IP_TYPES = %w(public_ip_address public_dns_name private_ip_address private_dns_name)
6
+ LIFECYCLE_STATES = %w(InService)
5
7
 
6
- def get_instances(aws_region, aws_access_key_id, aws_secret_access_key, aws_autoscaling_group_name, aws_ip_type)
7
- aws_credentials = Aws::Credentials.new(aws_access_key_id, aws_secret_access_key)
8
- retrieve_ec2_instances(aws_region, aws_autoscaling_group_name, aws_credentials, aws_ip_type)
8
+ def get_instances(aws_region, aws_access_key_id, aws_secret_access_key, aws_autoscaling_group_name, aws_ip_type, aws_profile: nil, lifecycle_states: LIFECYCLE_STATES)
9
+ client_options = aws_client_options(aws_region, aws_access_key_id, aws_secret_access_key, aws_profile)
10
+ retrieve_ec2_instances(client_options, aws_autoscaling_group_name, aws_ip_type, lifecycle_states)
11
+ end
12
+
13
+ # Explicit keys win, then a named profile. With neither, the SDK's default
14
+ # credential chain is used: environment variables, shared config and
15
+ # credentials files, SSO, and ECS or EC2 instance roles.
16
+ def aws_client_options(aws_region, aws_access_key_id, aws_secret_access_key, aws_profile = nil)
17
+ options = { region: aws_region }
18
+
19
+ if aws_access_key_id && aws_secret_access_key
20
+ options[:credentials] = Aws::Credentials.new(aws_access_key_id, aws_secret_access_key)
21
+ elsif aws_access_key_id || aws_secret_access_key
22
+ raise ArgumentError, 'Set both :aws_access_key_id and :aws_secret_access_key, or neither to use the default AWS credential chain'
23
+ elsif aws_profile
24
+ options[:profile] = aws_profile
25
+ end
26
+
27
+ options
9
28
  end
10
29
 
11
30
  private
12
31
 
13
- def retrieve_ec2_instances(aws_region, autoscaling_group_name, aws_credentials, aws_ip_type)
14
- instances = fetch_autoscaling_group_instances(aws_region, autoscaling_group_name, aws_credentials)
32
+ def retrieve_ec2_instances(client_options, autoscaling_group_name, aws_ip_type, lifecycle_states)
33
+ instances = fetch_autoscaling_group_instances(client_options, autoscaling_group_name)
34
+
35
+ # Skip instances that are still launching, on standby or being terminated
36
+ skipped = instances.reject { |instance| lifecycle_states.include?(instance.lifecycle_state) }
37
+ skipped.each { |instance| puts("Skipping #{instance.instance_id} (#{instance.lifecycle_state})") }
38
+ instances -= skipped
15
39
 
16
40
  if instances.empty?
17
41
  autoscaling_dns = []
18
42
  else
19
43
  instance_ids = instances.map(&:instance_id)
20
- ec2 = Aws::EC2::Resource.new(region: aws_region, credentials: aws_credentials)
44
+ ec2 = Aws::EC2::Client.new(client_options)
21
45
  # info("Auto Scaling Group instances ids: #{instance_ids}")
22
46
  aws_ip_type = 'public_dns_name' unless IP_TYPES.include? aws_ip_type
23
-
47
+
48
+ ec2_instances = ec2.describe_instances(instance_ids: instance_ids).flat_map do |page|
49
+ page.reservations.flat_map(&:instances)
50
+ end.to_h { |instance| [instance.instance_id, instance] }
51
+
52
+ # Keep the Auto Scaling group's order: the first instance gets the primary roles
24
53
  autoscaling_dns = instance_ids.map do |instance_id|
25
- ec2.instance(instance_id).send(aws_ip_type.to_sym)
54
+ ec2_instances.fetch(instance_id).send(aws_ip_type.to_sym)
26
55
  end
27
56
  end
28
57
 
29
58
  autoscaling_dns
30
59
  end
31
60
 
32
- def fetch_autoscaling_group_instances(aws_region, autoscaling_group_name, aws_credentials)
33
- as = Aws::AutoScaling::Client.new(region: aws_region, credentials: aws_credentials)
61
+ def fetch_autoscaling_group_instances(client_options, autoscaling_group_name)
62
+ as = Aws::AutoScaling::Client.new(client_options)
34
63
  as_groups = as.describe_auto_scaling_groups(
35
64
  auto_scaling_group_names: [autoscaling_group_name],
36
65
  max_records: 1,
@@ -39,6 +68,7 @@ module AwsHelper
39
68
  # info("Auto Scaling Groups: #{as_groups}")
40
69
 
41
70
  as_group = as_groups[0]
71
+ raise "Auto Scaling group '#{autoscaling_group_name}' not found in #{client_options[:region]}" unless as_group
42
72
 
43
73
  # info("Auto Scaling Group instances: #{as_group.instances}")
44
74
 
@@ -1,7 +1,12 @@
1
1
  module CapHelper
2
+ # Role names can be given as strings (e.g. %w{web app db}); compare them as symbols
3
+ def symbolize_roles(roles)
4
+ roles.map { |role| role.is_a?(String) ? role.to_sym : role }
5
+ end
6
+
2
7
  def sanitize_roles(roles)
3
8
  # remove :db (for migrations), remove :primary => :true (for assets precompile)
4
- roles.inject([]){|acc, role|
9
+ symbolize_roles(roles).inject([]){|acc, role|
5
10
  if !role.is_a?(Hash)
6
11
  acc << role if role != :db
7
12
  else
@@ -5,8 +5,9 @@ namespace :load do
5
5
  task :defaults do
6
6
  set :aws_autoscaling, true
7
7
  set :aws_region, 'us-west-2'
8
- set :aws_deploy_roles, %w{web app db}
8
+ set :aws_deploy_roles, %i{web app db}
9
9
  set :aws_ip_type, 'public_dns_name'
10
+ set :aws_lifecycle_states, AwsHelper::LIFECYCLE_STATES
10
11
  end
11
12
  end
12
13
 
@@ -23,7 +24,7 @@ namespace :autoscaling_deploy do
23
24
  desc 'Add server from Auto Scaling Group.'
24
25
  task :setup_instances do
25
26
  ec2_instances = fetch_ec2_instances
26
- aws_deploy_roles = fetch(:aws_deploy_roles)
27
+ aws_deploy_roles = symbolize_roles(fetch(:aws_deploy_roles))
27
28
  aws_deploy_user = fetch(:aws_deploy_user)
28
29
 
29
30
  ec2_instances.each {|instance|
@@ -44,8 +45,14 @@ namespace :autoscaling_deploy do
44
45
  secret = fetch(:aws_secret_access_key)
45
46
  group_name = fetch(:aws_autoscaling_group_name)
46
47
  ip_type = fetch(:aws_ip_type)
48
+ profile = fetch(:aws_profile)
49
+ lifecycle_states = fetch(:aws_lifecycle_states)
47
50
 
48
- instances = get_instances(region, key, secret, group_name, ip_type)
51
+ instances = get_instances(region, key, secret, group_name, ip_type, aws_profile: profile, lifecycle_states: lifecycle_states)
52
+
53
+ if instances.empty?
54
+ raise "No instances in Auto Scaling group '#{group_name}' with lifecycle state #{lifecycle_states.join(' or ')}"
55
+ end
49
56
 
50
57
  puts("Found #{instances.count} servers (#{instances.join(',')}) for Auto Scaling Group: #{group_name} ")
51
58
 
metadata CHANGED
@@ -1,71 +1,84 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano3-autoscaling-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.6'
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos Chicote
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2017-04-02 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
- name: aws-sdk
13
+ name: aws-sdk-autoscaling
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: '2'
18
+ version: '1'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: '2'
25
+ version: '1'
27
26
  - !ruby/object:Gem::Dependency
28
- name: capistrano
27
+ name: aws-sdk-ec2
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - "~>"
32
31
  - !ruby/object:Gem::Version
33
- version: '3'
32
+ version: '1'
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - "~>"
39
38
  - !ruby/object:Gem::Version
40
- version: '3'
39
+ version: '1'
41
40
  - !ruby/object:Gem::Dependency
42
- name: capistrano-bundler
41
+ name: capistrano
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - "~>"
46
45
  - !ruby/object:Gem::Version
47
- version: 1.2.0
46
+ version: '3'
48
47
  type: :runtime
49
48
  prerelease: false
50
49
  version_requirements: !ruby/object:Gem::Requirement
51
50
  requirements:
52
51
  - - "~>"
53
52
  - !ruby/object:Gem::Version
54
- version: 1.2.0
53
+ version: '3'
55
54
  - !ruby/object:Gem::Dependency
56
55
  name: bundler
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
- - - "~>"
58
+ - - ">="
60
59
  - !ruby/object:Gem::Version
61
- version: '1.5'
60
+ version: 2.2.33
62
61
  type: :development
63
62
  prerelease: false
64
63
  version_requirements: !ruby/object:Gem::Requirement
65
64
  requirements:
66
- - - "~>"
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: 2.2.33
68
+ - !ruby/object:Gem::Dependency
69
+ name: minitest
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ type: :development
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
67
80
  - !ruby/object:Gem::Version
68
- version: '1.5'
81
+ version: '0'
69
82
  - !ruby/object:Gem::Dependency
70
83
  name: rake
71
84
  requirement: !ruby/object:Gem::Requirement
@@ -80,22 +93,17 @@ dependencies:
80
93
  - - ">="
81
94
  - !ruby/object:Gem::Version
82
95
  version: '0'
83
- description: Get all instances in an AutoScaling group by AutoScaling EC2 Tag and
84
- depoy.
96
+ description: Capistrano 3 plugin that finds the in-service instances of an AWS Auto
97
+ Scaling group and deploys to them.
85
98
  email:
86
99
  - chicotemarcos@gmail.com
87
100
  executables: []
88
101
  extensions: []
89
102
  extra_rdoc_files: []
90
103
  files:
91
- - ".gitignore"
92
- - ".travis.yml"
93
- - Gemfile
94
- - Gemfile.lock
104
+ - CHANGELOG.md
95
105
  - LICENSE
96
106
  - README.md
97
- - Rakefile
98
- - capistrano3-autoscaling-deploy.gemspec
99
107
  - lib/capistrano/autoscaling_deploy.rb
100
108
  - lib/capistrano/autoscaling_deploy/autoscaling_deploy.rb
101
109
  - lib/capistrano/autoscaling_deploy/version.rb
@@ -103,12 +111,14 @@ files:
103
111
  - lib/capistrano/helpers/cap_helper.rb
104
112
  - lib/capistrano/tasks/autoscaling.rake
105
113
  - lib/capistrano3-autoscaling-deploy.rb
106
- - test/autoscaling_test.rb
107
- homepage: https://github.com/mchicote/capistrano3-autoscaling-deploy
114
+ homepage: https://github.com/marcoschicote/capistrano3-autoscaling-deploy
108
115
  licenses:
109
116
  - MIT
110
- metadata: {}
111
- post_install_message:
117
+ metadata:
118
+ source_code_uri: https://github.com/marcoschicote/capistrano3-autoscaling-deploy
119
+ changelog_uri: https://github.com/marcoschicote/capistrano3-autoscaling-deploy/blob/master/CHANGELOG.md
120
+ bug_tracker_uri: https://github.com/marcoschicote/capistrano3-autoscaling-deploy/issues
121
+ rubygems_mfa_required: 'true'
112
122
  rdoc_options: []
113
123
  require_paths:
114
124
  - lib
@@ -116,17 +126,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
126
  requirements:
117
127
  - - ">="
118
128
  - !ruby/object:Gem::Version
119
- version: '0'
129
+ version: '3.3'
120
130
  required_rubygems_version: !ruby/object:Gem::Requirement
121
131
  requirements:
122
132
  - - ">="
123
133
  - !ruby/object:Gem::Version
124
134
  version: '0'
125
135
  requirements: []
126
- rubyforge_project:
127
- rubygems_version: 2.4.5
128
- signing_key:
136
+ rubygems_version: 4.0.20
129
137
  specification_version: 4
130
138
  summary: Deploy to AWS Auto Scaling group.
131
- test_files:
132
- - test/autoscaling_test.rb
139
+ test_files: []
data/.gitignore DELETED
@@ -1,53 +0,0 @@
1
- *.gem
2
- *.rbc
3
- /.config
4
- /coverage/
5
- /InstalledFiles
6
- /pkg/
7
- /spec/reports/
8
- /spec/examples.txt
9
- /test/tmp/
10
- /test/version_tmp/
11
- /tmp/
12
-
13
- # Used by dotenv library to load environment variables.
14
- # .env
15
-
16
- ## Specific to RubyMotion:
17
- .dat*
18
- .repl_history
19
- build/
20
- *.bridgesupport
21
- build-iPhoneOS/
22
- build-iPhoneSimulator/
23
-
24
- ## Specific to RubyMotion (use of CocoaPods):
25
- #
26
- # We recommend against adding the Pods directory to your .gitignore. However
27
- # you should judge for yourself, the pros and cons are mentioned at:
28
- # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29
- #
30
- # vendor/Pods/
31
-
32
- ## Documentation cache and generated files:
33
- /.yardoc/
34
- /_yardoc/
35
- /doc/
36
- /rdoc/
37
-
38
- ## Environment normalization:
39
- /.bundle/
40
- /vendor/bundle
41
- /lib/bundler/man/
42
-
43
- # for a library or gem, you might want to ignore these files since the code is
44
- # intended to run in multiple environments; otherwise, check them in:
45
- # Gemfile.lock
46
- # .ruby-version
47
- # .ruby-gemset
48
-
49
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
50
- .rvmrc
51
-
52
- # RubyMine folder
53
- .idea
data/.travis.yml DELETED
@@ -1,12 +0,0 @@
1
- install:
2
- - time
3
-
4
- script:
5
- - time
6
-
7
- deploy:
8
- provider: rubygems
9
- api_key: $RUBYGEMS_API_KEY
10
- on:
11
- repo: mchicote/capistrano3-autoscaling-deploy
12
- branch: master
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'http://rubygems.org'
2
-
3
- # Specify your gem's dependencies in capistrano-ec2tag.gemspec
4
- gemspec
data/Gemfile.lock DELETED
@@ -1,49 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- capistrano3-autoscaling-deploy (1.3)
5
- aws-sdk (~> 2)
6
- capistrano (~> 3)
7
- capistrano-bundler (~> 1.1.2)
8
-
9
- GEM
10
- remote: http://rubygems.org/
11
- specs:
12
- airbrussh (1.1.1)
13
- sshkit (>= 1.6.1, != 1.7.0)
14
- aws-sdk (2.6.10)
15
- aws-sdk-resources (= 2.6.10)
16
- aws-sdk-core (2.6.10)
17
- jmespath (~> 1.0)
18
- aws-sdk-resources (2.6.10)
19
- aws-sdk-core (= 2.6.10)
20
- capistrano (3.6.1)
21
- airbrussh (>= 1.0.0)
22
- capistrano-harrow
23
- i18n
24
- rake (>= 10.0.0)
25
- sshkit (>= 1.9.0)
26
- capistrano-bundler (1.1.4)
27
- capistrano (~> 3.1)
28
- sshkit (~> 1.2)
29
- capistrano-harrow (0.5.3)
30
- i18n (0.7.0)
31
- jmespath (1.3.1)
32
- net-scp (1.2.1)
33
- net-ssh (>= 2.6.5)
34
- net-ssh (3.2.0)
35
- rake (11.1.2)
36
- sshkit (1.11.3)
37
- net-scp (>= 1.1.2)
38
- net-ssh (>= 2.8.0)
39
-
40
- PLATFORMS
41
- ruby
42
-
43
- DEPENDENCIES
44
- bundler (~> 1.5)
45
- capistrano3-autoscaling-deploy!
46
- rake
47
-
48
- BUNDLED WITH
49
- 1.12.5
data/Rakefile DELETED
@@ -1 +0,0 @@
1
- require 'bundler/gem_tasks'
@@ -1,26 +0,0 @@
1
- # encoding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'capistrano/autoscaling_deploy/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = 'capistrano3-autoscaling-deploy'
8
- spec.version = Capistrano::AutoScalingDeploy::VERSION
9
- spec.authors = ['Marcos Chicote']
10
- spec.email = ['chicotemarcos@gmail.com']
11
- spec.summary = %q{Deploy to AWS Auto Scaling group.}
12
- spec.description = %q{Get all instances in an AutoScaling group by AutoScaling EC2 Tag and depoy.}
13
- spec.homepage = 'https://github.com/mchicote/capistrano3-autoscaling-deploy'
14
- spec.license = 'MIT'
15
-
16
- spec.files = `git ls-files`.split($/)
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ['lib']
20
-
21
- spec.add_dependency 'aws-sdk', '~> 2'
22
- spec.add_dependency 'capistrano', '~> 3'
23
- spec.add_dependency 'capistrano-bundler', '~> 1.2.0'
24
- spec.add_development_dependency 'bundler', '~> 1.5'
25
- spec.add_development_dependency 'rake'
26
- end
@@ -1,18 +0,0 @@
1
- require File.expand_path('../lib/localytics', File.dirname(__FILE__))
2
- require File.expand_path('test_helper', File.dirname(__FILE__))
3
-
4
- require 'cutest'
5
- require 'mocha/api'
6
- include Mocha::API
7
-
8
- prepare do
9
- # Prepare Test
10
- end
11
-
12
- setup do
13
- # Setup test
14
- end
15
-
16
- test 'autoscale' do |mock|
17
- # Do Test
18
- end