knife-zero 1.8.0 → 1.8.1

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: bdf0989e9de6228b25f20b31a9ec5d39255360d6
4
- data.tar.gz: e6c149cefe11911ff06ab5e2b5f03e114ab69d06
3
+ metadata.gz: e39c13ccfb06700b75faf777b099918ce95faacd
4
+ data.tar.gz: a944aa77a0e4642586f929510ce70c59b765a1a4
5
5
  SHA512:
6
- metadata.gz: e902a417918ddd8eb00c2461c75f7b68e69034ff4375224a1fb10fd3f03fb4f7db211d64d3d49bd99be6b40855744e8ed4d3c40344523932cbe4e078ad502e10
7
- data.tar.gz: 19f63fd413efba43e48ddd10189046ffda6ea4b506063df448a0d8514274c00f9fcf29d3f90f7ae557e7b5b2656b23ac552b7ba5054fc9ba7857fe92b2bc4816
6
+ metadata.gz: db8c52fa6822403387d8cd0c4529eb0977a908b4c691ca8c41a62c35f567d5237e938b0407721cc9a4dadcf04230a106912ccf73aa6ec9bc25191abbc432ba8f
7
+ data.tar.gz: 6ede3e035a21562fe1b3730053f6e18397628ebf52f647896ef107cc687e7c46d3c822b8fd321db8c188a57fa035dda05f589a37f8efe02c7d2ff937d8b767ae
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## v1.8.1
6
+
7
+ - Follow Chef: check first_boot_attribute_from_file flag for knife_zero.host attribute(normal).
8
+
5
9
  ## v1.8.0
6
10
 
7
11
  - Feature: set bootstraped host to knife_zero.host attribute(normal) #57
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 sawanoboly@higanworks.com
1
+ Copyright (c) 2014-2015 sawanoboly@higanworks.com
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -16,7 +16,7 @@ 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](http://higanworks.com/knife-zero/)(WIP)
19
+ [Knife-Zero Document](https://knife-zero.github.io)(WIP)
20
20
 
21
21
  ## Requirements
22
22
 
@@ -137,7 +137,7 @@ $ parallel -j 5 ./bin/knife zero bootstrap ::: nodeA nodeB nodeC...
137
137
 
138
138
  #### (Hint)Supress Automatic Attributes
139
139
 
140
- knife-zero supports appengding [whitelist-attributes](https://docs.chef.io/attributes.html#whitelist-attributes) to client.rb at bootstrap.
140
+ knife-zero supports appending [whitelist-attributes](https://docs.chef.io/attributes.html#whitelist-attributes) to client.rb at bootstrap.
141
141
 
142
142
  For example, set array to `knife.rb`.
143
143
 
@@ -169,6 +169,9 @@ It means knife-zero will collects and updates only listed attributes to local fi
169
169
  {
170
170
  "name": "knife-zero.example.com",
171
171
  "normal": {
172
+ "knife_zero" : {
173
+ "host" : "xxx.xxx.xxx.xxx(bootstraped_target)"
174
+ },
172
175
  "tags": [
173
176
 
174
177
  ]
@@ -341,7 +344,7 @@ WARN: No cookbooks directory found at or above current directory. Assuming /Use
341
344
  ...
342
345
  ```
343
346
 
344
- #### Case: Set specific attribute for ssh
347
+ #### Case: Use network specific attribute
345
348
 
346
349
  Bootstrap with ssh options and `--sudo` to host-only address.
347
350
 
@@ -362,38 +365,12 @@ Connecting to 192.168.33.10
362
365
  ...
363
366
  ```
364
367
 
365
- You can see node which was bootstrapped at list.
368
+ The knife-zero creates `node.knife_zero.host` attribute when bootstrap.
366
369
 
367
- ```
368
- $ knife node list
369
-
370
- vagrant.vm
371
- ```
372
-
373
- Set unique attribute to node by `node edit`, such as `chef_ip`.
374
-
375
- ```
376
- $ knife node edit vagrant.vm
377
- {
378
- "name": "vagrant.vm",
379
- "chef_environment": "_default",
380
- "normal": {
381
- "chef_ip" : "192.168.33.10",
382
- "tags": [
383
-
384
- ]
385
- },
386
- "run_list": [
387
-
388
- ]
370
+ Run zero converge with `-a knife_zero.host` option.
389
371
 
390
- }
391
372
  ```
392
-
393
- Run zero converge with `-a chef_ip` option.
394
-
395
- ```
396
- $ ./bin/knife zero converge "name:vagrant.vm" -x vagrant -i ./.vagrant/machines/default/virtualbox/private_key --sudo -a chef_ip
373
+ $ ./bin/knife zero converge "name:vagrant.vm" -x vagrant -i ./.vagrant/machines/default/virtualbox/private_key --sudo -a knife_zero.host
397
374
 
398
375
  192.168.33.10 Starting Chef Client, version 12.0.3
399
376
  192.168.33.10 resolving cookbooks for run list: []
@@ -407,17 +384,6 @@ $ ./bin/knife zero converge "name:vagrant.vm" -x vagrant -i ./.vagrant/machines/
407
384
  192.168.33.10 Chef Client finished, 0/0 resources updated in 6.245413202 seconds
408
385
  ```
409
386
 
410
- #### Case: don't use name or specific attribute..?
411
-
412
- For example, you can use ipv4 of eth1(or others) like below.
413
-
414
- ```
415
- $ knife zero converge "name:*" -x vagrant -i ./.vagrant/machines/default/virtualbox/private_key --sudo -a network.interfaces.eth1.addresses.keys.rotate.first
416
-
417
- 192.168.33.10 Starting Chef Client, version 12.0.3
418
- 192.168.33.10 resolving cookbooks for run list: []
419
- ```
420
-
421
387
  ## Debug for Configuration
422
388
 
423
389
  `knife zero diagnose` shows configuration from file(Such as knife.rb).
@@ -27,7 +27,11 @@ class Chef
27
27
  :proc => lambda { |v| Chef::Config[:knife][:bootstrap_converge] = v }
28
28
 
29
29
  def run
30
- @config[:first_boot_attributes] = @config[:first_boot_attributes].merge(build_knifezero_attributes_for_node)
30
+ if @config[:first_boot_attributes_from_file]
31
+ @config[:first_boot_attributes_from_file] = @config[:first_boot_attributes_from_file].merge(build_knifezero_attributes_for_node)
32
+ else
33
+ @config[:first_boot_attributes] = @config[:first_boot_attributes].merge(build_knifezero_attributes_for_node)
34
+ end
31
35
  super
32
36
  end
33
37
 
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Zero
3
- VERSION = "1.8.0"
3
+ VERSION = "1.8.1"
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.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawanoboly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-27 00:00:00.000000000 Z
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler