1、克隆地址
cd /usr/local
git clone https://github.com/saltstack/halite
2、生成index.html文件:
cd /usr/local/halite/halite
./genindex.py -C
3、配置master文件,新增配置文件
rest_cherrypy:
host: 0.0.0.0
port: 8080
debug: true
static: /usr/local/halite/halite
app: /usr/local/halite/halite/index.html
external_auth:
pam:
saltapi:
- '*'
4、启动服务
python server_bottle.py -d -C -l debug -s cherrypy
5、问题汇总
问题1:
Traceback (most recent call last):
File "/usr/local/halite/halite/bottle.py", line 3004, in run
server.run(app)
File "/usr/local/halite/halite/bottle.py", line 2680, in run
from cherrypy import wsgiserver
ImportError: cannot import name wsgiserver
解决:
cherrypy 版本过高,降低版本
pip install "cherrypy>=3.0.8,<9.0.0" #解决问题