Skip to content

A complete mesos cluster setup with automatic load balancing

License

Notifications You must be signed in to change notification settings

arunabha/roger-mesos

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

roger-mesos

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

It also contains examples to show how to set up single as well as multi-node clusters using Vagrant VMs (see vagrant/).

Pre-requisites

  • Ansible is installed on the control machine (prior knowledge of ansible helps.)
  • Inventory (aka a set of host machines) exists and have ubuntu 14.0.4 LTS along with openssh-server installed.
  • Sudo access to each of the host machines is available.

Steps to get the cluster up and running

  • Ensure that an inventory file exists with the list of masters, slaves, etc. (see an existing hosts file in the hosts dir under vagrant.)
  • Run the following commands (WARNING: the first command below will reboot the hosts):
$ 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

  • Make sure host file contains docker_registry group.
  • Run:
$ ansible-playbook -i <path-to-hosts-file> --user=<user> --ask-pass --ask-sudo-pass docker-registry.yml

Notes

  • The --ask-pass and --ask-sudo-pass are not needed if ssh key is added and the user is part of the sudo group in the host machines.
  • To restart a service on all hosts, you can use ansible's service module. For example:
$ 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

About

A complete mesos cluster setup with automatic load balancing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 72.8%
  • Ruby 27.2%