1. 安装依赖包

1
#yum install -y git salt-api

2. 下载halite

1
2
3
4
5
6
7
8
# git clone https://github.com/saltstack/halite
Initialized empty Git repository in /root/halite/.git/
remote: Counting objects: 5055, done.
Receiving objects: 100% (5055/5055), 10.56 MiB | 42 KiB/s, done.
remote: Total 5055 (delta 0), reused 0 (delta 0)
Resolving deltas: 100% (2743/2743), done.
# cd halite/halite
# ./genindex.py -C

3. 添加用户 配置halite

1
2
# useradd salt
# passwd salt

新建启动配置文件 /etc/salt/master.d/saltui.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# vi /etc/salt/master.d/saltui.conf
rest_cherrypy:
host: 0.0.0.0
port: 8080
debug: true
disable_ssl: True
static: /root/halite/halite
app: /root/halite/halite/index.html

external_auth:
pam:
salt:
- .*
- '@runner'
- '@wheel'

4. 重启salt-master 服务

1
#service salt-master restart

5. 启动Halite

1
2
#cd /root/halite/halite
# python server_bottle.py -d -C -l debug -s cherrypy

6. 启动后登录http://ip:8080/app,然后用salt/salt登陆即可。