cluster-broccoli
cluster-broccoli copied to clipboard
Self service for Nomad based on templates.
Cluster Broccoli 
Important Note
This repository is no longer actively maintained. You can find an up-to-date fork at https://github.com/data-science-platform/cluster-broccoli.
Description
Cluster Broccoli is a RESTful web service + UI to manage Nomad jobs through a self service application. Jobs are defined based on templates, allowing for a selectable amount of customization.
If you want to give your end users the possibility to create new instances of live demos of your product, while allowing them to customize it (e.g. using an embedded database or an external one, number of cores, ...) - Cluster Broccoli is for you.
Cluster Broccoli is meant to be setup by your IT. Some technical knowledge is required to setup the infrastructure and define the templates. End users can be internal (QA, data scientists) or external (customers, potential customers).
Usage
Web UI
Cluster Broccoli comes with a minimalistic web user interface. It allows you to create, destroy, start and stop your instances based on a set of predefined templates. Please consult the documentation for a detailed description of the Web UI.
HTTP API
Cluster Broccoli provides a RESTful HTTP API. You can control it using curl, writing your own command line wrapper or connect from your microservices. Please consult the documentation for a detailed description of the HTTP API.
Installation
Requirements
Minimal Setup
- Nomad (HTTP API v1)
- Java (for running the Play application)
Recommended Setup
- Nomad (HTTP API v1)
- Consul (HTTP API v1)
- Cluster Broccoli Nomad Job + Docker Image (for running the Play application)
Distributed Application Server
Broccoli needs to run as a single instance. It is neither supported to run multiple Broccoli instances sharing the same instance storage, nor running Broccoli in distributed mode because it uses a local cache to store the session IDs.
Using the Production Docker Image
If you only need an image to run the Broccoli distribution, go with the JRE based production-ready image.
docker run -p 9000:9000 frosner/cluster-broccoli \
-Dbroccoli.nomad.url=<your-nomad-url> \
-Dbroccoli.consul.url=<your-consul-url>
Building from Source
Clone this repository and run sbt dist
to build an universal ZIP file in server/target/universal
.
To build the production Docker image in a local Docker daemon run sbt docker:publishLocal
local instead.
sbt docker:stage
creates a directory with intermediate artifacts and the Dockerfile
in server/target/docker/stage
; use this command to inspect the image contents before building or to manually build the image with a custom docker command.
Configuration
In order to configure Cluster Broccoli, you can add key value pairs to your configuration. The following configuration properties are supported. Please refer to the Wiki for more information about the individual topics.
See Play configuration and Broccoli's reference.conf for available parameters and their meanings.
Nomad and Consul
Property | Description | Default |
---|---|---|
broccoli.consul.url |
Address of your consul server | http://localhost:8500 |
broccoli.consul.lookup |
Lookup method used for consul. Options: ip or dns (recommended). |
ip |