Baragon is a system for automating load balancer configuration updates. It pairs well with the Singularity Mesos framework.
Baragon is made up of two services:
-
BaragonService -- coordination service
-
BaragonAgentService -- applies changes on the actual load balancer
When a web service changes (i.e. upstreams added / removed), POST a BaragonRequest JSON object to BaragonService's request
endpoint. BaragonService will then fan out this change to all affected BaragonAgentServices. Polling the request status url (request/{requestId}
) will indicate the current status of the request:
WAITING
: waiting for request to be applied on all agentsSUCCESS
: request was successfully applied on all agentsFAILED
: request was not successfully applied on all agents, and was rolled backCANCELING
: request is in the process of being cancelled (rolled back)CANCELED
: request was cancelled (rolled back) on all agentsUNKNOWN
: unknown.
Prerequisite: A working ZooKeeper cluster.
-
Build JARs via
mvn clean package
. -
Create a configuration file for the main service. An example lives here. This will be referenced as
$SERVICE_CONFIG_YAML
. -
Create a configuration file for agent service. An example lives here. This will be referenced as
$AGENT_CONFIG_YAML
. -
Copy BaragonService*.jar and
$SERVICE_CONFIG_YAML
onto one or more hosts, and start the service viajava -jar BaragonService-*-SNAPSHOT.jar server $SERVICE_CONFIG_YAML
. -
Copy BaragonAgentService*.jar and
$AGENT_CONFIG_YAML
onto each of your load balancer hosts. Start the BaragonAgent service viajava -jar BaragonAgentService-*-SNAPSHOT.jar server $AGENT_CONFIG_YAML
.
Baragon comes with Vagrant boxes for easy local development and integration testing. Ensure Virtualbox and Vagrant is installed on your machine, and then run vagrant up
inside the vagrant
folder of the git repo to spin up a Baragon cluster for testing.