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)