1. 程式人生 > >puppet核心內容

puppet核心內容

1.搭建,叢集搭建:http://jingpin.jikexueyuan.com/article/48475.html(這個牛逼)

2.目錄結構: 認準puppet.conf這個檔案

3.有命令不會咋辦?puppet help,進一步的不會咋辦?puppet help xx 命令,比如 puppet help cert即可檢視puppet cert咋用

4.認證:三種方式:驗證後的東東放在自己目錄的ssl下(參考自http://blog.51cto.com/superleedo/1900417

            a.手動,客戶端先請求(puppet agent --server=xxxxx --no-daemonize –verbose或者puppet agent --server=xxxxx  --test),master驗證(逐個puppet cert --sign certnmame或者puppet cert --sign --all(有安全問題))

            b.自動:安全係數低,原理是指定哪些規則的node可以直接批准簽發,,,只要在master上編寫ACL配置(/etc/puppet/autosign.conf ,需要重啟puppet)即可,然後agent端直接puppet agent --test。

            c.預簽名認證,安全係數最高,操作繁瑣(預先在master上生成agent證書(puppet ca --generate agent1_cert.puppet.com),再把證書拷貝到節點機上去(三個檔案ssl/private_keys/agent1_cert.puppet.com.pem,ssl/certs/agent1_cert.puppet.com.pem,ssl/certs/ca.pem),操作可以利用kickstart或者cobble協助自動化完成)

各種命令:

認證相關:agent那邊:puppet agent --test,master這邊先檢視有哪些,然後sign,puppet cert --list --all  ,puppet cert --sign xxx,puppet cert --list --all再檢視時可以看到,對應的請求前面有加號,檢視認證的另一種辦法,路徑檢視tree /var/lib/puppet/ssl/(這裡也可能是根據puppet.conf裡面的路徑檢視),裡面有個signed目錄。

 

http://www.bubuko.com/infodetail-2296973.html

清除xxxx的認證 : puppet cert --clean xxxx

測試:puppet agent --test