Saltstack console平台界面配置
Saltstack console平台界面配置
1.cd /usr/local/src
3.生成index.html ./genindex.py -C
4.安装salt-api:
(1)、程序安装:
yum -y install salt-api pyOpenSSL
chkconfig salt-api on //开机自启
(2)、配置salt-api:
sed -i '/#default_include/s/#default/default/g' /etc/salt/master
mkdir /etc/salt/master.d
(3)、创建salt-api用户
useradd -M -s /sbin/nologin jason
echo '123456aa' | passwd jason --stdin
(4)、添加新的配置文件/etc/salt/master.d/api.conf
#vi /etc/salt/master.d/api.conf
rest_cherrypy:
host: 0.0.0.0
port: 8080
ssl_crt: /etc/pki/tls/certs/localhost.crt
ssl_key: /etc/pki/tls/certs/localhost.key
debug: true
static: /usr/local/src/halite/halite
app: /usr/local/src/halite/halite/index.html
(5)、添加新的配置文件/etc/salt/master.d/eauth.conf
external_auth:
pam:
jason:
- .*
- '@wheel'
- '@runner'
(6)、生成自签名证书:
salt-call tls.create_self_signed_cert (如果存在,删除对应的文件夹就行)
(7)、重启salt-master && 启动salt-api
service salt-master restart
service salt-api start
启动sap-api
cd /usr/local/src/halite/halite
python server_bottle.py -d -C -l debug -s cherrypy
接下来就可以访问了,打开网页http://192.168.140.128:8080/app