Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

magneticio/vamp-gateway-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vamp Gateway Agent

Join the chat at https://gitter.im/magneticio/vamp Docker

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

Usage

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.

Domain name resolver

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 enable
  • VAMP_VGA_DNS_PORT Listening port, default: 5353

Building Docker images

make targets:

  • version - displaying version (tag)
  • clean - removing temporal build directory ./target
  • purge - running clean and removing all images magneticio/vamp-gateway-agent:*
  • build - copying files to ./target directory and building the image magneticio/vamp-gateway-agent:${version}
  • default - clean build

Additional documentation and examples