安裝halite
方法一:失敗,待查原因
1、安裝並啟動salt-api
yum
install
salt-api –y
service salt-api start
chkconfig salt-api on
2、安裝halite及其依賴文件
yum
install
python-pip –y
pip
install
--upgrade pip
pip
install
-U halite
pip
install
cherrypy
pip
install
paste
yum
install
python-devel
gcc
–y
pip
install
gevent
pip
install
pyopenssl
- pip install tornado
創建登錄用戶
- useradd salt
- echo "salt" |passwd --stdin salt
3、修改master配置文件
方法二:
#yum install git
下載代碼
#cd /var/www
#git clone https://github.com/saltstack/halite
生成index.html
# cd halite/halite # ./genindex.py -C
安裝salt-api
# yum install salt-api
添加登陸用戶
# useradd salt # echo salt|passwd –stdin salt
配置salt master文件
配置salt的master文件,添加:
rest_cherrypy: host: 0.0.0.0 port: 8080 debug: true static: /root/halite/halite app: /root/halite/halite/index.html
external_auth: pam: salt: - .* - '@runner' - '@wheel'
重啟master;
# /etc/init.d/salt-master restart
啟動 salt-api,啟動web界面(兩種啟動方式)
#cd /var/www/halite/halite
(1)#nohup python2.6 server_bottle.py -d -C -l debug -s cherrypy & #不使用nohup的話為前台運行
(2)# salt-api –d ---后台運行
然后打開http://ip:8080/app
,通過salt/salt登陸即可。
https://docs.saltstack.com/en/latest/topics/tutorials/halite.html