Saltstack API (i)

Source: Internet
Author: User
Tags saltstack

A), install the configuration API

[[Email Protected]_master ~]# pipInstallpyopenssl #安装依赖包[[Email Protected]_master~]#Yum Installsalt-API #安装api服务[[Email Protected]_master~]# useradd username &&Echopassword |passwd--stdin $username #添加用户[[Email Protected]_master~]# Salt-call--local Tls.create_self_signed_cert#生成key, default directory/etc/pki/tls/ certs[[Email Protected]_master~]#VI/etc/salt/Masterrest_cherrypy:port:8000 #api端口debug:true ssl_crt:        /etc/pki/tls/certs/localhost.crt Ssl_key:/etc/pki/tls/certs/localhost.keyexternal_auth:pam: #采用linux自带的加密方式saltapi: #之前添加的用户名 - .*#主机组      -'@wheel' #所需要调用的模块 (e.g., cmd.*,file.*), which represents all permissions-'@runner'[[Email Protected]_master~]# Service Salt-api Start
[Email protected]_master ~]# service Salt-master restart

Log view/var/log/salt/master or Salt-master-l debug

Test

[Email protected]_master ~]# netstat-ntlp|grep 8080[[Email Protected]_master~]# curl-k https://192.168.132.148:8000/login-h "Accept:application/x-yaml"-D username= ' Saltapi '-D password= ' Saltapi '-D eauth=pam return:-Eauth:pamexpire:1509451924.783881perms:- .*-'@wheel'-'@runner'Start:1509408724.78388 token:1887a5cdc7b675687915fa9363a54ec8224d4282user:saltapi

Saltstack API (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.