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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50f8c7236ffafbc01eee654443bcdbaf58e2cd62
4
- data.tar.gz: 2580fb8acd9d6778503a490823e3db31b7a271c3
3
+ metadata.gz: 74354ecb486f502bef4e42cc0eeccb524c4ba430
4
+ data.tar.gz: 304bdaeddc89d90e94e4db420dae51d358a68730
5
5
  SHA512:
6
- metadata.gz: a129a763a04a28f92893f9704963081291a064bddf796a9896a778159ad55a679409f4f65fa2c1bccacfbb907811e9d1a51701a79a4a7440fdb3add222aeada9
7
- data.tar.gz: 2a403e57d2bb4d2a6a168297bfd96e88394a12f131d0b5e938a3b1b21abb84a3affda464333b5ecd6f82c41b33c34e659b0a7ca76f379ff72519f61713309ed6
6
+ metadata.gz: b4ab09d24caaa18c9c9f5da891989bfc9a0466f3788e5e7b1a10db26665d5e7004b10fa5602bca10b80d9b2b33c58927336d61e350b4282fc2dc0973748b328a
7
+ data.tar.gz: 7abc63bc782d94a03ef3c5b3dad68a2d092cb4569b390d435db6f7226a8bb3c39e4041114232979814e0a07d34cbba16881ee1d15baf10198c2e6b05b5faddc3
data/.gitignore CHANGED
@@ -11,3 +11,4 @@
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
13
  sambot-session.log
14
+ /.env
@@ -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 #{namespace} #{command_name} "
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
- if command.long_description
51
- shell.say "Description:", :green
52
- shell.say
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__), '../docs', path + '.txt'))
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
@@ -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.
@@ -0,0 +1,7 @@
1
+ This command will stop a 'Sambot' session. It will do the following:
2
+
3
+ * Close any open tunnels to the bastion host.
4
+
5
+ * Reset your /etc/hosts file to its original content.
6
+
7
+ * Stop the local HAProxy instance.
@@ -0,0 +1,3 @@
1
+ This command will output the version of the cookbook in the current directory.
2
+
3
+ It is mostly used for CI in order to give TeamCity builds their correct version number.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sambot
4
- VERSION = '0.1.128'.freeze
4
+ VERSION = '0.1.129'.freeze
5
5
  end
@@ -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('~/.bash_profile'))
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('~/.bash_profile'))
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 ~/.bash_profile")
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('~/.bash_profile'))
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('~/.bash_profile'))
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.128
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/cookbook/build.txt
473
- - lib/sambot/docs/cookbook/clean.txt
474
- - lib/sambot/docs/cookbook/generate.txt
475
- - lib/sambot/docs/cookbook/version.txt
476
- - lib/sambot/docs/session/start.txt
477
- - lib/sambot/docs/session/stop.txt
478
- - lib/sambot/docs/workstation/configure.txt
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