chef-metal-ssh 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Gem Version](https://badge.fury.io/rb/chef-metal-ssh.svg)](http://badge.fury.io/rb/chef-metal-ssh)
2
+
1
3
  # ChefMetalSsh
2
4
 
3
5
  TODO: Write a gem description
@@ -36,23 +38,23 @@ To test it out, clone the repo:
36
38
 
37
39
  `git clone https://github.com/double-z/chef-metal-ssh.git`
38
40
 
39
- in the root there is a Vagrantfile with 3 nodes, 1 master and 2 targets. Run:
40
-
41
- first run:
41
+ in the root there is a Vagrantfile with 3 nodes, 1 master and 2 targets.
42
42
 
43
- `rake build`
43
+ FYI, nothing will get installed on your local machine in this process.
44
44
 
45
- from the repo root to build the gem in the repo root `./pkg/` directory. then run:
45
+ Run:
46
46
 
47
47
  `vagrant up`
48
48
 
49
- which will bring up all 3 nodes. FYI, nothing will get installed on your local machine in this proces. So then ssh to the master:
49
+ which will bring up all 3 nodes.
50
+
51
+ So then ssh to the master:
50
52
 
51
53
  `vagrant ssh master`
52
54
 
53
55
  the repo test directory has a test cookbook and `run_zero` script. its located at `/vagrant/test`
54
56
 
55
- cd into it:
57
+ cd into the test directory:
56
58
 
57
59
  `cd /vagrant/test`
58
60
 
@@ -9,12 +9,9 @@ module ChefMetalSsh
9
9
  # Provisions machines with ssh.
10
10
  class SshProvisioner < ChefMetal::Provisioner
11
11
 
12
- def initialize(target_host=nil)
13
- @target_host = target_host
12
+ def initialize()
14
13
  end
15
14
 
16
- attr_reader :target_host
17
-
18
15
  # Acquire a machine, generally by provisioning it. Returns a Machine
19
16
  # object pointing at the machine, allowing useful actions like setup,
20
17
  # converge, execute, file and directory. The Machine object will have a
@@ -53,13 +50,10 @@ module ChefMetalSsh
53
50
  Chef::Log.debug("acquire_machine - provisioner_options.inspect: #{provisioner_options.inspect}")
54
51
  Chef::Log.debug("======================================>")
55
52
 
56
- if @target_host.nil?
57
- target_host = get_target_connection_method(node)
58
- @target_host = target_host
59
- end
53
+ @target_host = get_target_connection_method(node)
60
54
 
61
55
  Chef::Log.debug("======================================>")
62
- Chef::Log.debug("acquire_machine - target_host: #{target_host}")
56
+ Chef::Log.debug("acquire_machine - target_host: #{@target_host}")
63
57
  Chef::Log.debug("======================================>")
64
58
 
65
59
  # Set up Provisioner Output
@@ -81,13 +75,10 @@ module ChefMetalSsh
81
75
 
82
76
  # Connect to machine without acquiring it
83
77
  def connect_to_machine(node)
84
- if @target_host.nil?
85
- target_host = get_target_connection_method(node)
86
- @target_host = target_host
87
- end
78
+ @target_host = get_target_connection_method(node)
88
79
 
89
80
  Chef::Log.debug("======================================>")
90
- Chef::Log.debug("connect_to_machine - target_host: #{target_host}")
81
+ Chef::Log.debug("connect_to_machine - target_host: #{@target_host}")
91
82
  Chef::Log.debug("======================================>")
92
83
 
93
84
  machine_for(node)
@@ -98,9 +89,9 @@ module ChefMetalSsh
98
89
  end
99
90
 
100
91
  def stop_machine(action_handler, node)
101
- # What to do What to do.
92
+ # What to do What to do.
102
93
  # On one level there's really only one thing to do here,
103
- # shellout and halt, or shutdown -h now,
94
+ # shellout and halt, or shutdown -h now,
104
95
  # maybe provide abitily to pass some shutdown options
105
96
  # But be vewwy vewwy careful, you better have console,
106
97
  # or be close to your datacenter
@@ -167,13 +158,8 @@ module ChefMetalSsh
167
158
 
168
159
  provisioner_options = node['normal']['provisioner_options']
169
160
 
170
- ##
171
- # Ssh Target
172
- target_host = ''
173
- target_host = @target_host
174
-
175
161
  Chef::Log.debug("======================================>")
176
- Chef::Log.debug("create_ssh_transport - target_host: #{target_host}")
162
+ Chef::Log.debug("create_ssh_transport - target_host: #{@target_host}")
177
163
  Chef::Log.debug("======================================>")
178
164
 
179
165
  ##
@@ -225,7 +211,7 @@ module ChefMetalSsh
225
211
  Chef::Log.debug("create_ssh_transport - options: #{options.inspect}")
226
212
  Chef::Log.debug("======================================>")
227
213
 
228
- ChefMetal::Transport::SSH.new(target_host, username, ssh_options, options)
214
+ ChefMetal::Transport::SSH.new(@target_host, username, ssh_options, options)
229
215
  end
230
216
 
231
217
  end
@@ -1,3 +1,3 @@
1
1
  module ChefMetalSsh
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-metal-ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-06 00:00:00.000000000 Z
12
+ date: 2014-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef
16
- requirement: &6594860 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *6594860
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: chef-metal
27
- requirement: &6650460 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '0.6'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *6650460
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '0.6'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: bundler
38
- requirement: &6649080 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ~>
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '1.5'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *6649080
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.5'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: rspec
49
- requirement: &6647280 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: '0'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *6647280
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: rake
60
- requirement: &6077260 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ! '>='
@@ -65,8 +85,13 @@ dependencies:
65
85
  version: '0'
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *6077260
69
- description: Provisioner for converging servers using ssh ssh in Chef Metal.
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ description: Provisioner for managing servers using ssh in Chef Metal.
70
95
  email: zackzondlo@gmail.com
71
96
  executables: []
72
97
  extensions: []
@@ -77,8 +102,8 @@ files:
77
102
  - Rakefile
78
103
  - LICENSE.txt
79
104
  - README.md
80
- - lib/chef_metal/provisioner_init/ssh_init.rb
81
105
  - lib/chef_metal_ssh.rb
106
+ - lib/chef_metal/provisioner_init/ssh_init.rb
82
107
  - lib/chef_metal_ssh/ssh_provisioner.rb
83
108
  - lib/chef_metal_ssh/version.rb
84
109
  homepage: https://github.com/double-z/chef-metal-ssh
@@ -101,8 +126,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
126
  version: '0'
102
127
  requirements: []
103
128
  rubyforge_project:
104
- rubygems_version: 1.8.11
129
+ rubygems_version: 1.8.23.2
105
130
  signing_key:
106
131
  specification_version: 3
107
- summary: Provisioner for converging servers using ssh ssh in Chef Metal.
132
+ summary: Provisioner for managing servers using ssh in Chef Metal.
108
133
  test_files: []