For more details on configuring and using Baragon, check out the detailed setup and management guide
** Prerequisite: A working ZooKeeper cluster **
-
Build JARs via
mvn clean package
. -
Create a configuration file for Baragon Service and Baragon Agent. These are an extended version of a Dropwizard configuration file. Details on configurable fields can be found in the example configs below and in the detailed setup and management guide
- Example Baragon Service Configuration. This will be referenced as
$SERVICE_CONFIG_YAML
. - Example Baragon Agent Configuration. This will be referenced as
$AGENT_CONFIG_YAML
.
-
Copy
BaragonService-*-SNAPSHOT.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-*-SNAPSHOT.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
.
To get an example cluster up and running, you can install docker and docker-compose.
Simply run docker-compose up
to bring up:
- zookeper container
- Baragon Service container
- Two Baragon Agent + Nginx containers
The Baragon UI will be available at localhost:8080 and nginx at localhost:80.
If using boot2docker replace localhost with the boot2docker ip
Nginx's config directories that BaragonAgent writes to will also be mounted as volumes in the docker/configs
folder on your local machine.
Baragon comes with a UI for visualization and easier management of load balancer paths and upstreams. By default it will be available in a read-only mode at /[contextPath]/ui
see the Example Baragon Service Configuration or detailed setup and management guide for more details on configuring BaragonUI behavior.