6.将quick_start recipe添加到你的node中 (chef.example.com)
复制代码
# knife node run_list add node1.example.com 'recipe[quick_start]'
——————————————————————————
node1.example.com:
run_list: recipe[quick_start]
——————————————————————————
查看添加好的recipe
复制代码
# knife node show node1.example.com -r
——————————————————————————
node1.example.com:
run_list: recipe[quick_start]
——————————————————————————
6.在node客户端注册,从而获取server上recipe的具体实例 (node1.example.com)
注:保证/etc/chef下有client.pem与validation.pem证书文件,如果没有检查之前的配置.
复制代码# chef-client
————————————————————————————————————
[2014-05-08T23:55:33+08:00] WARN:
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SSL validation of HTTPS requests is disabled. HTTPS connections are still
encrypted, but chef is not able to detect forged replies or man in the middle
attacks.
To fix this issue add an entry like this to your configuration file:
```
# Verify all HTTPS connections (recommended)
ssl_verify_mode :verify_peer
# OR, Verify only connections to chef-server
verify_api_cert true
```
To check your SSL configuration, or troubleshoot errors, you can use the
`knife ssl check` command like so:
```
knife ssl check -c /etc/chef/client.rb
```
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Starting Chef Client, version 11.12.4
resolving cookbooks for run list: ["quick_start"]
Synchronizing Cookbooks:
- quick_start
Compiling Cookbooks...
Converging 1 resources
Recipe: quick_start::default
* template[/tmp/deep_thought.txt] action create
- create new file /tmp/deep_thought.txt
- update content in file /tmp/deep_thought.txt from none to feb62f
--- /tmp/deep_thought.txt 2014-05-08 23:55:43.098408727 +0800
+++ /tmp/chef-rendered-template20140508-8171-11cxwpb 2014-05-08 23:55:43.099454345 +0800










