Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gas-buddy/docker-api-haproxy
A docker image for an HAProxy using confd for zero downtime reloads
https://github.com/gas-buddy/docker-api-haproxy
Last synced: about 2 months ago
JSON representation
A docker image for an HAProxy using confd for zero downtime reloads
- Host: GitHub
- URL: https://github.com/gas-buddy/docker-api-haproxy
- Owner: gas-buddy
- Created: 2017-01-29T21:23:09.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-08-16T22:21:31.000Z (over 1 year ago)
- Last Synced: 2024-04-15T00:45:49.940Z (9 months ago)
- Language: Makefile
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
gasbuddy/api-haproxy
==================================A containerized unit of [haproxy](http://www.haproxy.org/) +
[confd](https://github.com/kelseyhightower/confd)This creates a docker container that bundles haproxy and confd. The entrypoint script
- sets an environment variable for a locally-running etcd instance (in our case an etcd node running proxy mode)
- configures confd to check etcd address at first run and to use the keys defined in **confd.toml** to populate the haproxy config file
- starts haproxy using that configured file
- runs confd with the **-watch** flag so that it dynamically reloads haproxy every time a change in the specified etcd keys is detectedPaths
=====
`api-haproxy` expects the configuration to reside under the `/proxy` key.Setup
=====You'll need an etcd cluster. For development and testing, you can just
run one:```
export HostIP=...put your host ip address here...
docker run -d -v /usr/share/ca-certificates/:/etc/ssl/certs \
--name etcd0 --network=tooling_gb_internal quay.io/coreos/etcd etcd \
-name etcd0 \
-advertise-client-urls http://{$HostIP}:2379,http://{$HostIP}:4001 \
-listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
-initial-advertise-peer-urls http://{$HostIP}:2380 \
-listen-peer-urls http://0.0.0.0:2380 \
-initial-cluster-token etcd-cluster-1 \
-initial-cluster etcd0=http://{$HostIP}:2380 \
-initial-cluster-state new
```