安装saltstack-web管理界面
1、安装salt-master、salt-minion和salt-api
$ sudo yum install epel-release -y $ sudo yum install salt-master salt-minion salt-api -y # 配置教程请看 文章 。
# 启动并设置开机启动服务 $ sudo systemctl start salt-master $ sudo systemctl enable salt-master $ sudo systemctl start salt-minion $ sudo systemctl enable salt-minion $ sudo systemctl start salt-api $ sudo systemctl enable salt-api
3、安装halite及其依赖文件
$ sudo yum install python-pip -y && sudo pip install --upgrade pip $ sudo pip install -U halite $ sudo pip install cherrypy $ sudo pip install paste $ sudo yum install python-devel gcc -y $ sudo pip install gevent $ sudo pip install pyopenssl
4、在配置文件master
$ sudo vim /etc/salt/master external_auth: pam: testuser: //此用户设置为系统在用的用户 - .* - '@runner' halite: level: 'debug' server: 'cherrypy' host: '0.0.0.0' port: '8080' cors: False tls: True certpath: '/etc/pki/tls/certs/localhost.crt' keypath: '/etc/pki/tls/certs/localhost.key' pempath: '/etc/pki/tls/certs/localhost.pem'
5、运行命令
$ sudo salt-call tls.create_self_signed_cert tls
6、启动并设置自启动服务
$ sudo systemctl restart salt-master $ sudo systemctl restart salt-minion $ sudo systemctl restart salt-api
7、网页打开访问地址
https://IP:8080 //登录用户为刚刚设置的系统用户
官方安装教程:https://docs.saltstack.com/en/latest/topics/tutorials/halite.html