puppet是配置管理工具的一種,這篇文章主要介紹一下puppet的安裝與設定。
puppet是puppetlabs出品的配置管理工具,每年的dora的devops報告就是有puppetlabs牽頭做的,puppet作為出色的管理工具,也是可圈可點。通過可讀性很好的設定描述資訊,可以完成很多複雜的功能,比如如下確保軟體wget被安裝,使用者admin被建立,而不用關係太多具體細節,剩餘的交給agent/master構成的puppet來做。
package
user
puppet可以作為agent/master的模式也可以用於stand-alone的模式,後者則僅僅作為單機版本工具的使用,可根據情況進行選擇。
本文的安裝與設定資訊如下
iphostname
ospuppet軟體
192.169.31.131
host131
centos7.4
puppet-server 5.4
192.169.31.133
host133
centos7.4
puppet-agent 5.4
安裝puppet master需要如下步驟:
版本確認
[root@host131 ~]# puppet --version
5.4.0
[root@host131 ~]#
安裝puppet agent需要如下步驟:
版本確認
[root@host133 ~]# puppet --version
5.4.0
[root@host133 ~]#
在master所在節點host131,使用如下命令啟動master,其中–debug為輸出除錯資訊
[root@host131 ~]# puppet master --no-daemonize --debug
debug: evicting cache entry for environment 'production'
debug: caching environment 'production' (ttl = 0 sec)
...
在agent所在節點host133,嘗試連線host133,因為非預設設定,可通過server=host131傳入設定
[root@host133 ~]#根據提示發現證書設定不正確,所以接下來需要設定伺服器側證書資訊
列出當前證書資訊,發現有兩張證書,其中當前機器host131的和host133,host133前不帶+表明此證書未通過審核。
[root@host131 ~]# puppet
cert
list
-all
"host133" (sha256) 52:2a
:ae:c0
:58:47
:b1:c3
:8e:bc
:80:f5
:51:71
:6c:46
:77:58
:00:4c
:96:61
:6d:fa
:4e:ad
:59:4b
:f6:71
:78:4e
+ "host131" (sha256) 0e
:2e:2b
:22:61
:e8:f1
:59:3a
:e4:92
:f9:99
:2e:3f
:d4:7f
:d6:e6
:83:21
:e0:96
:4b:1f
:4e:7a
:a3:d4
:ee:fa
:78[root@host131 ~]#
因為證書host133未通過審核,所以從客戶端host133發過來的測試資訊未能通過,使用命令對此證書進行審核和確認
[root@host131 ~]# puppet cert sign host133
signing
certificate
request
for:
"host133" (sha256) 52:2
a:ae
:c0:58:
47:b1
:c3:8e:
bc:80:f5:51
:71:6
c:46:77
:58:00
:4c:96:61
:6d:fa:4
e:ad:59
:4b:f6:71
:78:4e
notice
:signed certificate request for host133
notice
:removing file puppet::ssl::certificaterequest host133 at '/etc/puppetlabs/puppet/ssl/ca/requests/host133.pem'
[root@host131 ~]#
[root@host131 ~]# puppet cert list -all
+ "host131" (sha256) 0e:2e:
2b:22:
61:e8
:f1:59:
3a:e4:
92:f9:99
:2e:3
f:d4:7
f:d6
:e6:83:
21:e0:96
:4b:1
f:4e:7
a:a3
:d4:ee
:fa:
78+ "host133" (sha256) 68:4
b:45
:dd:
99:c7
:f7:ed:25
:bb:dc
:bd:18:
3a:81:
8c:ef:
9f:1d:
3e:fb:
1e:2d:
73:b3:77
:31:de:
46:e4
:e1:e5
[root@host131 ~]#
再次進行agent連線,則發現agent已經能夠正常與master進行通訊了。
[root@host133 ~]# puppet agent --server=host131 --test
info: caching certificate for host133
info: caching certificate_revocation_list for ca
info: caching certificate for host133
info: using configured environment 'production'
info: retrieving pluginfacts
info: retrieving plugin
info: retrieving locales
info: caching catalog for host133
info: creating state file /opt/puppetlabs/puppet/cache/state/state.yaml
[root@host133 ~]#
軟體配置管理工具 轉貼
近五年來,全球主要廠商的軟體配置管理工具在中國的市場局面已逐漸開啟,隨著中國軟體開發團隊對配置管理軟體認可度的大幅度提高,2004 2006年,配置管理軟體在中國市場將繼續保持快速增長的勢頭。根據調查,目前活躍在國內軟體配置管理市場的clearcase firefly harvest vss pvc...
配置管理工具SVN使用
一 服務端的安裝和使用 server 安裝 可能會出現埠號被占用的情況 port 443 is occupied by 修改 系統占用 1 1023 使用者可用 1024 65535 使用 1 建立倉庫 配置庫repositories test 右擊repositories 選擇create new...
軟體配置管理工具列表大全
rational clearcase 自動追蹤每乙個檔案和目錄的變更情況,通過分支和歸併功能支援並行開發。在軟體開發環境中,clearcase可以對每一種物件型別 包括源 二進位制檔案 目錄內容 可執行檔案 文件 測試包 編譯器 庫檔案等 實現版本控制。因而,clearcase提供的能力遠遠超出資源...