Based on Vamp gateways, Vamp generates HAProxy configuration and stores it to KV store.
Vamp Gateway Agent:
- reads the HAProxy configuration using confd
- appends it to the base configuration
haproxy.basic.cnf
- if new configuration is valid, VGA reloads HAProxy with as little client traffic interruption as possible
In addition to this VGA also:
- send HAProxy log to Elasticsearch using Filebeat
- handle and recover from ZooKeeper, etcd, Consul and Vault outages without interrupting the haproxy process and client requests
- does Vault token renewal if needed
Following environment variables are mandatory:
VAMP_KEY_VALUE_STORE_TYPE <=> confd -backend
VAMP_KEY_VALUE_STORE_CONNECTION <=> confd -node
VAMP_KEY_VALUE_STORE_PATH <=> key used by confd
VAMP_ELASTICSEARCH_URL <=> http://elasticsearch:9200
Example:
docker run -e VAMP_KEY_VALUE_STORE_TYPE=zookeeper \
-e VAMP_KEY_VALUE_STORE_CONNECTION=localhost:2181 \
-e VAMP_KEY_VALUE_STORE_PATH=/vamp/gateways/haproxy/1.6 \
-e VAMP_ELASTICSEARCH_URL=http://localhost:9200 \
magneticio/vamp-gateway-agent:katana
Available Docker images can be found at Docker Hub.
To enable dnsmasq to resolve virtual hosts, pass the following environment variables to the Docker container:
VAMP_VGA_DNS_ENABLE
Set to non-empty value to enableVAMP_VGA_DNS_PORT
Listening port, default: 5353
make
targets:
version
- displaying version (tag)clean
- removing temporal build directory./target
purge
- runningclean
and removing all imagesmagneticio/vamp-gateway-agent:*
build
- copying files to./target
directory and building the imagemagneticio/vamp-gateway-agent:${version}
default
-clean build