Public | Automated Build

Last pushed: 2 years ago
Short Description
Launch bootstrap script to create mesos/marathon cluster based on coreos
Full Description


Create a 3 node Marathon / Mesos cluster with a single master node and 2 slave nodes. Two environments are currently supported.

  • Vagrant - 3 local VMs running CoreOS on VirtualBox or VMware Fusion.
  • - 3 physical servers running CoreOS. You need an account with to do this.

Vagrant Setup

1) Install dependencies

2) Clone this project.

$ git clone
$ cd coreos-marathon

3) Startup and SSH

Boxes are named core-01..03.

$ vagrant up
$ vagrant ssh core-01

4) Access web UIs

Once all the Docker images have been downloaded and started the web UIs will be availabled at.
Note: This can take up to 10 minutes and the images themselves are large.

Vagrant Teardown

1) Delete Vagrant VMs.

vagrant destroy

Packet Setup

1) Register for an account with Packet.

2) Clone this project.

$ git clone
$ cd coreos-marathon

3) Set API key and config.

# .env.packet

# Parsippany, NJ
# Either coreos_beta or coreos_alpha

4) Start cluster of 3 physical servers running CoreOS beta.

$ cp .env.packet .env

$ bundle install
$ bundle exec rake packet:cluster:create

Cluster is being provisioned

5) Check status of the console in the Packet web UI. Once all 3 servers are provisioned
get the public IP address of the core-01 node. The Marathon web UI is available on port 8080 and Mesos web UI is on port 5050.

Packet Teardown

1) Shutdown server cluster.

$ bundle exec rake packet:cluster:destroy

Cluster has been shutdown


  • A fresh discovery token is retrieved from for each cluster.
  • CoreOS cloud-config starts etcd2 and fleet and a oneshot unit that starts the cluster.
  • A 3 node Consul cluster is bootstrapped using the etcd cluster.
  • Zookeeper is registered with Consul and accessed via the Consul DNS interface.
  • Mesos and Marathon use Zookeeper for service discovery.

Docker Image

The oneshot unit launches a Docker container using the image
This image is based on Alpine Linux and installs Ruby and the fleetctl binary. The container runs a Ruby script that starts the cluster using fleet.


Thanks to Packet for the great support while we automated the cluster setup.

This template is based upon these projects.


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request


This code is licensed under the MIT license.

Docker Pull Command
Source Repository