gaptool-server 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,23 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ group :development do
9
+ gem "shoulda", ">= 0"
10
+ gem "rdoc", ">= 0"
11
+ gem "bundler", ">= 0"
12
+ gem "jeweler", "~> 1.8.4"
13
+ gem "simplecov", ">= 0"
14
+ gem "shotgun", ">= 0"
15
+ gem "pry", ">= 0"
16
+ end
17
+
18
+ gem 'sinatra'
19
+ gem 'thin'
20
+ gem 'redis'
21
+ gem 'aws-sdk'
22
+ gem 'net-ssh'
23
+ gem 'peach'
@@ -0,0 +1,83 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ activesupport (3.2.9)
5
+ i18n (~> 0.6)
6
+ multi_json (~> 1.0)
7
+ aws-sdk (1.7.1)
8
+ httparty (~> 0.7)
9
+ json (~> 1.4)
10
+ nokogiri (>= 1.4.4)
11
+ uuidtools (~> 2.1)
12
+ coderay (1.0.8)
13
+ daemons (1.1.9)
14
+ eventmachine (1.0.0)
15
+ git (1.2.5)
16
+ httparty (0.9.0)
17
+ multi_json (~> 1.0)
18
+ multi_xml
19
+ i18n (0.6.1)
20
+ jeweler (1.8.4)
21
+ bundler (~> 1.0)
22
+ git (>= 1.2.5)
23
+ rake
24
+ rdoc
25
+ json (1.7.5)
26
+ method_source (0.8.1)
27
+ multi_json (1.3.7)
28
+ multi_xml (0.5.1)
29
+ net-ssh (2.6.2)
30
+ nokogiri (1.5.5)
31
+ peach (0.5.1)
32
+ pry (0.9.10)
33
+ coderay (~> 1.0.5)
34
+ method_source (~> 0.8)
35
+ slop (~> 3.3.1)
36
+ rack (1.4.1)
37
+ rack-protection (1.2.0)
38
+ rack
39
+ rake (10.0.2)
40
+ rdoc (3.12)
41
+ json (~> 1.4)
42
+ redis (3.0.2)
43
+ shotgun (0.9)
44
+ rack (>= 1.0)
45
+ shoulda (3.3.2)
46
+ shoulda-context (~> 1.0.1)
47
+ shoulda-matchers (~> 1.4.1)
48
+ shoulda-context (1.0.1)
49
+ shoulda-matchers (1.4.1)
50
+ activesupport (>= 3.0.0)
51
+ simplecov (0.7.1)
52
+ multi_json (~> 1.0)
53
+ simplecov-html (~> 0.7.1)
54
+ simplecov-html (0.7.1)
55
+ sinatra (1.3.3)
56
+ rack (~> 1.3, >= 1.3.6)
57
+ rack-protection (~> 1.2)
58
+ tilt (~> 1.3, >= 1.3.3)
59
+ slop (3.3.3)
60
+ thin (1.5.0)
61
+ daemons (>= 1.0.9)
62
+ eventmachine (>= 0.12.6)
63
+ rack (>= 1.0.0)
64
+ tilt (1.3.3)
65
+ uuidtools (2.1.3)
66
+
67
+ PLATFORMS
68
+ ruby
69
+
70
+ DEPENDENCIES
71
+ aws-sdk
72
+ bundler
73
+ jeweler (~> 1.8.4)
74
+ net-ssh
75
+ peach
76
+ pry
77
+ rdoc
78
+ redis
79
+ shotgun
80
+ shoulda
81
+ simplecov
82
+ sinatra
83
+ thin
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1 @@
1
+ web: bundle exec ruby web.rb -p $PORT
@@ -0,0 +1,19 @@
1
+ = gaptool-server
2
+
3
+ Description goes here.
4
+
5
+ == Contributing to gaptool-server
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
9
+ * Fork the project.
10
+ * Start a feature/bugfix branch.
11
+ * Commit and push until you are happy with your contribution.
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2012 Matt Bailey. See LICENSE.txt for
18
+ further details.
19
+
@@ -0,0 +1,129 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "gaptool-server"
18
+ gem.homepage = "http://github.com/mattbailey/gaptool-server"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{gaptool-server for managing cloud resources}
21
+ gem.description = %Q{gaptool-server for managing cloud resources}
22
+ gem.email = "m@mdb.io"
23
+ gem.authors = ["Matt Bailey"]
24
+ gem.executables = ['gaptool-server']
25
+ gem.default_executable = 'gaptool-server'
26
+ # dependencies defined in Gemfile
27
+ end
28
+ Jeweler::RubygemsDotOrgTasks.new
29
+
30
+ require 'rake/testtask'
31
+ Rake::TestTask.new(:test) do |test|
32
+ test.libs << 'lib' << 'test'
33
+ test.pattern = 'test/**/test_*.rb'
34
+ test.verbose = true
35
+ end
36
+
37
+ task :default => :test
38
+
39
+ require 'rdoc/task'
40
+ Rake::RDocTask.new do |rdoc|
41
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
42
+
43
+ rdoc.rdoc_dir = 'rdoc'
44
+ rdoc.title = "gaptool-server #{version}"
45
+ rdoc.rdoc_files.include('README*')
46
+ rdoc.rdoc_files.include('lib/**/*.rb')
47
+ end
48
+
49
+ namespace :dev do
50
+ require 'pry'
51
+ require 'yaml'
52
+ require 'redis'
53
+ require 'aws-sdk'
54
+ YAML::ENGINE.yamler='syck'
55
+ task :shell do
56
+ $stderr.puts "env vars REDIS_HOST, REDIS_PORT, and REDIS_PASS should all be set or\ndefaults of localhost:6379 with no password will be used"
57
+ ENV['REDIS_HOST'] = 'localhost' unless ENV['REDIS_HOST']
58
+ ENV['REDIS_PORT'] = '6379' unless ENV['REDIS_PORT']
59
+ ENV['REDIS_PASS'] = nil unless ENV['REDIS_PASS']
60
+ @redis = Redis.new(:host => ENV['REDIS_HOST'], :port => ENV['REDIS_PORT'], :password => ENV['REDIS_PASS'])
61
+ $stderr.puts "@redis available"
62
+ if @redis.hget('config', 'aws_id' ) && @redis.hget('config', 'aws_secret')
63
+ if !ENV['AWS_ZONE']
64
+ print "Shortname aws zone? "
65
+ zone = $stdin.gets.chomp
66
+ else
67
+ zone = ENV['AWS_ZONE']
68
+ end
69
+ AWS.config(:access_key_id => @redis.hget('config', 'aws_id'), :secret_access_key => @redis.hget('config', 'aws_secret'), :ec2_endpoint => "ec2.#{zone}.amazonaws.com")
70
+ @ec2 = AWS::EC2.new
71
+ $stderr.puts "@ec2 available"
72
+ end
73
+ binding.pry
74
+ puts "exiting"
75
+ end
76
+ end
77
+
78
+ namespace :config do
79
+ require 'redis'
80
+ require 'yaml'
81
+ ENV['REDIS_HOST'] = 'localhost' unless ENV['REDIS_HOST']
82
+ ENV['REDIS_PORT'] = '6379' unless ENV['REDIS_PORT']
83
+ ENV['REDIS_PASS'] = nil unless ENV['REDIS_PASS']
84
+ @redis = Redis.new(:host => ENV['REDIS_HOST'], :port => ENV['REDIS_PORT'], :password => ENV['REDIS_PASS'])
85
+ $stderr.puts "env vars REDIS_HOST, REDIS_PORT, and REDIS_PASS should all be set or\ndefaults of localhost:6379 with no password will be used"
86
+ YAML::ENGINE.yamler='syck'
87
+
88
+ task :import do
89
+ data = YAML::Parser($stdin)
90
+ puts data
91
+ end
92
+ task :delete do
93
+ print "Delete ALL existing data (y/N)? "
94
+ delete = gets.chomp
95
+ hashes = [
96
+ 'sg:us-east-1',
97
+ 'sg:us-west-1',
98
+ 'sg:us-west-2',
99
+ 'sg:ap-northeast-1',
100
+ 'sg:ap-southeast-1',
101
+ 'sg:ap-southeast-2',
102
+ 'sg:eu-west-1',
103
+ 'sg:sa-east-1',
104
+ 'config',
105
+ 'amis',
106
+ 'users',
107
+ ]
108
+
109
+ if delete == 'y'
110
+ @redis.keys("*") do |key|
111
+ @redis.del key
112
+ end
113
+ end
114
+
115
+ end
116
+
117
+ task :dump do
118
+ dump = Hash.new
119
+ @redis.keys("*").each do |key|
120
+ if @redis.type(key) == 'hash'
121
+ dump.merge!({ key => @redis.hgetall(key) })
122
+ else
123
+ dump.merge!({ key => @redis.get(key) })
124
+ end
125
+ end
126
+ puts dump.to_yaml
127
+ end
128
+
129
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'thin'
4
+ require 'gaptool-server/app.rb'
5
+
6
+ # Hijack the thin module to set default options to run in the right place
7
+ module Thin
8
+ class GaptoolRunner < Thin::Runner
9
+ def initialize(argv)
10
+ @argv = argv
11
+
12
+ # Default options values
13
+ @options = {
14
+ :chdir => File.expand_path('..', File.dirname(__FILE__)),
15
+ :environment => ENV['RACK_ENV'] || 'development',
16
+ :address => '0.0.0.0',
17
+ :port => Server::DEFAULT_PORT,
18
+ :timeout => Server::DEFAULT_TIMEOUT,
19
+ :log => 'log/thin.log',
20
+ :pid => 'tmp/pids/thin.pid',
21
+ :max_conns => Server::DEFAULT_MAXIMUM_CONNECTIONS,
22
+ :max_persistent_conns => Server::DEFAULT_MAXIMUM_PERSISTENT_CONNECTIONS,
23
+ :require => [],
24
+ :wait => Controllers::Cluster::DEFAULT_WAIT_TIME
25
+ }
26
+
27
+ parse!
28
+ end
29
+ end
30
+ end
31
+
32
+ # Run with thin, with thin args
33
+ Thin::GaptoolRunner.new(ARGV).run!
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'sinatra/base'
4
+ require 'sinatra'
5
+ require 'json'
6
+ require 'redis'
7
+ require 'yaml'
8
+ require 'erb'
9
+ require 'aws-sdk'
10
+ require 'openssl'
11
+ require 'net/ssh'
12
+
13
+ $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "lib")))
14
+
15
+ require 'gaptool-server/app.rb'
16
+
17
+ run GaptoolServer
@@ -0,0 +1,335 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'sinatra/base'
4
+ require 'sinatra'
5
+ require 'json'
6
+ require 'redis'
7
+ require 'yaml'
8
+ require 'erb'
9
+ require 'aws-sdk'
10
+ require 'openssl'
11
+ require 'net/ssh'
12
+ require 'peach'
13
+
14
+ ENV['REDIS_HOST'] = 'localhost' unless ENV['REDIS_HOST']
15
+ ENV['REDIS_PORT'] = '6379' unless ENV['REDIS_PORT']
16
+ ENV['REDIS_PASS'] = nil unless ENV['REDIS_PASS']
17
+
18
+ class GaptoolServer < Sinatra::Base
19
+ # Don't generate fancy HTML for stack traces.
20
+ disable :show_exceptions
21
+ # Allow errors to get out of the app so Cucumber can display them.
22
+ enable :raise_errors
23
+
24
+ def hash2redis( key, hash )
25
+ hash.keys.each do |hkey|
26
+ @redis.hset key, hkey, hash[hkey]
27
+ end
28
+ end
29
+
30
+ before do
31
+ @redis = Redis.new(:host => ENV['REDIS_HOST'], :port => ENV['REDIS_PORT'], :password => ENV['REDIS_PASS'])
32
+ error 401 unless @redis.hget('users', env['HTTP_X_GAPTOOL_USER']) == env['HTTP_X_GAPTOOL_KEY']
33
+ error 401 unless env['HTTP_X_GAPTOOL_USER'] && env['HTTP_X_GAPTOOL_KEY']
34
+ end
35
+
36
+ def putkey( host )
37
+ @key = OpenSSL::PKey::RSA.new 2048
38
+ @pubkey = "#{@key.ssh_type} #{[@key.to_blob].pack('m0')} GAPTOOL_GENERATED_KEY"
39
+ ENV['SSH_AUTH_SOCK'] = ''
40
+ Net::SSH.start(host, 'admin', :key_data => [@redis.hget('config', 'gaptoolkey')], :config => false, :keys_only => true, :paranoid => false) do |ssh|
41
+ ssh.exec! "grep -v GAPTOOL_GENERATED_KEY ~/.ssh/authorized_keys > /tmp/pubkeys"
42
+ ssh.exec! "cat /tmp/pubkeys > ~/.ssh/authorized_keys"
43
+ ssh.exec! "rm /tmp/pubkeys"
44
+ ssh.exec! "echo #{@pubkey} >> ~/.ssh/authorized_keys"
45
+ end
46
+ return @key.to_pem
47
+ end
48
+
49
+ def gt_securitygroup(role, environment, zone)
50
+ AWS.config(:access_key_id => @redis.hget('config', 'aws_id'), :secret_access_key => @redis.hget('config', 'aws_secret'), :ec2_endpoint => "ec2.#{zone.chop}.amazonaws.com")
51
+ @ec2 = AWS::EC2.new
52
+ groupname = "#{role}-#{environment}"
53
+ default_list = [ 22 ]
54
+ @ec2.security_groups.each do |group|
55
+ if group.name == "#{role}-#{environment}"
56
+ return group.id
57
+ end
58
+ end
59
+ internet = ['0.0.0.0/0']
60
+ sg = @ec2.security_groups.create("#{role}-#{environment}")
61
+ sg.authorize_ingress :tcp, 22, *internet
62
+ return sg.id
63
+ end
64
+
65
+ def runservice(host, service, keys)
66
+ ENV['SSH_AUTH_SOCK'] = ''
67
+ Net::SSH.start(host, 'admin', :key_data => [@redis.hget('config', 'gaptoolkey')], :config => false, :keys_only => true, :paranoid => false) do |ssh|
68
+ ssh.exec! "echo '#{keys.to_yaml}' > /tmp/apikeys-#{service}.yml"
69
+ ssh.exec! "sudo restart #{service} || sudo start #{service} || exit 0"
70
+ end
71
+ end
72
+
73
+ def balanceservices(role, environment)
74
+ @runable = Array.new
75
+ @available = Array.new
76
+ @totalcap = 0
77
+ @volume = 0
78
+ @redis.keys("host:#{role}:#{environment}:*").each do |host|
79
+ @available << {
80
+ :hostname => @redis.hget(host, 'hostname'),
81
+ :capacity => @redis.hget(host, 'capacity').to_i,
82
+ }
83
+ @totalcap = @totalcap + @redis.hget(host, 'capacity').to_i
84
+ end
85
+ @redis.keys("service:#{role}:#{environment}:*").each do |service|
86
+ unless service =~ /:count/
87
+ if @redis.hget(service, 'run').to_i == 1
88
+ @runable << {
89
+ :name => @redis.hget(service, 'name'),
90
+ :keys => eval(@redis.hget(service, 'keys')),
91
+ :weight => @redis.hget(service, 'weight').to_i
92
+ }
93
+ end
94
+ end
95
+ end
96
+ @volume = 0
97
+ @runable.each do |service|
98
+ @volume += service[:weight]
99
+ end
100
+ if @totalcap < @volume
101
+ return {'error' => true,"message" => "This would overcommit, remove some resources or add nodes","totalcap" => @totalcap, "volume" => @volume}.to_json
102
+ else
103
+ @runable.sort! { |x, y| x[:weight] <=> y[:weight] }
104
+ @available.sort! { |x, y| x[:capacity] <=> y[:capacity] }
105
+ @runlist = Array.new
106
+ @svctab = Hash.new
107
+ @runable.each do |event|
108
+ @svctab[event[:name]] = Array.new
109
+ end
110
+ @exitrunable = 0
111
+ while @runable != []
112
+ break if @exitrunable == 1
113
+ @available.each do |host|
114
+ break if @runable.last.nil?
115
+ @exitrunable = 1 if @svctab[@runable.last[:name]].include? host[:hostname]
116
+ break if @svctab[@runable.last[:name]].include? host[:hostname]
117
+ if host[:capacity] >= @runable.last[:weight]
118
+ host[:capacity] = host[:capacity] - @runable.last[:weight]
119
+ @svctab[@runable.last[:name]] << host[:hostname]
120
+ @runlist << { :host => host, :service => @runable.pop }
121
+ end
122
+ end
123
+ end
124
+ return @runlist
125
+ end
126
+ end
127
+
128
+ get '/' do
129
+ "You must be lost. Read the instructions."
130
+ end
131
+
132
+ get '/servicebalance/:role/:environment' do
133
+ runlist = balanceservices(params[:role], params[:environment])
134
+ runlist.peach do |event|
135
+ runservice(event[:host][:hostname], event[:service][:name], event[:service][:keys])
136
+ end
137
+ runlist.to_json
138
+ end
139
+
140
+ put '/service/:role/:environment' do
141
+ data = JSON.parse request.body.read
142
+ count = @redis.incr("service:#{params[:role]}:#{params[:environment]}:#{data['name']}:count")
143
+ key = "service:#{params[:role]}:#{params[:environment]}:#{data['name']}:#{count}"
144
+ @redis.hset(key, 'name', data['name'])
145
+ @redis.hset(key, 'keys', data['keys'])
146
+ @redis.hset(key, 'weight', data['weight'])
147
+ @redis.hset(key, 'role', params[:role])
148
+ @redis.hset(key, 'environment', params[:environment])
149
+ @redis.hset(key, 'run', data['enabled'])
150
+ {
151
+ :role => params[:role],
152
+ :environment => params[:environment],
153
+ :service => data['name'],
154
+ :count => count,
155
+ }.to_json
156
+ end
157
+
158
+ delete '/service/:role/:environment/:service' do
159
+ if @redis.get("service:#{params[:role]}:#{params[:environment]}:#{params[:service]}:count") == '0'
160
+ count = 0
161
+ else
162
+ count = @redis.decr("service:#{params[:role]}:#{params[:environment]}:#{params[:service]}:count")
163
+ @redis.del("service:#{params[:role]}:#{params[:environment]}:#{params[:service]}:#{count + 1}")
164
+ end
165
+ {
166
+ :role => params[:role],
167
+ :environment => params[:environment],
168
+ :service => params[:service],
169
+ :count => count,
170
+ }.to_json
171
+ end
172
+
173
+ def getservices()
174
+ services = Array.new
175
+ @redis.keys('service:*').each do |service|
176
+ unless service =~ /:count/
177
+ line = @redis.hgetall(service)
178
+ line['keys'] = eval(line['keys'])
179
+ services << line
180
+ end
181
+ end
182
+ return services
183
+ end
184
+
185
+ get '/services' do
186
+ getservices().to_json
187
+ end
188
+
189
+ post '/regenhosts' do
190
+ data = JSON.parse request.body.read
191
+ AWS.config(:access_key_id => @redis.hget('config', 'aws_id'), :secret_access_key => @redis.hget('config', 'aws_secret'), :ec2_endpoint => "ec2.#{data['zone']}.amazonaws.com")
192
+ @ec2 = AWS::EC2.new
193
+ @redis.keys("host:*").each do |host|
194
+ out = @redis.hset(host, 'hostname', @ec2.instances[@redis.hget(host, 'instance')].dns_name)
195
+ end
196
+ "{\"regen\":\"running\"}"
197
+ end
198
+
199
+ post '/init' do
200
+ data = JSON.parse request.body.read
201
+ AWS.config(:access_key_id => @redis.hget('config', 'aws_id'), :secret_access_key => @redis.hget('config', 'aws_secret'), :ec2_endpoint => "ec2.#{data['zone'].chop}.amazonaws.com")
202
+ @ec2 = AWS::EC2.new
203
+ # create shared secret to reference in /register
204
+ @secret = (0...8).map{65.+(rand(26)).chr}.join
205
+ data.merge!("secret" => @secret)
206
+ sgid = gt_securitygroup(data['role'], data['environment'], data['zone'])
207
+ if data['mirror']
208
+ instance = @ec2.instances.create(
209
+ :image_id => @redis.hget("amis", data['zone'].chop),
210
+ :availability_zone => data['zone'],
211
+ :instance_type => data['itype'],
212
+ :key_name => "gaptool",
213
+ :security_group_ids => sgid,
214
+ :user_data => "#!/bin/bash\ncurl --silent -H 'X-GAPTOOL-USER: #{env['HTTP_X_GAPTOOL_USER']}' -H 'X-GAPTOOL-KEY: #{env['HTTP_X_GAPTOOL_KEY']}' #{@redis.hget('config', 'url')}/register -X PUT --data '#{data.to_json}' | bash",
215
+ :block_device_mappings => {
216
+ "/dev/sdf" => {
217
+ :volume_size => data['mirror'].to_i,
218
+ :delete_on_termination => false
219
+ },
220
+ "/dev/sdg" => {
221
+ :volume_size => data['mirror'].to_i,
222
+ :delete_on_termination => false
223
+ }
224
+ }
225
+ )
226
+ else
227
+ instance = @ec2.instances.create(
228
+ :image_id => @redis.hget("amis", data['zone'].chop),
229
+ :availability_zone => data['zone'],
230
+ :instance_type => data['itype'],
231
+ :key_name => "gaptool",
232
+ :security_group_ids => sgid,
233
+ :user_data => "#!/bin/bash\ncurl --silent -H 'X-GAPTOOL-USER: #{env['HTTP_X_GAPTOOL_USER']}' -H 'X-GAPTOOL-KEY: #{env['HTTP_X_GAPTOOL_KEY']}' #{@redis.hget('config', 'url')}/register -X PUT --data '#{data.to_json}' | bash"
234
+ )
235
+ end
236
+ # Add host tag
237
+ instance.add_tag('Name', :value => "#{data['role']}-#{data['environment']}-#{instance.id}")
238
+ # Create temporary redis entry for /register to pull the instance id
239
+ @redis.set("instance:#{data['role']}:#{data['environment']}:#{@secret}", instance.id)
240
+ "{\"instance\":\"#{instance.id}\"}"
241
+ end
242
+
243
+ post '/terminate' do
244
+ data = JSON.parse request.body.read
245
+ AWS.config(:access_key_id => @redis.hget('config', 'aws_id'), :secret_access_key => @redis.hget('config', 'aws_secret'), :ec2_endpoint => "ec2.#{data['zone']}.amazonaws.com")
246
+ @ec2 = AWS::EC2.new
247
+ begin
248
+ @instance = @ec2.instances[data['id']]
249
+ res = @instance.terminate
250
+ res = @redis.del(@redis.keys("*#{data['id']}"))
251
+ out = {data['id'] => {'status'=> 'terminated'}}
252
+ rescue
253
+ error 404
254
+ end
255
+ out.to_json
256
+ end
257
+
258
+ put '/register' do
259
+ data = JSON.parse request.body.read
260
+ AWS.config(:access_key_id => @redis.hget('config', 'aws_id'), :secret_access_key => @redis.hget('config', 'aws_secret'), :ec2_endpoint => "ec2.#{data['zone'].chop}.amazonaws.com")
261
+ @ec2 = AWS::EC2.new
262
+ @instance = @ec2.instances[@redis.get("instance:#{data['role']}:#{data['environment']}:#{data['secret']}")]
263
+ hostname = @instance.dns_name
264
+ delete = @redis.del("instance:#{data['role']}:#{data['environment']}:#{data['secret']}")
265
+ @apps = Array.new
266
+ @redis.keys("app:*").each do |app|
267
+ if @redis.hget(app, 'role') == data['role']
268
+ @apps << app.gsub('app:', '')
269
+ end
270
+ end
271
+ data.merge!("capacity" => @redis.hget('capacity', data['itype']))
272
+ data.merge!("hostname" => hostname)
273
+ data.merge!("apps" => @apps.to_json)
274
+ data.merge!("instance" => @instance.id)
275
+ hash2redis("host:#{data['role']}:#{data['environment']}:#{@instance.id}", data)
276
+ @json = {
277
+ 'hostname' => hostname,
278
+ 'recipe' => 'init',
279
+ 'number' => @instance.id,
280
+ 'run_list' => ['recipe[init]'],
281
+ 'role' => data['role'],
282
+ 'environment' => data['environment'],
283
+ 'chefrepo' => @redis.hget('config', 'chefrepo'),
284
+ 'chefbranch' => @redis.hget('config', 'chefbranch'),
285
+ 'identity' => @redis.hget('config','initkey'),
286
+ 'appuser' => @redis.hget('config','appuser'),
287
+ 'apps' => @apps
288
+ }.to_json
289
+ erb :init
290
+ end
291
+
292
+ get '/hosts' do
293
+ out = Array.new
294
+ @redis.keys("host:*").each do |host|
295
+ out << @redis.hgetall(host)
296
+ end
297
+ out.to_json
298
+ end
299
+
300
+ get '/apps' do
301
+ out = Hash.new
302
+ @redis.keys("app:*").each do |app|
303
+ out.merge!(app => @redis.hgetall(app))
304
+ end
305
+ out.to_json
306
+ end
307
+
308
+ get '/hosts/:role' do
309
+ out = Array.new
310
+ @redis.keys("host:#{params[:role]}:*").each do |host|
311
+ out << @redis.hgetall(host)
312
+ end
313
+ out.to_json
314
+ end
315
+
316
+ get '/hosts/:role/:environment' do
317
+ out = Array.new
318
+ @redis.keys("host:#{params[:role]}:#{params[:environment]}*").each do |host|
319
+ out << @redis.hgetall(host)
320
+ end
321
+ out.to_json
322
+ end
323
+
324
+ get '/host/:role/:environment/:instance' do
325
+ @redis.hgetall("host:#{params[:role]}:#{params[:environment]}:#{params[:instance]}").to_json
326
+ end
327
+
328
+ get '/ssh/:role/:environment/:instance' do
329
+ @host = @redis.hget("host:#{params[:role]}:#{params[:environment]}:#{params[:instance]}", 'hostname')
330
+ @key = putkey(@host)
331
+ {'hostname' => @host, 'key' => @key, 'pubkey' => @pubkey}.to_json
332
+ end
333
+
334
+
335
+ end
@@ -0,0 +1,9 @@
1
+ <html>
2
+ <body>
3
+ <ul>
4
+ <% @hosts.each do |host|%>
5
+ <li><%=host%> <%=@redis.get host%></li>
6
+ <% end %>
7
+ </ul>
8
+ </body>
9
+ </html>
@@ -0,0 +1,10 @@
1
+ apt-get install -y zsh git libssl-dev ruby1.9.1-full build-essential
2
+ gem install --bindir /usr/local/bin --no-ri --no-rdoc chef
3
+ cat << 'EOFKEY' > /root/.ssh/id_rsa
4
+ <%=@redis.hget('config', 'initkey')%>
5
+ EOFKEY
6
+ chmod 600 /root/.ssh/id_rsa
7
+ echo 'StrictHostKeyChecking no' > /root/.ssh/config
8
+ git clone -b <%=@redis.hget('config', 'chefbranch')%> <%=@redis.hget('config', 'chefrepo')%> /root/ops
9
+ echo '<%=@json%>' > /root/init.json
10
+ chef-solo -c /root/ops/cookbooks/init.rb -j /root/init.json && (rm /root/.ssh/id_rsa; userdel -r ubuntu; rm -rf /root/.ssh; rm -rf /root/ops; rm -rf /root/init.json)
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'aws-sdk'
4
+
5
+ zones = [
6
+ 'us-east-1',
7
+ 'us-west-1',
8
+ 'us-west-2',
9
+ 'sa-east-1',
10
+ 'eu-west-1',
11
+ 'ap-southeast-1',
12
+ 'ap-northeast-1',
13
+ 'ap-southeast-2',
14
+ ]
15
+
16
+ puts "This script will set up your gaptool-server, make sure you have the aws-sdk gem installed."
17
+ puts "Before getting started, either create a new IAM role with full access to EC2, or input your master AWS ID and Secret."
18
+ puts "Also ensure that you have an EMPTY redis server running somewhere avilable."
19
+ puts "Read the source of this script if you're worried about what it does with it."
20
+
21
+ print "Enter AWS ID: "
22
+ aws_id = gets.chomp
23
+ print "Enter AWS Secret: "
24
+ aws_secret = gets.chomp
25
+ print "Redis host: "
26
+ redis_host = gets.chomp
27
+ print "Redis port: "
28
+ redis_port = gets.chomp
29
+ print "Redis password (leave blank if none): "
30
+ redis_pass = gets.chomp
31
+
32
+ @redis = Redis.new(:host => redis_host, :port => redis_port, :password => redis_pass)
33
+
34
+ zones.each do |zone|
35
+ # Run for each AZ
36
+ AWS.config(:access_key_id => aws_id, :secret_access_key => aws_secret, :ec2_endpoint => "ec2.#{zone}.amazonaws.com")
37
+ @ec2 = AWS::EC2.new
38
+ @key = @ec2.key_pairs.create('gaptool-server')
39
+ @private = @key.private_key
40
+ end
41
+
42
+
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'gaptool-server'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestGaptoolServer < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,215 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gaptool-server
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.1.0
6
+ platform: ruby
7
+ authors:
8
+ - Matt Bailey
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2012-12-13 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: sinatra
17
+ requirement: &id001 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: "0"
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
27
+ name: thin
28
+ requirement: &id002 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
38
+ name: redis
39
+ requirement: &id003 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: "0"
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: *id003
48
+ - !ruby/object:Gem::Dependency
49
+ name: aws-sdk
50
+ requirement: &id004 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: "0"
56
+ type: :runtime
57
+ prerelease: false
58
+ version_requirements: *id004
59
+ - !ruby/object:Gem::Dependency
60
+ name: net-ssh
61
+ requirement: &id005 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: "0"
67
+ type: :runtime
68
+ prerelease: false
69
+ version_requirements: *id005
70
+ - !ruby/object:Gem::Dependency
71
+ name: peach
72
+ requirement: &id006 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: "0"
78
+ type: :runtime
79
+ prerelease: false
80
+ version_requirements: *id006
81
+ - !ruby/object:Gem::Dependency
82
+ name: shoulda
83
+ requirement: &id007 !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: "0"
89
+ type: :development
90
+ prerelease: false
91
+ version_requirements: *id007
92
+ - !ruby/object:Gem::Dependency
93
+ name: rdoc
94
+ requirement: &id008 !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: "0"
100
+ type: :development
101
+ prerelease: false
102
+ version_requirements: *id008
103
+ - !ruby/object:Gem::Dependency
104
+ name: bundler
105
+ requirement: &id009 !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: "0"
111
+ type: :development
112
+ prerelease: false
113
+ version_requirements: *id009
114
+ - !ruby/object:Gem::Dependency
115
+ name: jeweler
116
+ requirement: &id010 !ruby/object:Gem::Requirement
117
+ none: false
118
+ requirements:
119
+ - - ~>
120
+ - !ruby/object:Gem::Version
121
+ version: 1.8.4
122
+ type: :development
123
+ prerelease: false
124
+ version_requirements: *id010
125
+ - !ruby/object:Gem::Dependency
126
+ name: simplecov
127
+ requirement: &id011 !ruby/object:Gem::Requirement
128
+ none: false
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: "0"
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: *id011
136
+ - !ruby/object:Gem::Dependency
137
+ name: shotgun
138
+ requirement: &id012 !ruby/object:Gem::Requirement
139
+ none: false
140
+ requirements:
141
+ - - ">="
142
+ - !ruby/object:Gem::Version
143
+ version: "0"
144
+ type: :development
145
+ prerelease: false
146
+ version_requirements: *id012
147
+ - !ruby/object:Gem::Dependency
148
+ name: pry
149
+ requirement: &id013 !ruby/object:Gem::Requirement
150
+ none: false
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ version: "0"
155
+ type: :development
156
+ prerelease: false
157
+ version_requirements: *id013
158
+ description: gaptool-server for managing cloud resources
159
+ email: m@mdb.io
160
+ executables:
161
+ - gaptool-server
162
+ extensions: []
163
+
164
+ extra_rdoc_files:
165
+ - LICENSE.txt
166
+ - README.rdoc
167
+ files:
168
+ - .document
169
+ - Gemfile
170
+ - Gemfile.lock
171
+ - LICENSE.txt
172
+ - Procfile
173
+ - README.rdoc
174
+ - Rakefile
175
+ - VERSION
176
+ - bin/gaptool-server
177
+ - config.ru
178
+ - lib/gaptool-server/app.rb
179
+ - lib/gaptool-server/views/hosts.erb
180
+ - lib/gaptool-server/views/init.erb
181
+ - setup.rb
182
+ - test/helper.rb
183
+ - test/test_gaptool-server.rb
184
+ homepage: http://github.com/mattbailey/gaptool-server
185
+ licenses:
186
+ - MIT
187
+ post_install_message:
188
+ rdoc_options: []
189
+
190
+ require_paths:
191
+ - lib
192
+ required_ruby_version: !ruby/object:Gem::Requirement
193
+ none: false
194
+ requirements:
195
+ - - ">="
196
+ - !ruby/object:Gem::Version
197
+ hash: -1902819985893465113
198
+ segments:
199
+ - 0
200
+ version: "0"
201
+ required_rubygems_version: !ruby/object:Gem::Requirement
202
+ none: false
203
+ requirements:
204
+ - - ">="
205
+ - !ruby/object:Gem::Version
206
+ version: "0"
207
+ requirements: []
208
+
209
+ rubyforge_project:
210
+ rubygems_version: 1.8.23
211
+ signing_key:
212
+ specification_version: 3
213
+ summary: gaptool-server for managing cloud resources
214
+ test_files: []
215
+