Skip to content

proxy and load-balancing settings automation for marathon mesos enviroment

License

Notifications You must be signed in to change notification settings

michallula/marathon-proxy-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

marathon-proxy-manager

Nginx proxy and load-balancing settings management automation for marathon mesos environment.

About

This tool generates Nginx server configuration base on available Marathon tasks. It fetches all Marathon tasks via marathon REST api, then groups it by application. For each application it produces Nginx server definition file. This file, contains by default, reverse proxy and load balancing definition (you can customise this behaviour by providing your own config file template). Default server definition assumes that application will be launch using subdomain (ex. sample-app application will be called with http://sample-app.some-domain.com). It redirects to one of the hosts on which the application is deployed.

Installation

To install type in terminal

pip install marathon-proxy-manager

Execution

After installation you may launch it using following command:

python -m marathon_proxy_manager --marathon-url http://some-domain:8080 --domain some-domain --delete-unused --override --reload

You should run it with sufficient privileges to write to your Nginx configuration directory and to call service nginx reload command (or you can provide --out-dir option and ).

To run this as a cron job add this line to the /etc/crontab:

* * * * * root python -m marathon_proxy_manager --marathon-url http://some-domain:8080 --domain some-domain --delete-unused --override --reload 2> /var/log/marathon_proxy_manager/err.log > /var/log/marathon_proxy_manager/out.log

Options

To show all options type:

python -m marathon_proxy_manager -h

About

proxy and load-balancing settings automation for marathon mesos enviroment

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages