一、服務(wù)環(huán)境
創(chuàng)新互聯(lián)公司主要從事網(wǎng)站制作、網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計(jì)、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)邗江,十余年網(wǎng)站建設(shè)經(jīng)驗(yàn),價(jià)格優(yōu)惠、服務(wù)專業(yè),歡迎來電咨詢建站服務(wù):18980820575
--------------------------------------------------------------
序號 | 設(shè)備型號 | 設(shè)備IP | 設(shè)備用途 |
1 | 虛擬機(jī) | 192.168.122.100 | salt master |
2 | 虛擬機(jī) | 192.168.122.101 | salt minion |
3 | 虛擬機(jī) | 192.168.122.102 | salt minion |
4 | 虛擬機(jī) | 192.168.122.103 | salt minion |
5 | 虛擬機(jī) | 192.168.122.104 | salt minion |
6 | 虛擬機(jī) | 192.168.122.105 | salt minion |
二、相關(guān)saltstack rpm安裝包
相關(guān)RPM安裝包和腳本見(http://down.51cto.com/data/2226975),腳本在redhat6.3上可用,其他版本系統(tǒng)上需要自行修改。
----------------------------------------------------------------
libyaml-0.1.3-1.4.el6.x86_64.rpm openpgm-5.1.118-3.el6.x86_64.rpm python-babel-0.9.4-5.1.el6.noarch.rpm python-backports-1.0-3.el6.x86_64.rpm python-backports-ssl_match_hostname-3.4.0.2-1.el6.noarch.rpm python-chardet-2.0.1-1.el6.noarch.rpm python-jinja2-2.2.1-2.el6_5.x86_64.rpm python-msgpack-0.1.13-3.el6.x86_64.rpm python-ordereddict-1.1-2.el6.noarch.rpm python-requests-1.1.0-4.el6.noarch.rpm python-six-1.7.3-1.el6.noarch.rpm python-urllib3-1.5-7.el6.noarch.rpm python-zmq-14.3.1-1.el6.x86_64.rpm PyYAML-3.10-3.1.el6.x86_64.rpm salt-2014.7.0-3.el6.noarch.rpm salt-master-2014.7.0-3.el6.noarch.rpm salt-minion-2014.7.0-3.el6.noarch.rpm sshpass-1.05-1.el6.x86_64.rpm zeromq3-3.2.4-1.el6.x86_64.rpm
三、首先在salt-master服務(wù)端上利用寫好的腳本安裝服務(wù)端和客戶端(服務(wù)端上也需要安裝客戶端的)
[root@datanode04 salt]# ./install_saltstack.sh ***if you want to use this machine as a salt-server,choose 1 ***if you want to use this machine as a salt-client,choose 2
四、配置saltsatck
4.1 master配置
[root@nagios-monitor salt]# vim /etc/salt/master [root@nagios-monitor salt]# cat /etc/salt/master |grep "^interface" interface: 192.168.122.100 [root@nagios-monitor salt]#
4.2 minion配置
[root@nagios-monitor salt]# vim /etc/salt/minion [root@nagios-monitor salt]# cat /etc/salt/minion|grep "^master" master: 192.168.122.100 [root@nagios-monitor salt]#
五、啟動(dòng)saltstack
5.1 啟動(dòng)master并加入開機(jī)自啟動(dòng)
[root@nagios-monitor salt]# chkconfig --list|grep salt salt-master 0:關(guān)閉 1:關(guān)閉 2:啟用 3:啟用 4:啟用 5:啟用 6:關(guān)閉 salt-minion 0:關(guān)閉 1:關(guān)閉 2:啟用 3:啟用 4:啟用 5:啟用 6:關(guān)閉 [root@nagios-monitor salt]# service salt-master start Starting salt-master daemon: [確定] [root@nagios-monitor salt]# service salt-minion start Starting salt-minion daemon: [確定] [root@nagios-monitor salt]#
六、測試saltstack
接下來的命令都在master上執(zhí)行
6.1 查看minion列表
[root@nagios-monitor salt]# salt-key -L Accepted Keys: Unaccepted Keys: nagios-monitor Rejected Keys:
6.2 接收所有key
[root@nagios-monitor salt]# salt-key -A The following keys are going to be accepted: Unaccepted Keys: nagios-monitor Proceed? [n/Y] Y Key for minion nagios-monitor accepted.
6.3 簡單測試
[root@nagios-monitor salt]# salt "*" test.ping nagios-monitor: True
七、在其他客戶端上安裝客戶端相關(guān)rpm軟件包
7.1 安裝相關(guān)軟件包
[root@datanode04 salt]# ./install_saltstack.sh ***if you want to use this machine as a salt-server,choose 1 ***if you want to use this machine as a salt-client,choose 2 you want to use this machine as [ salt-server(=1)|salt-client(=2) ]:2 warning: libyaml-0.1.3-1.4.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY Preparing... ########################################### [100%] 1:libyaml ########################################### [100%] warning: PyYAML-3.10-3.1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY Preparing... ########################################### [100%] 1:PyYAML ########################################### [100%] warning: python-babel-0.9.4-5.1.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY Preparing... ########################################### [100%] 1:python-babel ########################################### [100%] warning: python-jinja2-2.2.1-2.el6_5.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY Preparing... ########################################### [100%] 1:python-jinja2 ########################################### [100%] warning: python-msgpack-0.1.13-3.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:python-msgpack ########################################### [100%] warning: python-chardet-2.0.1-1.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:python-chardet ########################################### [100%] warning: python-ordereddict-1.1-2.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:python-ordereddict ########################################### [100%] warning: python-backports-1.0-3.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:python-backports ########################################### [100%] warning: python-backports-ssl_match_hostname-3.4.0.2-1.el6.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 17ed316d: NOKEY Preparing... ########################################### [100%] 1:python-backports-ssl_ma########################################### [100%] warning: python-six-1.7.3-1.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:python-six ########################################### [100%] warning: python-urllib3-1.5-7.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:python-urllib3 ########################################### [100%] warning: python-requests-1.1.0-4.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:python-requests ########################################### [100%] warning: openpgm-5.1.118-3.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:openpgm ########################################### [100%] warning: zeromq3-3.2.4-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:zeromq3 ########################################### [100%] warning: python-zmq-14.3.1-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:python-zmq ########################################### [100%] warning: sshpass-1.05-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:sshpass ########################################### [100%] warning: salt-2014.7.0-3.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:salt ########################################### [100%] warning: salt-minion-2014.7.0-3.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:salt-minion ########################################### [100%]
7.2 修改客戶端相關(guān)配置文件以及啟動(dòng)客戶端服務(wù)(參照上面步驟四和步驟五)
八、接收客戶端key
[root@nagios-monitor software]# salt-key -L Accepted Keys: nagios-monitor namenode Unaccepted Keys: datanode01 datanode02 datanode03 datanode04 Rejected Keys: [root@nagios-monitor software]# salt-key -A The following keys are going to be accepted: Unaccepted Keys: datanode01 datanode02 datanode03 datanode04 Proceed? [n/Y] Y Key for minion datanode01 accepted. Key for minion datanode02 accepted. Key for minion datanode03 accepted. Key for minion datanode04 accepted.
網(wǎng)站標(biāo)題:saltstack服務(wù)配置
網(wǎng)站網(wǎng)址:http://m.rwnh.cn/article10/jepogo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供企業(yè)建站、建站公司、關(guān)鍵詞優(yōu)化、做網(wǎng)站、自適應(yīng)網(wǎng)站、靜態(tài)網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)