Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tuenti/haproxy-docker-wrapper
Docker-friendly wrapper for haproxy
https://github.com/tuenti/haproxy-docker-wrapper
docker-image haproxy haproxy-docker
Last synced: about 4 hours ago
JSON representation
Docker-friendly wrapper for haproxy
- Host: GitHub
- URL: https://github.com/tuenti/haproxy-docker-wrapper
- Owner: tuenti
- License: apache-2.0
- Created: 2016-08-02T16:44:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-06T05:02:24.000Z (about 6 years ago)
- Last Synced: 2024-11-15T04:36:22.677Z (5 days ago)
- Topics: docker-image, haproxy, haproxy-docker
- Language: Go
- Size: 336 KB
- Stars: 7
- Watchers: 10
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
haproxy-docker-wrapper
======================This repository contains the code for an haproxy wrapper with these features:
* Embedded syslog server to redirect haproxy logs to standard output
* HTTP entry point to trigger haproxy configuration reloadsIt also includes a Dockerfile to extend official haproxy dockers with
this wrapper.Usage
-----Start the wrapper passing as arguments the configuration needed for your
environment, the defaults play well with the official haproxy docker image and
the included Dockerfile uses this image as base.Configuration directory is exposed as a volume. Sidecar container in charge of
generating the configuration should use this volume. Both containers should
also be in the same network namespace, so it can reach the control entry point
without needing to expose it beyond a local interface.To trigger a configuration reload, send an HTTP GET request to /reload in the
control entry point (http://127.0.0.1:15000/reload by default).Haproxy must be configured in *daemon* mode.
Why?
----When trying to deploy haproxy in docker, you may face some recurrent problems:
* haproxy only logs to syslog unless it's executed in debug mode, what is not
recommended for production environments. In docker deployments it is usual to
log everything to standard output and let logging drivers decide how to
handle these logs.
* Configuration reload in haproxy needs access to the pid namespace, to the
pid file and to the configuration file. Providing all this from a sidecar
container like [kube2lb](https://github.com/tuenti/kube2lb/tree/master/examples)
is quite complex. Not using sidecar and including the software managing the
configuration in the same container makes any update in this software to
require also a full restart of haproxy.Credits & Contact
-----------------`haproxy-docker-wrapper` was created by [Tuenti Technologies S.L.](http://github.com/tuenti)
You can follow Tuenti engineering team on Twitter [@tuentieng](http://twitter.com/tuentieng).
License
-------`haproxy-docker-wrapper` is available under the Apache License, Version 2.0. See LICENSE file
for more info.