knife-zero 1.8.5 → 1.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b237a684fc97894a3527039f348625f4834dd4d
4
- data.tar.gz: c125782b3e8a883d8792608bfaff70173bcd21ad
3
+ metadata.gz: 11563bfb7405a0e1b1ecc2e77b173d3cc8c14838
4
+ data.tar.gz: 26a8138040e088c18a3d5f3c118a9594419e9bc1
5
5
  SHA512:
6
- metadata.gz: 047c70e46a47bc6c57c814adcf82f597e72b28f3de214d41292d98ebdc7c59d3581c82b590b9f5e7f8473c94613a5186923e3c45b5d39ea011a479da594aeb6d
7
- data.tar.gz: ef654a7a9a85090a64aae02096a9e35e59dfb18f78403d6f81c3396fba460368e7cf6c60519b119d9728b843c3e621e477063b149dbfcb478e608e4a98b7f84e
6
+ metadata.gz: 25695cdf6be7cb4754c0a686f00e36c20dc54d4f7b2ea64381070994ef358069f7e145660ea2aa1af63563a52ab3d11daa1ec6fac566839afeef0ad5ee7e11c8
7
+ data.tar.gz: e4edf70d45cbf1315e0d0e19bc9584b17bb5430744f20b28c285d86ea60a818fa9d3868a00047b44e51940f944a8ca37ace44fb019d5b250d8aa31cf0d0a824b
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## v1.8.6
6
+
7
+ - Feature: add new attribute knife_zero.ssh_url at bootstrap.
8
+
5
9
  ## v1.8.5
6
10
 
7
11
  - Bug: allow more than 2 white lists. HT: @kaznishi
data/README.md CHANGED
@@ -16,7 +16,8 @@ Run chef-client at remote node with chef-zero(local-mode) via HTTP over SSH port
16
16
  - It supports all functions of chef(C/S).
17
17
  - You have only to manage one chef-repo.
18
18
 
