Skip to main content

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcloud-plugin-haproxy-1.0.4.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file mcloud-plugin-haproxy-1.0.4.tar.gz.

File metadata

File hashes

Hashes for mcloud-plugin-haproxy-1.0.4.tar.gz
Algorithm Hash digest
SHA256 c7e300139b6fe5abc0e5ca3562ee1e1cd4fdc76ef845997e1bb95690c95cf88a
MD5 af2eed2d872a2715113e822fa34dc34f
BLAKE2b-256 060a0a944f1f29879aae63d66c58771cd1dc98a9ba70f0511a6deb5f80fd83bf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page