安装saltstack-web管理界面

有运维或运维开发方面的需求,可以联系博主QQ 452336092或Email:admin#centos.bz(收费)

文章目录
[隐藏]

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

2、安装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

3、在配置文件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'

4、运行命令

$ sudo salt-call tls.create_self_signed_cert tls

5、启动并设置自启动服务

$ sudo systemctl restart salt-master
$ sudo systemctl restart salt-minion
$ sudo systemctl restart salt-api

6、网页打开访问地址

https://IP:8080

原文出处:118.89.186.83 -> http://118.89.186.83/?p=302

打赏

如果此文对你有所帮助,请随意打赏鼓励作者^_^