Skip to content

A vagrant configuration to set up a cluster of mesos master, slaves and zookeepers through ansible

License

Notifications You must be signed in to change notification settings

bspaans/vagrant-mesos-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vagrant-mesos-cluster

A vagrant configuration to set up a cluster of mesos master, slaves and zookeepers through ansible

Usage

Clone the repository, and run:

vagrant up

This will provision a mini Mesos cluster with one master, one slave, and one HAProxy instance. The Mesos master server also contains Zookeeper and the Marathon framework. The slave will come with Docker installed.

Deploying Docker containers

After provisioning the servers you can access Marathon here: http://10.0.10.11:8080/ and the master itself here: http://10.0.10.11:5050/

Submitting a Docker container to run on the cluster is done by making a call to Marathon's REST API:

First create a file, ubuntu.json, with the details of the Docker container that you want to run:

{
  "container": {
    "type": "DOCKER",
    "docker": {
      "image": "libmesos/ubuntu"
    }
  },
  "id": "ubuntu",
  "instances": "1",
  "cpus": "0.5",
  "mem": "128",
  "uris": [],
  "cmd": "while sleep 10; do date -u +%T; done"
}

And second, submit this container to Marathon by using curl:

curl -X POST -H "Content-Type: application/json" http://10.0.10.11:8080/v2/apps [email protected]

You can monitor and scale the instance by going to the Marathon web interface linked above.

About

A vagrant configuration to set up a cluster of mesos master, slaves and zookeepers through ansible

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages