Auto configure HAProxy configuration file based your template; you can provision your own template in production to enable SSL and HAProxy stats interface, or configuring different load balance strategy

Releases and changelog

Since Marathon API and behaviour may change over time, especially in this early days. You should expect we aim to catch up those changes, improve design and adding new features. We aim to maintain backwards compatibility when possible. Releases and changelog are maintained in the releases page. Please read them when upgrading.

Deployment Guide

You can deploy Bamboo with HAProxy on each Mesos slave. Each web service being allocated on Mesos Slave can discover services via localhost or domain you assigned by ACL rules. Alternatively, you can deploy Bamboo and HAProxy on separate instances, which means you need to loadbalance HAProxy cluster.

User Interface

UI is useful to manage and visualize current state of proxy rules. Of course, you can configure HAProxy template to load balance Bamboo.

Customize HAProxy Template with Marathon App Environment Variables

Marathon app env variables are available to be called in the template.The default template shipped with Bamboo is aware of BAMBOO_TCP_PORT. When this variable is specified in Marathon app creation, the application will be configured with TCP mode. For example:

In this example, both BAMBOO_TCP_PORT and MY_CUSTOM_ENV can be accessed in HAProxy template. This enables flexible template customization depending on your preferences.

Environment Variables

Configuration in the production.json file can be overridden with environment variables below. This is generally useful when you are building a Docker image for Bamboo and HAProxy. If they are not specified then the values from the configuration file will be used.

Environment Variable

Corresponds To

MARATHON_ENDPOINT

Marathon.Endpoint

MARATHON_USER

Marathon.User

MARATHON_PASSWORD

Marathon.Password

BAMBOO_ENDPOINT

Bamboo.Endpoint

BAMBOO_ZK_HOST

Bamboo.Zookeeper.Host

BAMBOO_ZK_PATH

Bamboo.Zookeeper.Path

HAPROXY_TEMPLATE_PATH

HAProxy.TemplatePath

HAPROXY_OUTPUT_PATH

HAProxy.OutputPath

HAPROXY_RELOAD_CMD

HAProxy.ReloadCommand

BAMBOO_DOCKER_AUTO_HOST

Sets BAMBOO_ENDPOINT=$HOST when Bamboo container starts. Can be any value.

You can then start the server with sudo service bamboo-server start. Other commands: status, restart, stop

As a Docker container

There is a Dockerfile that will allow Bamboo to be built and run from within a Docker container.

Building the image

The Docker image can be built and added to your local repository with the following command from within the project root directory:

docker build -t bamboo .

Running Bamboo as a Docker container

Once the image has been built, running as a container is straightforward - you do however still need to provide the configuration to the image as environment variables. Docker allows two options for this - using the -e option or by putting them in a file and using the --env-file option. Bamboo use Marathon event bus to get app info, so make sure set --event_subscriber http_callback or env MARATHON_EVENT_SUBSCRIBER=http_callback before start marathon instance.For this example we will use the former and we will map through ports 8000 and 80 to the docker host (obviously the hosts configured here will need to be reachable from this container):