Energy1190 / flask-web-rancher

+
0 stars 0 forks source link

Description

This program is designed to register stack in the Rancher. Stacks are registered based on docker-compose.yaml and rancher-compose.yaml files, with additional transfer of a number of variables from users.

Installation

When the docker is launched, the container must have the following variables:

There also exist a number of optional variables:

Note

Variable RANCHER_LB_NAME specifies the name of the load balancer service, if this value is not specified, the program assumes that you have one balancer and uses it. If you have more than one balancer and this variable is not set, the program will not work.

Variable RANCHER_SERVICE_NAME specifies the name of the service d in the created stack that will be used on the load balancer, if this variable is not specified, the application assumes that you have one service in the created stack and uses it. If you have more than one service in the stack, and the variable is not defined, the application will not work.

Variables DB_PORT and DB_ADMIN_USERNAME are specified by the application by default 3306 and root. But you can change them if necessary.

API

The application involves using the web interface, as well as addressing through software requests.

To access the application, you can use software tools such as curl. To receive a reply, you must pass a header Accept: application/json.

To get the list of stacks, you need to send a request:

For detailed information about the stack, you must send a request:

To delete the stack, you must send a request:

To add a stack, you must send a request: