Haproxy integration for mcloud
Project description
Haproxy publishing
============================
Haproxy plugin install haproxy as a load balancer for mcloud. Plugin is useful when you need
deploy multiple applications on one server, or use complex application publishing
Multiple applications
-------------------------
.. uml::
cloud Internet {
}
package Docker {
[Haproxy] << Load Balancer >>
database App1 {
[nginx.myapp]
[another.myapp]
[something.myapp]
}
database App2 {
[nginx.another]
[another.another]
}
Haproxy ..> nginx.myapp
Haproxy ..> nginx.another
}
Internet ..> Haproxy
Multiple versions
-------------------------
.. uml::
cloud Internet {
}
package Docker {
[Haproxy] << Load Balancer >>
[nodejs.app_v1]
[nodejs.app_v2]
Haproxy ..> nodejs.app_v1
Haproxy -> nodejs.app_v2
}
Internet ..> Haproxy
Haproxy template
-----------------------
You can use your own template by placing it in /root/.mcloud/haproxy.tpl. Mcloud kindly places default config there.
.. highlights::
Template is Jinja2 template http://jinja.pocoo.org/docs/
To apply your changes to template restart mcloud::
$ docker restart mcloud
Default tamplate
^^^^^^^^^^^^^^^^^^
.. literalinclude:: mcloud_haproxy.py
:lines: 21-94
:language: jinja
============================
Haproxy plugin install haproxy as a load balancer for mcloud. Plugin is useful when you need
deploy multiple applications on one server, or use complex application publishing
Multiple applications
-------------------------
.. uml::
cloud Internet {
}
package Docker {
[Haproxy] << Load Balancer >>
database App1 {
[nginx.myapp]
[another.myapp]
[something.myapp]
}
database App2 {
[nginx.another]
[another.another]
}
Haproxy ..> nginx.myapp
Haproxy ..> nginx.another
}
Internet ..> Haproxy
Multiple versions
-------------------------
.. uml::
cloud Internet {
}
package Docker {
[Haproxy] << Load Balancer >>
[nodejs.app_v1]
[nodejs.app_v2]
Haproxy ..> nodejs.app_v1
Haproxy -> nodejs.app_v2
}
Internet ..> Haproxy
Haproxy template
-----------------------
You can use your own template by placing it in /root/.mcloud/haproxy.tpl. Mcloud kindly places default config there.
.. highlights::
Template is Jinja2 template http://jinja.pocoo.org/docs/
To apply your changes to template restart mcloud::
$ docker restart mcloud
Default tamplate
^^^^^^^^^^^^^^^^^^
.. literalinclude:: mcloud_haproxy.py
:lines: 21-94
:language: jinja
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for mcloud-plugin-haproxy-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a878507b3dda27470f6ff66136d141ed35e16b682a82de3a7a55e478911cd5de |
|
MD5 | 0b84156b0db8d74f92e319c3f7cf37ab |
|
BLAKE2b-256 | 55782f6e05a370b7b1523c398f34dc5328ebce93021e6b6737d78a099470e8b6 |