19
- [Knife-Zero Document](https://knife-zero.github.io)(WIP)
19
+ - [Knife-Zero Document](https://knife-zero.github.io)
20
+ - [Knife-Zero Document(Ja)](https://knife-zero.github.io/ja/)
20
21
 
21
22
  ## Requirements
22
23
 
@@ -24,25 +25,8 @@ Run chef-client at remote node with chef-zero(local-mode) via HTTP over SSH port
24
25
 
25
26
  ## Installation
26
27
 
27
- Add this line to your application's Gemfile:
28
+ Relocated: [Installation | Knife-Zero Document](http://knife-zero.github.io/10_install/)
28
29
 
29
- gem 'knife-zero'
30
-
31
- And then execute:
32
-
33
- $ bundle
34
-
35
- Or install it yourself as:
36
-
37
- $ gem install knife-zero
38
-
39
- ### With Chef-DK
40
-
41
- Install via `chef gem` subcommand.
42
-
43
- ```
44
- $ chef gem install knife-zero
45
- ```
46
30
 
47
31
  ## Usage
48
32
 
@@ -265,124 +249,8 @@ e.g.) `bundle install --path vendor/bundle --binstubs`
265
249
 
266
250
  ### Need test on Vagrant ?
267
251
 
268
- You can test cookbooks easily by Test-Kitchen before manage remote nodes instead of using knife-zero for vagrant VM.
269
-
270
- See [Getting Started knife-zero with test-kitchen](https://github.com/higanworks/knife-zero-with-kitchen).
271
-
272
- ### Or, Try knife-zero simply with Vagrant.
273
-
274
- > **For Your Information** :
275
- > If only you want to try `chef-zero` or `chef-client localmode` (For instance: migrate from chef-solo), You should use [chef-zero provisioner(Vagrant)](http://docs.vagrantup.com/v2/provisioning/chef_zero.html) with vagrant.
276
- > The knife-zero will provides similar usage with the chef-zero provisioner on vagrant, but for remote node.
277
-
278
- Set local_mode as default to `knife.rb`.
279
-
280
- ```
281
- $ echo 'local_mode true' >> knife.rb
282
- ```
283
-
284
- Add host-only network to vagrant vm(strongly recommended).
285
-
286
- ```
287
- Vagrant.configure(2) do |config|
288
- config.vm.box = "opscode-ubuntu-14.04"
289
- config.vm.network "private_network", ip: "192.168.33.10"
290
- end
291
- ```
292
-
293
-
294
- Retrieve ssh-config.
295
-
296
- ```
297
- $ vagrant up
298
- $ vagrant ssh-config
299
- Host default
300
- HostName 127.0.0.1
301
- User vagrant
302
- Port 2201
303
- UserKnownHostsFile /dev/null
304
- StrictHostKeyChecking no
305
- PasswordAuthentication no
306
- IdentityFile /Users/sawanoboriyu/worktemp/knife-zero-vagrant/.vagrant/machines/default/virtualbox/private_key
307
- IdentitiesOnly yes
308
- LogLevel FATAL
309
- ```
310
-
311
- #### Case: Use name as address for ssh
252
+ Relocated: [Practice with Vagrant | Knife-Zero Document](https://knife-zero.github.io/tips/practice_with_vagrant/)
312
253
 
313
- Bootstrap with ssh options and `--sudo` to host-only address. And set ipaddress to name with `-N` option.
314
-
315
- ```
316
- $ ./bin/knife zero bootstrap 192.168.33.10 -i ./.vagrant/machines/default/virtualbox/private_key -N 192.168.33.10 -x vagrant --sudo
317
-
318
- WARN: No cookbooks directory found at or above current directory. Assuming /Users/sawanoboriyu/worktemp/knife-zero-vagrant.
319
- Connecting to 192.168.33.10
320
- 192.168.33.10 Installing Chef Client...
321
-
322
- ...
323
- ```
324
-
325
- Run zero converge with `-a name` option.
326
-
327
- > Caution: `-a(--attribute) name` option doesn't work since chef 12.1.0.
328
- > Please use specific attribute until fix it.
329
- > I've already create PR for fix. Please wait for merge to use name attribute. https://github.com/chef/chef/pull/3195
330
-
331
- ```
332
- $ knife zero converge "name:*" -x vagrant -i ./.vagrant/machines/default/virtualbox/private_key --sudo -a name
333
- WARN: No cookbooks directory found at or above current directory. Assuming /Users/sawanoboriyu/worktemp/knife-zero-vagrant.
334
- 192.168.33.10 Starting Chef Client, version 12.0.3
335
- 192.168.33.10 resolving cookbooks for run list: []
336
- 192.168.33.10 Synchronizing Cookbooks:
337
- 192.168.33.10 Compiling Cookbooks...
338
- 192.168.33.10 [2015-02-04T04:08:04+00:00] WARN: Node 192.168.33.10 has an empty run list.
339
- 192.168.33.10 Converging 0 resources
340
- 192.168.33.10
341
- 192.168.33.10 Running handlers:
342
- 192.168.33.10 Running handlers complete
343
- 192.168.33.10 Chef Client finished, 0/0 resources updated in 6.571334535 seconds
344
- ...
345
- ```
346
-
347
- #### Case: Use network specific attribute
348
-
349
- Bootstrap with ssh options and `--sudo` to host-only address.
350
-
351
- ```
352
- $ knife zero bootstrap 192.168.33.10 -i ./.vagrant/machines/default/virtualbox/private_key -x vagrant --sudo
353
-
354
- WARN: No cookbooks directory found at or above current directory. Assuming /Users/sawanoboriyu/worktemp/knife-zero-vagrant.
355
- Connecting to 192.168.33.10
356
- 192.168.33.10 Installing Chef Client...
357
- 192.168.33.10 --2015-02-03 16:44:56-- https://www.opscode.com/chef/install.sh
358
- 192.168.33.10 Resolving www.opscode.com (www.opscode.com)... 184.106.28.91
359
- 192.168.33.10 Connecting to www.opscode.com (www.opscode.com)|184.106.28.91|:443... connected.
360
- 192.168.33.10 HTTP request sent, awaiting response... 200 OK
361
- 192.168.33.10 Length: 18285 (18K) [application/x-sh]
362
- 192.168.33.10 Saving to: ‘STDOUT’
363
- 192.168.33.10
364
- 100%[======================================>] 18,285 --.-K/s in 0.002s
365
- ...
366
- ```
367
-
368
- The knife-zero creates `node.knife_zero.host` attribute when bootstrap.
369
-
370
- Run zero converge with `-a knife_zero.host` option.
371
-
372
- ```
373
- $ ./bin/knife zero converge "name:vagrant.vm" -x vagrant -i ./.vagrant/machines/default/virtualbox/private_key --sudo -a knife_zero.host
374
-
375
- 192.168.33.10 Starting Chef Client, version 12.0.3
376
- 192.168.33.10 resolving cookbooks for run list: []
377
- 192.168.33.10 Synchronizing Cookbooks:
378
- 192.168.33.10 Compiling Cookbooks...
379
- 192.168.33.10 [2015-02-03T17:03:37+00:00] WARN: Node vagrant.vm has an empty run list.
380
- 192.168.33.10 Converging 0 resources
381
- 192.168.33.10
382
- 192.168.33.10 Running handlers:
383
- 192.168.33.10 Running handlers complete
384
- 192.168.33.10 Chef Client finished, 0/0 resources updated in 6.245413202 seconds
385
- ```
386
254
 
387
255
  ## Debug for Configuration
388
256
 
data/knife-zero.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["sawanoboriyu@higanworks.com"]
11
11
  spec.summary = %q{Run chef-client at remote node with chef-zero(local-mode) via HTTP over SSH port fowarding.}
12
12
  spec.description = %q{Run chef-client at remote node with chef-zero(local-mode) via HTTP over SSH port fowarding.}
13
- spec.homepage = ""
13
+ spec.homepage = "http://knife-zero.github.io"
14
14
  spec.license = "Apache2"
15
15
 
16
16
  spec.files = Dir['README.md','CHANGELOG.md','knife-zero.gemspec','lib/**/*']
@@ -80,9 +80,17 @@ class Chef
80
80
  end
81
81
 
82
82
  def build_knifezero_attributes_for_node
83
+ ssh_url = String.new("ssh://")
84
+ ssh_url << config[:ssh_user] || Chef::Config[:knife][:ssh_user]
85
+ ssh_url << "@"
86
+ ssh_url << server_name
87
+ ssh_url << ":"
88
+ port = config[:ssh_port] || Chef::Config[:knife][:ssh_port] || 22
89
+ ssh_url << port.to_s
83
90
  attr = Mash.new
84
91
  attr[:knife_zero] = {
85
- host: server_name
92
+ host: server_name,
93
+ ssh_url: ssh_url
86
94
  }
87
95
  attr
88
96
  end
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Zero
3
- VERSION = "1.8.5"
3
+ VERSION = "1.8.6"
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-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.5
4
+ version: 1.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawanoboly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-25 00:00:00.000000000 Z
11
+ date: 2015-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -171,7 +171,7 @@ files:
171
171
  - lib/knife-zero/helper.rb
172
172
  - lib/knife-zero/net-ssh-multi-patch.rb
173
173
  - lib/knife-zero/version.rb
174
- homepage: ''
174
+ homepage: http://knife-zero.github.io
175
175
  licenses:
176
176
  - Apache2
177
177
  metadata: {}