salt-api配置

salt-api配置

一、安装salt-api相关软件

1
2
3
4
5
6
7
8
9
10
yum install salt-minion.noarch -y
yum install salt-master.noarch -y
yum install salt-syndic.noarch -y
yum install salt-api.noarch -y
yum install pyOpenSSL.x86_64 -y

#设置开机自启动
chkconfig salt-api on
chkconfig salt-master on
chkconfig salt-minion on

二、配置salt-api

  1. 在salt-master的/etc/salt/下创建master.d文件夹创建api.conf和eauth.conf文件,具体内容如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# api.conf
rest_cherrypy:
port: 8000 # salt-api 监听端口
ssl_crt: /etc/pki/tls/certs/localhost.crt # ssl认证的证书
ssl_key: /etc/pki/tls/private/localhost_nopass.key

# eauth.conf
external_auth:
pam:
hbaseapi:
- .*
- '@wheel' # to allow access to all wheel modules
- '@runner' # to allow access to all runner modules
- '@jobs' # to allow access to the jobs runner and/or wheel module
  1. 创建localhost.crt和localhost_nopass.key
1
2
3
4
5
6
7
8
9
cd /etc/pki/tls/certs/
make testcert
hbaseapi
hbaseapi
hbaseapi

cd ../private/
openssl rsa -in localhost.key -out localhost_nopass.key
hbaseapi
  1. 重启salt-master和salt-api
1
2
service salt-master restart
service salt-api restart

×

纯属好玩

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

文章目录
  1. 1. salt-api配置
    1. 1.0.1. 一、安装salt-api相关软件
    2. 1.0.2. 二、配置salt-api
,