Deploy a Mesos Cluster Using Docker

his tutorial will show you how to bring up a single node Mesos cluster all provisioned out using Docker containers (a future post will show how to easily scale this out to multi nodes or see the update on the bottom). This means that you can startup an entire cluster with 7 commands! Nothing to install except for starting out with a working Docker server.

All of the Docker container build files used are there also. You can build each container locally or just use the pre-built containers located on the Docker Hub. The commands below will automatically download the needed pre-built containers for you.

Lets Get Started

Step 1: Get the IP of the Docker server and export it out to the environment. We will use this IP over and over again in subsequent Docker commands.

Just as a note, this is the IP address of the server and not docker0 or an IP address inside a Docker container. If you ssh into your server and run the command “ifconfig” use the eth0 interface’s address.

Clicking on the “New App” button on the top right gives you the following menu where you can create a new job/task. We are simply going to echo out hello to a file. We can go into the container and check if the file is created and if the job is continuously running.