Home

Awesome

roger-mesos

This repo contains everything you need to set up a complete Mesos cluster with the following components -

It also contains examples that use Vagrant VMs to illustrate how to set up a cluster (see vagrant/).

Pre-requisites

If you are only looking for a vagrant based cluster running on your machine for development/testing purposes go to the vagrant/ directory.

Steps to get (a real) cluster up and running

$ ansible-playbook -i <path-to-hosts-file> --user=<user> --ask-pass --ask-sudo-pass --extra-vars="restart_machine=true" base.yml
$ ansible-playbook -i <path-to-hosts-file> --user=<user> --ask-pass --ask-sudo-pass zookeeper-nodes.yml
$ ansible-playbook -i <path-to-hosts-file> --user=<user> --ask-pass --ask-sudo-pass --extra-vars="mesos_cluster_name=<cluster-name-to-use>" master-nodes.yml
$ ansible-playbook -i <path-to-hosts-file> --user=<user> --ask-pass --ask-sudo-pass marathon-nodes.yml
$ ansible-playbook -i <path-to-hosts-file> --user=<user> --ask-pass --ask-sudo-pass chronos.yml
$ ansible-playbook -i <path-to-hosts-file> --user=<user> --ask-pass --ask-sudo-pass slave-nodes.yml
$ ansible-playbook -i <path-to-hosts-file> --user=<user> --ask-pass --ask-sudo-pass bamboo-nodes.yml

To set up and start docker registry

$ ansible-playbook -i <path-to-hosts-file> --user=<user> --ask-pass --ask-sudo-pass docker-registry.yml

Notes

$ ansible zookeeper -i <path/to/hosts/file> --user=<user> --ask-pass --ask-sudo-pass -m service -a "name=zookeeper state=restarted" -s
$ ansible marathon_servers -i <path/to/hosts/file> --user=<user> --ask-pass --ask-sudo-pass -m service -a "name=marathon state=restarted" -s
$ ansible-playbook -i /path/to/inventory/file ansible/marathon-nodes.yml -e @$HOME/my-ansible-secrets.yml.encrypted --vault-password-file ~/.my-ansible-secrets-vault-pass