Ansible playbooks to initialize a bare mesos/marathon cluster
Run a test cluster with Vagrant.
(cd inventory/vagrant; vagrant up)
ansible-playbook -i inventory/vagrant/hosts platform/full.yml
- The cluster can be composed of any machines on the internet, they will be connected together by a tinc virtual private network (VPN).
- Each node have docker installed. Everything then runs inside docker containers.
Your inventory file should list the following groups:
mesos-masters
- typically 3 hosts.
- they'll run mesos masters, zookeeper and marathon.
mesos-slaves
- they'll run mesos agents.
- can be on the same hosts as mesos-masters.
marathon-lb-external
- public load-balancers
mesos-dns
- DNS server for service discovery (for apps with static ports)
Following variables have to be defined:
cluster_name
a string naming this clusterzk_hosts
comma separated list of hostname:port where zookeeper is running- usually ":2181,:2181,:2181"
- (replace by the actual hostnames)
mesos_masters
space separated list of mesos masters hostnames- usually " "
docker_bip
binding interface for docker network- usually "172.17.0.1"
ubuntu_version
version of ubuntu running on machines- eg: ubuntu-trusty or ubuntu-xenial
ssl_certs
link to SSL certificates used by the load-balancer- concatenated PEM certificate and private key (see haproxy doc)
See inventory/vagrant/ for an example setup.
platorm/marathon-lb-external
will expose apps that have theHAPROXY_GROUP=external
label.- see marathon-lb documentation for details.