Salt-api use (Benefit version)

Source: Internet
Author: User

Written in the previous words:

Salt-api is a REST API program based on the CherryPy (a Python web framework).

Note: cherrypy version 3.2.5 to 3.7.x There is a known SSL trace . Please use the 3.2.3 version or the latest 10.x version.

First, salt certification

Depend on:

Salt-api dependent module is CherryPy, which is used to support WebSockets ws4py python module (optional)

Installation and configuration:

The SALT-API runs on the Salt Master program's machine.

1. To install the SALT-API, you need to ensure that the SALT-API is consistent with the salt version.

2. Install cherrypy,ws4py (optional).

3. Generate a self-signed certificate (optional). It is recommended that you use a secure HTTPS connection because the Salt Eauth authentication credentials will be sent over the wire.

①. Install the PYOPENSSL package.

②. Using create_self_signed_cert()  The execute function generates a self-signed certificate.

Salt-call--local Tls.create_self_signed_cert

4. Edit the configuration file to add at least one external authentication user or group. Details here .

5. Salt-master configuration file Add the following configuration to enable the Rest_cherrypy module.

Rest_cherrypy:  port:8000  ssl_crt:/etc/pki/tls/certs/localhost.crt  ssl_key:/etc/pki/tls/certs/ Localhost.key

6. Restart the salt-master process.

7. Restart the SALT-API process.

Second, use

Start using the road, right.

Not to be continued ...

Salt-api use (Benefit version)

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.