knife-brightbox 0.7.1 → 0.8.0

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: 9211b0bdcd00c20988b3ad142eb7f3f7b6d21853
4
- data.tar.gz: 6c393315043b04be91e9ce69710cb353b3dce9f9
3
+ metadata.gz: dce55a715abf2d75fa4b25c31f34ebe75222bb9a
4
+ data.tar.gz: 910840b1f2a92e6da074e75ba8dd1b284aca80b7
5
5
  SHA512:
6
- metadata.gz: d38c728b618e3c23662f226bf816cf344a271ff63d055cd32305d42e0fa7f7b5bb82244fe731e0cfbeab186c085f1a1b0f1e3184784c3e61a2e8e7bb2cab7e26
7
- data.tar.gz: 145716aba33f00d23c700feb5aba592dd82114c4323806b422953fbd5fcf9fe327f9980ab370c81e2dbfb6ed2b3d3033062e6f3b3c5ec7b848533023f4dafba8
6
+ metadata.gz: 313401b2f124d086c4f6be16007719dd9c98515627630363a286a1e83640a79ce9e395e1bf0894467aa4a7aa07959c520da97b174a46b66d8dad1318a693e46e
7
+ data.tar.gz: 819977b6db8bac6d91f50a8f7386ba18c4f7835875a38c5073351922e130e9dd60b37b2f794964e91fdf89d6f977a88d19dd54c745fea9cdc17fcca7c8340127
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.8.0
2
+
3
+ * Allow configuring of SSH port when creating new server
4
+
1
5
  # 0.7.1
2
6
 
3
7
  * Allows overriding of attributes defined in `.chef/knife.rb` (@gregkare)
data/README.rdoc CHANGED
@@ -68,6 +68,8 @@ Provisions a new server in the Brightbox Cloud and then perform a Chef bootstrap
68
68
 
69
69
  You can specify the Brightbox zone your new server will use using the `--zone` switch. By default it is `gb1-a`. It can also be `gb1-b` at the time of this writing. See `knife brightbox zone list` to request a current list from the API.
70
70
 
71
+ You can specify the ssh port to connect to using the `--ssh-port` switch. By default it is `22`.
72
+
71
73
  == knife brightbox server delete
72
74
 
73
75
  Deletes an existing server in the currently configured Brightbox Cloud account by the server/instance id. You can find the instance id by entering 'knife brightbox server list'. You can specify the `--purge` flag to delete the associated node and client objects from the Chef server along with the cloup ip.
@@ -110,6 +110,13 @@ class Chef
110
110
  :description => "The ssh username; default is 'root'",
111
111
  :default => "root"
112
112
 
113
+ option :ssh_port,
114
+ :short => "-p PORT",
115
+ :long => "--ssh-port PORT",
116
+ :description => "The ssh port",
117
+ :default => 22,
118
+ :proc => Proc.new { |key| Chef::Config[:knife][:ssh_port] = key.to_i }
119
+
113
120
  option :first_boot_attributes,
114
121
  :short => "-j JSON_ATTRIBS",
115
122
  :long => "--json-attributes",
@@ -136,7 +143,7 @@ class Chef
136
143
  :proc => Proc.new { |z| Chef::Config[:zone] = z }
137
144
 
138
145
  def tcp_test_ssh(hostname)
139
- tcp_socket = TCPSocket.new(hostname, 22)
146
+ tcp_socket = TCPSocket.new(hostname, config[:ssh_port])
140
147
  readable = IO.select([tcp_socket], nil, nil, 5)
141
148
  if readable
142
149
  Chef::Log.debug("sshd accepting connections on #{hostname}, banner is #{tcp_socket.gets}")
@@ -222,6 +229,7 @@ class Chef
222
229
  bootstrap.name_args = [server.cloud_ips.first['public_ip']]
223
230
  bootstrap.config[:run_list] = config[:run_list]
224
231
  bootstrap.config[:ssh_user] = config[:ssh_user] || "root"
232
+ bootstrap.config[:ssh_port] = config[:ssh_port]
225
233
  bootstrap.config[:identity_file] = config[:identity_file]
226
234
  bootstrap.config[:chef_node_name] = config[:chef_node_name] || server.name || server.id
227
235
  bootstrap.config[:bootstrap_version] = locate_config_value(:bootstrap_version)
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Brightbox
3
- VERSION = "0.7.1"
3
+ VERSION = "0.8.0"
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-brightbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergio Rubio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-12 00:00:00.000000000 Z
11
+ date: 2015-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog