sambot 0.1.128 → 0.1.129
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/sambot/base_command.rb +6 -10
- data/lib/sambot/docs/{cookbook/build.txt → build.txt} +5 -9
- data/lib/sambot/docs/{cookbook/clean.txt → clean.txt} +0 -0
- data/lib/sambot/docs/{workstation/configure.txt → configure.txt} +0 -0
- data/lib/sambot/docs/{cookbook/generate.txt → generate.txt} +0 -0
- data/lib/sambot/docs/start.txt +21 -0
- data/lib/sambot/docs/stop.txt +7 -0
- data/lib/sambot/docs/version.txt +3 -0
- data/lib/sambot/version.rb +1 -1
- data/lib/sambot/workflow/session.rb +3 -0
- data/lib/sambot/workflow/vault.rb +5 -5
- data/sambot.gemspec +0 -1
- metadata +8 -22
- data/lib/sambot/docs/cookbook/version.txt +0 -0
- data/lib/sambot/docs/session/start.txt +0 -0
- data/lib/sambot/docs/session/stop.txt +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74354ecb486f502bef4e42cc0eeccb524c4ba430
|
4
|
+
data.tar.gz: 304bdaeddc89d90e94e4db420dae51d358a68730
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4ab09d24caaa18c9c9f5da891989bfc9a0466f3788e5e7b1a10db26665d5e7004b10fa5602bca10b80d9b2b33c58927336d61e350b4282fc2dc0973748b328a
|
7
|
+
data.tar.gz: 7abc63bc782d94a03ef3c5b3dad68a2d092cb4569b390d435db6f7226a8bb3c39e4041114232979814e0a07d34cbba16881ee1d15baf10198c2e6b05b5faddc3
|
data/.gitignore
CHANGED
data/lib/sambot/base_command.rb
CHANGED
@@ -41,19 +41,15 @@ class Thor
|
|
41
41
|
command = all_commands[meth]
|
42
42
|
handle_no_command_error(meth) unless command
|
43
43
|
shell.say
|
44
|
-
shell.say("Usage:", :green)
|
44
|
+
shell.say(" Usage:", :green)
|
45
45
|
shell.say
|
46
|
-
shell.say " sambot #{
|
46
|
+
shell.say " sambot #{command_name} "
|
47
47
|
shell.say
|
48
48
|
shell.say
|
49
49
|
class_options_help(shell, nil => command.options.values)
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
shell.print_wrapped(docs("#{namespace}/#{command_name}"), :indent => 2)
|
54
|
-
else
|
55
|
-
shell.say command.description
|
56
|
-
end
|
50
|
+
shell.say " Description:", :green
|
51
|
+
shell.say
|
52
|
+
shell.print_wrapped(docs("#{command_name}"), :indent => 2)
|
57
53
|
shell.say
|
58
54
|
end
|
59
55
|
end
|
@@ -97,7 +93,7 @@ module Sambot
|
|
97
93
|
end
|
98
94
|
|
99
95
|
def self.docs(path)
|
100
|
-
File.read(File.join(File.dirname(__FILE__), '
|
96
|
+
File.read(File.join(File.dirname(__FILE__), '/docs', path + '.txt'))
|
101
97
|
end
|
102
98
|
|
103
99
|
end
|
@@ -6,20 +6,16 @@ The configuration file should be called .config.yml and stored in the root of
|
|
6
6
|
the Chef cookbook. After the command is run, all the files required to author
|
7
7
|
a cookbook will be placed in the same directory as the .config.yml file.
|
8
8
|
|
9
|
-
An example default structure for a cookbook would be the below:
|
10
|
-
|- recipes
|
11
|
-
|- default.rb
|
12
|
-
|- spec
|
13
|
-
|- .config.yml
|
14
|
-
|- README.md
|
15
|
-
|
16
|
-
The above is the minimal folder structure required for a cookbook.
|
17
|
-
|
18
9
|
The .config.yml has the following structure:
|
10
|
+
|
19
11
|
* name - the name of the cookbook
|
12
|
+
|
20
13
|
* version - the version of the cookbook
|
14
|
+
|
21
15
|
* platforms - the different platforms the cookbook can run on, centos and/or windows
|
16
|
+
|
22
17
|
* description - a description for the cookbook
|
18
|
+
|
23
19
|
* suites - the suites attribute that would go into the .kitchen.yml files and should follow exactly that structure
|
24
20
|
|
25
21
|
Furthermore, a pre-push Git hook will be generated which will check the cookbook
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,21 @@
|
|
1
|
+
This command will start a new 'Sambot' session.
|
2
|
+
|
3
|
+
A session is a period of time during which you want to interact with services inside
|
4
|
+
our Rackspace DEV environment. To do so several things need to take place:
|
5
|
+
|
6
|
+
* A set of SSH tunnels will be created to the bastion host in Rackspace, allowing you
|
7
|
+
to seamlessly access resources.
|
8
|
+
|
9
|
+
* Your /etc/hosts will be updated with the most commonly used services to point to your
|
10
|
+
local machine. This will allow you to transparently connect to a service .i.e https://chef.brighter.io
|
11
|
+
as if you were connecting directly - in fact, you'll be going through a local tunnel!
|
12
|
+
|
13
|
+
* You will be logged into Vault allowing you to start using the Vault CLI without further
|
14
|
+
authentication required.
|
15
|
+
|
16
|
+
* An HAProxy instance will be started locally in order to correctly route ports. This is required
|
17
|
+
to transparently used the correct ports on a single IP.
|
18
|
+
|
19
|
+
You can run `sambot session` over and over again without any problems. Once your session is complete
|
20
|
+
and you want to close the session, simply run `sambot stop` and this will remove the tunnels, stop
|
21
|
+
HAProxy and reset your /etc/hosts file to its original contents.
|
data/lib/sambot/version.rb
CHANGED
@@ -25,6 +25,9 @@ module Sambot
|
|
25
25
|
'teamcity.brighter.io': {
|
26
26
|
tunnel_port: 9001, dest_port: 8111, proxy_port: 443
|
27
27
|
},
|
28
|
+
'rundeck.brighter.io': {
|
29
|
+
tunnel_port: 9008, dest_port: 4440, proxy_port: 443
|
30
|
+
},
|
28
31
|
'splunk.brighter.io': {
|
29
32
|
tunnel_port: 9002, dest_port: 8080, proxy_port: 443
|
30
33
|
},
|
@@ -21,7 +21,7 @@ module Sambot
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
def self.setup_environment(forwards, target = File.expand_path('~/.
|
24
|
+
def self.setup_environment(forwards, target = File.expand_path('~/.zshrc'))
|
25
25
|
save_environment_variable('VAULT_SKIP_VERIFY', true, target)
|
26
26
|
save_environment_variable('VAULT_ADDR', build_vault_address(forwards), target)
|
27
27
|
end
|
@@ -30,23 +30,23 @@ module Sambot
|
|
30
30
|
"https://vault.brighter.io:#{forwards[:'vault.brighter.io'][:proxy_port]}"
|
31
31
|
end
|
32
32
|
|
33
|
-
def self.save_environment_variable(key, value, target = File.expand_path('~/.
|
33
|
+
def self.save_environment_variable(key, value, target = File.expand_path('~/.zshrc'))
|
34
34
|
contents = File.read(target)
|
35
35
|
contents = contents.gsub(/export #{key}=#{value}/, '') if has_environment_variable?(key, value, target)
|
36
36
|
new_line = "export #{key}=#{value.to_s}\n"
|
37
|
-
UI.debug("Adding `#{new_line}` to your ~/.
|
37
|
+
UI.debug("Adding `#{new_line}` to your ~/.zshrc")
|
38
38
|
contents << new_line
|
39
39
|
File.write(target, contents)
|
40
40
|
ENV[key] = value.to_s
|
41
41
|
end
|
42
42
|
|
43
|
-
def self.has_environment_variables?(forwards, target = File.expand_path('~/.
|
43
|
+
def self.has_environment_variables?(forwards, target = File.expand_path('~/.zshrc'))
|
44
44
|
has_vault_skip_verify = has_environment_variable?('VAULT_SKIP_VERIFY', true, target)
|
45
45
|
has_vault_addr = has_environment_variable?('VAULT_ADDR', build_vault_address(forwards), target)
|
46
46
|
(has_vault_addr != nil) && (has_vault_skip_verify != nil)
|
47
47
|
end
|
48
48
|
|
49
|
-
def self.has_environment_variable?(key, value, target = File.expand_path('~/.
|
49
|
+
def self.has_environment_variable?(key, value, target = File.expand_path('~/.zshrc'))
|
50
50
|
contents = File.read(target)
|
51
51
|
contents.match(/export #{key}=#{value}/)
|
52
52
|
end
|
data/sambot.gemspec
CHANGED
@@ -42,7 +42,6 @@ Gem::Specification.new do |spec|
|
|
42
42
|
spec.add_dependency 'thor', '~> 0.19'
|
43
43
|
spec.add_dependency 'erubis', '~> 2.7', '>= 2.7.0'
|
44
44
|
spec.add_dependency 'gems', '~> 1.0', '>= 1.0.0'
|
45
|
-
spec.add_development_dependency 'aruba'
|
46
45
|
spec.add_dependency 'awesome_print'
|
47
46
|
spec.add_development_dependency 'pry'
|
48
47
|
spec.add_development_dependency 'fuubar'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sambot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.129
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Olivier Kouame
|
@@ -274,20 +274,6 @@ dependencies:
|
|
274
274
|
- - ">="
|
275
275
|
- !ruby/object:Gem::Version
|
276
276
|
version: 1.0.0
|
277
|
-
- !ruby/object:Gem::Dependency
|
278
|
-
name: aruba
|
279
|
-
requirement: !ruby/object:Gem::Requirement
|
280
|
-
requirements:
|
281
|
-
- - ">="
|
282
|
-
- !ruby/object:Gem::Version
|
283
|
-
version: '0'
|
284
|
-
type: :development
|
285
|
-
prerelease: false
|
286
|
-
version_requirements: !ruby/object:Gem::Requirement
|
287
|
-
requirements:
|
288
|
-
- - ">="
|
289
|
-
- !ruby/object:Gem::Version
|
290
|
-
version: '0'
|
291
277
|
- !ruby/object:Gem::Dependency
|
292
278
|
name: awesome_print
|
293
279
|
requirement: !ruby/object:Gem::Requirement
|
@@ -469,13 +455,13 @@ files:
|
|
469
455
|
- lib/sambot/config.rb
|
470
456
|
- lib/sambot/dns/records.rb
|
471
457
|
- lib/sambot/dns/repository.rb
|
472
|
-
- lib/sambot/docs/
|
473
|
-
- lib/sambot/docs/
|
474
|
-
- lib/sambot/docs/
|
475
|
-
- lib/sambot/docs/
|
476
|
-
- lib/sambot/docs/
|
477
|
-
- lib/sambot/docs/
|
478
|
-
- lib/sambot/docs/
|
458
|
+
- lib/sambot/docs/build.txt
|
459
|
+
- lib/sambot/docs/clean.txt
|
460
|
+
- lib/sambot/docs/configure.txt
|
461
|
+
- lib/sambot/docs/generate.txt
|
462
|
+
- lib/sambot/docs/start.txt
|
463
|
+
- lib/sambot/docs/stop.txt
|
464
|
+
- lib/sambot/docs/version.txt
|
479
465
|
- lib/sambot/rackspace/client.rb
|
480
466
|
- lib/sambot/rackspace/flavors.rb
|
481
467
|
- lib/sambot/rackspace/images.rb
|
File without changes
|
File without changes
|
File without changes
|