knife-zero 1.8.0 → 1.8.1
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE.txt +1 -1
- data/README.md +9 -43
- data/lib/chef/knife/zero_bootstrap.rb +5 -1
- data/lib/knife-zero/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e39c13ccfb06700b75faf777b099918ce95faacd
|
|
4
|
+
data.tar.gz: a944aa77a0e4642586f929510ce70c59b765a1a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db8c52fa6822403387d8cd0c4529eb0977a908b4c691ca8c41a62c35f567d5237e938b0407721cc9a4dadcf04230a106912ccf73aa6ec9bc25191abbc432ba8f
|
|
7
|
+
data.tar.gz: 6ede3e035a21562fe1b3730053f6e18397628ebf52f647896ef107cc687e7c46d3c822b8fd321db8c188a57fa035dda05f589a37f8efe02c7d2ff937d8b767ae
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
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](
|
|
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
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
data/lib/knife-zero/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|