capistrano-gcp-autoscaling 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.rubocop.yml +29 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +117 -0
- data/LICENSE.txt +21 -0
- data/README.md +66 -0
- data/Rakefile +6 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/capistrano-gcp-autoscaling.gemspec +33 -0
- data/lib/capistrano/gcp/autoscaling.rb +32 -0
- data/lib/capistrano/gcp/autoscaling/core/compute_service.rb +37 -0
- data/lib/capistrano/gcp/autoscaling/core/instance.rb +45 -0
- data/lib/capistrano/gcp/autoscaling/core/instance_group_manager.rb +41 -0
- data/lib/capistrano/gcp/autoscaling/version.rb +9 -0
- data/lib/capistrano/gcp/tasks/autoscaling.rake +12 -0
- metadata +175 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ec2ae2059e98aee5d438dbba5b5752ac15af4dbbf34708e18d386462e2b9fbea
|
4
|
+
data.tar.gz: c5432d74d75e77c3d1124f1f2c8fc71d791d2c89e64413b5202ed8aea9aa3867
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 73c358b3b10b3ebfd84f6390c6a35554f2aa1d5d73d6bc7bb6cd4f58b8e1d1bd2814938f05ad1545c39dc02b80f7765520910898be68c9e73a44ae3fabb77e9d
|
7
|
+
data.tar.gz: 73c64322f6dafed4248b32b8ef3e4a46a9ca2ef6676d0192e5bd9ea144befeb1635dc3fabb1317e9530517e44686672226f3c5a0b1b1d200ad755774709e49c0
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require: rubocop-rspec
|
2
|
+
|
3
|
+
AllCops:
|
4
|
+
DisplayCopNames: true
|
5
|
+
Include:
|
6
|
+
- "**/*.rb"
|
7
|
+
- Gemfile
|
8
|
+
|
9
|
+
Metrics/BlockLength:
|
10
|
+
Exclude:
|
11
|
+
- spec/**/*
|
12
|
+
|
13
|
+
Metrics/LineLength:
|
14
|
+
Max: 120
|
15
|
+
|
16
|
+
RSpec/ExampleLength:
|
17
|
+
Max: 10
|
18
|
+
|
19
|
+
RSpec/MessageSpies:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
RSpec/NamedSubject:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
RSpec/NestedGroups:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
Style/Documentation:
|
29
|
+
Enabled: false
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
capistrano-gcp-autoscaling (0.1.0)
|
5
|
+
capistrano (~> 3.0)
|
6
|
+
google-api-client (~> 0.8)
|
7
|
+
googleauth (>= 0.6)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
addressable (2.6.0)
|
13
|
+
public_suffix (>= 2.0.2, < 4.0)
|
14
|
+
airbrussh (1.3.1)
|
15
|
+
sshkit (>= 1.6.1, != 1.7.0)
|
16
|
+
ast (2.4.0)
|
17
|
+
capistrano (3.11.0)
|
18
|
+
airbrussh (>= 1.0.0)
|
19
|
+
i18n
|
20
|
+
rake (>= 10.0.0)
|
21
|
+
sshkit (>= 1.9.0)
|
22
|
+
concurrent-ruby (1.1.5)
|
23
|
+
declarative (0.0.10)
|
24
|
+
declarative-option (0.1.0)
|
25
|
+
diff-lcs (1.3)
|
26
|
+
faraday (0.15.4)
|
27
|
+
multipart-post (>= 1.2, < 3)
|
28
|
+
google-api-client (0.28.4)
|
29
|
+
addressable (~> 2.5, >= 2.5.1)
|
30
|
+
googleauth (>= 0.5, < 0.10.0)
|
31
|
+
httpclient (>= 2.8.1, < 3.0)
|
32
|
+
mime-types (~> 3.0)
|
33
|
+
representable (~> 3.0)
|
34
|
+
retriable (>= 2.0, < 4.0)
|
35
|
+
signet (~> 0.10)
|
36
|
+
googleauth (0.8.0)
|
37
|
+
faraday (~> 0.12)
|
38
|
+
jwt (>= 1.4, < 3.0)
|
39
|
+
memoist (~> 0.16)
|
40
|
+
multi_json (~> 1.11)
|
41
|
+
os (>= 0.9, < 2.0)
|
42
|
+
signet (~> 0.7)
|
43
|
+
httpclient (2.8.3)
|
44
|
+
i18n (1.6.0)
|
45
|
+
concurrent-ruby (~> 1.0)
|
46
|
+
jaro_winkler (1.5.2)
|
47
|
+
jwt (2.1.0)
|
48
|
+
memoist (0.16.0)
|
49
|
+
mime-types (3.2.2)
|
50
|
+
mime-types-data (~> 3.2015)
|
51
|
+
mime-types-data (3.2018.0812)
|
52
|
+
multi_json (1.13.1)
|
53
|
+
multipart-post (2.0.0)
|
54
|
+
net-scp (2.0.0)
|
55
|
+
net-ssh (>= 2.6.5, < 6.0.0)
|
56
|
+
net-ssh (5.2.0)
|
57
|
+
os (1.0.0)
|
58
|
+
parallel (1.15.0)
|
59
|
+
parser (2.6.2.0)
|
60
|
+
ast (~> 2.4.0)
|
61
|
+
psych (3.1.0)
|
62
|
+
public_suffix (3.0.3)
|
63
|
+
rainbow (3.0.0)
|
64
|
+
rake (10.5.0)
|
65
|
+
representable (3.0.4)
|
66
|
+
declarative (< 0.1.0)
|
67
|
+
declarative-option (< 0.2.0)
|
68
|
+
uber (< 0.2.0)
|
69
|
+
retriable (3.1.2)
|
70
|
+
rspec (3.8.0)
|
71
|
+
rspec-core (~> 3.8.0)
|
72
|
+
rspec-expectations (~> 3.8.0)
|
73
|
+
rspec-mocks (~> 3.8.0)
|
74
|
+
rspec-core (3.8.0)
|
75
|
+
rspec-support (~> 3.8.0)
|
76
|
+
rspec-expectations (3.8.2)
|
77
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
78
|
+
rspec-support (~> 3.8.0)
|
79
|
+
rspec-mocks (3.8.0)
|
80
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
81
|
+
rspec-support (~> 3.8.0)
|
82
|
+
rspec-support (3.8.0)
|
83
|
+
rubocop (0.66.0)
|
84
|
+
jaro_winkler (~> 1.5.1)
|
85
|
+
parallel (~> 1.10)
|
86
|
+
parser (>= 2.5, != 2.5.1.1)
|
87
|
+
psych (>= 3.1.0)
|
88
|
+
rainbow (>= 2.2.2, < 4.0)
|
89
|
+
ruby-progressbar (~> 1.7)
|
90
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
91
|
+
rubocop-rspec (1.32.0)
|
92
|
+
rubocop (>= 0.60.0)
|
93
|
+
ruby-progressbar (1.10.0)
|
94
|
+
signet (0.11.0)
|
95
|
+
addressable (~> 2.3)
|
96
|
+
faraday (~> 0.9)
|
97
|
+
jwt (>= 1.5, < 3.0)
|
98
|
+
multi_json (~> 1.10)
|
99
|
+
sshkit (1.18.2)
|
100
|
+
net-scp (>= 1.1.2)
|
101
|
+
net-ssh (>= 2.8.0)
|
102
|
+
uber (0.1.0)
|
103
|
+
unicode-display_width (1.5.0)
|
104
|
+
|
105
|
+
PLATFORMS
|
106
|
+
ruby
|
107
|
+
|
108
|
+
DEPENDENCIES
|
109
|
+
bundler (~> 1.16)
|
110
|
+
capistrano-gcp-autoscaling!
|
111
|
+
rake (~> 10.0)
|
112
|
+
rspec (~> 3.0)
|
113
|
+
rubocop (~> 0.66)
|
114
|
+
rubocop-rspec (~> 1.32)
|
115
|
+
|
116
|
+
BUNDLED WITH
|
117
|
+
1.16.6
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Aleksei Vorobyov
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
# Capistrano::Gcp::Autoscaling
|
2
|
+
|
3
|
+
We were inspired by https://github.com/lserman/capistrano-elbas.
|
4
|
+
The gem helps deploy code to the all instances of the provided instance group.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'capistrano-gcp-autoscaling'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install capistrano-gcp-autoscaling
|
21
|
+
|
22
|
+
Add this line to Capfile
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'capistrano/gcp/autoscaling'
|
26
|
+
```
|
27
|
+
|
28
|
+
## Configuration
|
29
|
+
|
30
|
+
The gem uses a service account to get an access to GCP.
|
31
|
+
Read the documentation (https://cloud.google.com/iam/docs/creating-managing-service-accounts) if you don't know how to create it.
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
set :gcp_project_id, nil
|
35
|
+
set :gcp_region, nil
|
36
|
+
set :gcp_filter, '(status eq "RUNNING")'
|
37
|
+
set :gcp_scope, 'https://www.googleapis.com/auth/compute'
|
38
|
+
set :gcp_private_key, ENV['GCP_PRIVATE_KEY']
|
39
|
+
set :gcp_client_email, ENV['GCP_CLIENT_EMAIL']
|
40
|
+
```
|
41
|
+
|
42
|
+
## Usage
|
43
|
+
|
44
|
+
To provide an instance group, go to deploy/<stage>.rb and instead of server write the next line:
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
instance_group_manager 'my-instance-group-manager1', user: 'apps', roles: %i(app web db)
|
48
|
+
|
49
|
+
instance_group_manager 'my-instance-group-manager2' do |_instance, index|
|
50
|
+
index.zero? ? { user: 'apps', roles: %i(app web db) } : { user: 'apps', roles: %i(app web) }
|
51
|
+
end
|
52
|
+
```
|
53
|
+
|
54
|
+
## Development
|
55
|
+
|
56
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
57
|
+
|
58
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
59
|
+
|
60
|
+
## Contributing
|
61
|
+
|
62
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/a3.vorobyov/capistrano-gcp-autoscaling.
|
63
|
+
|
64
|
+
## License
|
65
|
+
|
66
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'capistrano/gcp/autoscaling'
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require 'irb'
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'capistrano/gcp/autoscaling/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'capistrano-gcp-autoscaling'
|
7
|
+
spec.version = Capistrano::Gcp::Autoscaling::VERSION
|
8
|
+
spec.authors = ['Aleksei Vorobyov']
|
9
|
+
spec.email = ['effypad@gmail.com']
|
10
|
+
|
11
|
+
spec.summary = 'Capistrano plugin for deploying to GCP instance groups'
|
12
|
+
spec.description = spec.summary
|
13
|
+
spec.homepage = 'https://github.com/a3vorobyov/capistrano-gcp-autoscaling'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
# Specify which files should be added to the gem when it is released.
|
17
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
19
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
end
|
21
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ['lib']
|
23
|
+
|
24
|
+
spec.add_development_dependency 'bundler', '~> 1.16'
|
25
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
26
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
27
|
+
spec.add_development_dependency 'rubocop', '~> 0.66'
|
28
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 1.32'
|
29
|
+
|
30
|
+
spec.add_dependency 'capistrano', '~> 3.0'
|
31
|
+
spec.add_dependency 'google-api-client', '~> 0.8'
|
32
|
+
spec.add_dependency 'googleauth', '>= 0.6'
|
33
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'googleauth'
|
4
|
+
require 'google/apis/compute_v1'
|
5
|
+
require 'capistrano/gcp/autoscaling/core/compute_service'
|
6
|
+
require 'capistrano/gcp/autoscaling/core/instance'
|
7
|
+
require 'capistrano/gcp/autoscaling/core/instance_group_manager'
|
8
|
+
|
9
|
+
load File.expand_path('tasks/autoscaling.rake', __dir__)
|
10
|
+
|
11
|
+
def compute_service
|
12
|
+
@compute_service ||= Capistrano::Gcp::Autoscaling::Core::ComputeService.new(
|
13
|
+
gcp_project_id: fetch(:gcp_project_id),
|
14
|
+
gcp_private_key: fetch(:gcp_private_key),
|
15
|
+
gcp_client_email: fetch(:gcp_client_email),
|
16
|
+
gcp_scope: fetch(:gcp_scope)
|
17
|
+
).instance
|
18
|
+
end
|
19
|
+
|
20
|
+
def instance_group_manager(group_manager_name, properties = {})
|
21
|
+
instance_group_manager = Capistrano::Gcp::Autoscaling::Core::InstanceGroupManager.new(
|
22
|
+
compute_service,
|
23
|
+
gcp_project_id: fetch(:gcp_project_id),
|
24
|
+
gcp_region: fetch(:gcp_region),
|
25
|
+
gcp_filter: fetch(:gcp_filter),
|
26
|
+
group_manager_name: group_manager_name
|
27
|
+
)
|
28
|
+
|
29
|
+
instance_group_manager.instances.each_with_index do |instance, index|
|
30
|
+
server instance.network_ip, block_given? ? yield(instance, index) : properties
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Capistrano
|
4
|
+
module Gcp
|
5
|
+
module Autoscaling
|
6
|
+
module Core
|
7
|
+
class ComputeService
|
8
|
+
def initialize(options = {})
|
9
|
+
@options = options
|
10
|
+
end
|
11
|
+
|
12
|
+
def instance
|
13
|
+
@instance ||= Google::Apis::ComputeV1::ComputeService.new.tap do |instance|
|
14
|
+
ensure_env_variables_set!
|
15
|
+
ensure_authorization_set!(instance)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
attr_reader :options
|
22
|
+
|
23
|
+
def ensure_env_variables_set!
|
24
|
+
ENV[Google::Auth::CredentialsLoader::PRIVATE_KEY_VAR] = options.fetch(:gcp_private_key)
|
25
|
+
ENV[Google::Auth::CredentialsLoader::CLIENT_EMAIL_VAR] = options.fetch(:gcp_client_email)
|
26
|
+
end
|
27
|
+
|
28
|
+
def ensure_authorization_set!(instance)
|
29
|
+
instance.authorization = Google::Auth::ServiceAccountCredentials.make_creds(
|
30
|
+
scope: options.fetch(:gcp_scope)
|
31
|
+
)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Capistrano
|
4
|
+
module Gcp
|
5
|
+
module Autoscaling
|
6
|
+
module Core
|
7
|
+
class Instance
|
8
|
+
INSTANCE_PATTERN = %r{/instances/[\w-]+}.freeze
|
9
|
+
ZONE_PATTERN = %r{/zones/[\w-]+}.freeze
|
10
|
+
SEPARATOR = '/'.freeze
|
11
|
+
|
12
|
+
def initialize(compute_service, managed_instance, options = {})
|
13
|
+
@compute_service = compute_service
|
14
|
+
@managed_instance = managed_instance
|
15
|
+
@options = options
|
16
|
+
end
|
17
|
+
|
18
|
+
def network_ip
|
19
|
+
instance.network_interfaces.first.network_ip
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
attr_reader :compute_service, :managed_instance, :options
|
25
|
+
|
26
|
+
def instance
|
27
|
+
compute_service.get_instance(options.fetch(:gcp_project_id), instance_zone, instance_name)
|
28
|
+
end
|
29
|
+
|
30
|
+
def instance_zone
|
31
|
+
parse_managed_instance(ZONE_PATTERN)
|
32
|
+
end
|
33
|
+
|
34
|
+
def instance_name
|
35
|
+
parse_managed_instance(INSTANCE_PATTERN)
|
36
|
+
end
|
37
|
+
|
38
|
+
def parse_managed_instance(pattern, separator = SEPARATOR)
|
39
|
+
managed_instance.instance.scan(pattern).last.split(separator).last
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Capistrano
|
4
|
+
module Gcp
|
5
|
+
module Autoscaling
|
6
|
+
module Core
|
7
|
+
class InstanceGroupManager
|
8
|
+
def initialize(compute_service, options = {})
|
9
|
+
@compute_service = compute_service
|
10
|
+
@options = options
|
11
|
+
end
|
12
|
+
|
13
|
+
def instances
|
14
|
+
group_manager.managed_instances.map(&method(:instance_for))
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
attr_reader :compute_service, :options
|
20
|
+
|
21
|
+
def instance_for(managed_instance)
|
22
|
+
Capistrano::Gcp::Autoscaling::Core::Instance.new(
|
23
|
+
compute_service,
|
24
|
+
managed_instance,
|
25
|
+
gcp_project_id: options.fetch(:gcp_project_id)
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
29
|
+
def group_manager
|
30
|
+
compute_service.list_region_instance_group_manager_managed_instances(
|
31
|
+
options.fetch(:gcp_project_id),
|
32
|
+
options.fetch(:gcp_region),
|
33
|
+
options.fetch(:group_manager_name),
|
34
|
+
filter: options.fetch(:gcp_filter)
|
35
|
+
)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
namespace :load do
|
4
|
+
task :defaults do
|
5
|
+
set :gcp_project_id, nil
|
6
|
+
set :gcp_region, nil
|
7
|
+
set :gcp_filter, '(status eq "RUNNING")'
|
8
|
+
set :gcp_scope, 'https://www.googleapis.com/auth/compute'
|
9
|
+
set :gcp_private_key, ENV['GCP_PRIVATE_KEY']
|
10
|
+
set :gcp_client_email, ENV['GCP_CLIENT_EMAIL']
|
11
|
+
end
|
12
|
+
end
|
metadata
ADDED
@@ -0,0 +1,175 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-gcp-autoscaling
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Aleksei Vorobyov
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-03-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.66'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.66'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop-rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.32'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.32'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: capistrano
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: google-api-client
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.8'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.8'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: googleauth
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.6'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.6'
|
125
|
+
description: Capistrano plugin for deploying to GCP instance groups
|
126
|
+
email:
|
127
|
+
- effypad@gmail.com
|
128
|
+
executables:
|
129
|
+
- console
|
130
|
+
- setup
|
131
|
+
extensions: []
|
132
|
+
extra_rdoc_files: []
|
133
|
+
files:
|
134
|
+
- ".gitignore"
|
135
|
+
- ".rspec"
|
136
|
+
- ".rubocop.yml"
|
137
|
+
- Gemfile
|
138
|
+
- Gemfile.lock
|
139
|
+
- LICENSE.txt
|
140
|
+
- README.md
|
141
|
+
- Rakefile
|
142
|
+
- bin/console
|
143
|
+
- bin/setup
|
144
|
+
- capistrano-gcp-autoscaling.gemspec
|
145
|
+
- lib/capistrano/gcp/autoscaling.rb
|
146
|
+
- lib/capistrano/gcp/autoscaling/core/compute_service.rb
|
147
|
+
- lib/capistrano/gcp/autoscaling/core/instance.rb
|
148
|
+
- lib/capistrano/gcp/autoscaling/core/instance_group_manager.rb
|
149
|
+
- lib/capistrano/gcp/autoscaling/version.rb
|
150
|
+
- lib/capistrano/gcp/tasks/autoscaling.rake
|
151
|
+
homepage: https://github.com/a3vorobyov/capistrano-gcp-autoscaling
|
152
|
+
licenses:
|
153
|
+
- MIT
|
154
|
+
metadata: {}
|
155
|
+
post_install_message:
|
156
|
+
rdoc_options: []
|
157
|
+
require_paths:
|
158
|
+
- lib
|
159
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - ">="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
164
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '0'
|
169
|
+
requirements: []
|
170
|
+
rubyforge_project:
|
171
|
+
rubygems_version: 2.7.8
|
172
|
+
signing_key:
|
173
|
+
specification_version: 4
|
174
|
+
summary: Capistrano plugin for deploying to GCP instance groups
|
175
|
+
test_files: []
|