Mesos

New in version 0.1.

Mesos is the distributed system kernel that manages resources across multiple nodes. When combined with Marathon, you can basically think of it as a distributed init system.

Modes

Mesos can be run in one of two “modes”:

  • A server mode (called “master” or “leader”)
  • A client mode (called “follower” or “agent”. The term “slave” is used but deprecated.)

This project prefers the “leader/follower nomenclature”. In addition to the “official” modes described below, mesos_mode supports running both modes on a single machine for testing or development scenarios.

Leader

Leaders will communicate with each other via ZooKeeper to coordinate which leader controls the cluster. Because of this, you can run as many leader nodes as you like, but you should consider keeping an odd number in the cluster to make attaining a quorum easier. A single leader node will also work fine, but will not be highly available.

Follower

Follower nodes need to know where the leaders are, and there can be any number of them. You should keep the follower machines free of “heavier” services running outside Mesos, as this will cause inaccurate resource availability counts in the cluster.

Upgrading

New in version 1.0.

If you are running Mantl 0.5.1, you’ll need to run the playbooks/upgrade-mesos-marathon.yml playbook before reprovisioning your cluster to 1.0. The packaging format changed in the 1.0 release, this will ensure a smooth upgrade.

Upgrades from releases prior to Mantl 0.5.1 have not been tested.

Variables

You can use these variables to customize your Mesos installation.

mesos_mode

Set to leader for leader mode, and follower for follower mode. Set to mixed to run both leader and follower on the same machine (useful for development or testing.)

default: follower

mesos_log_dir

default: /var/log/mesos

mesos_work_dir

default: /var/run/mesos

mesos_leader_port

default: 5050

mesos_follower_port

default: 5051

mesos_leader_cmd

default: mesos-master

mesos_follower_cmd

default: mesos-slave

mesos_isolation

The isolation level for tasks using the Mesos containerizer. See the Mesos Configuration documentation for more information. If you wish to disable enforcement of cpu and memory resource limits for tasks, set this to posix/cpu,posix/mem.

default: cgroups/cpu,cgroups/mem

mesos_attributes
Set attributes for mesos agents.
Provide these as a list to set multiple attributes. Format:
`` - "key:value"
- "key:value"``

default: node_id:{{ inventory_hostname }}

mesos_resources

Set resources for mesos agents. (useful for setting available ports that applications can be bound to). Provide these as a list to set multiple resources. Format: ``- name(role):value

  • name(role):value...``

default: ports(*):[4000-5000, 7000-8000, 9000-10000, 25000-26000, 31000-32000]

mesos_cluster

default: mantl

mesos_zk_hosts

A ZooKeeper connection string in the the host:mesos_zk_port format, generated from the hosts in zookeeper_server_group.

mesos_zk_dns

Consul DNS entries for ZooKeeper hosts.

default: zookeeper.service.consul

mesos_zk_port

default: 2181

mesos_zk_chroot

ZooKeeper znode to use as a base for mesos data.

default: mesos

mesos_credentials

A list of credentials to add for authentication. These should be in the form { principal: "...", secret: "..." }.

default: []

mesos_authenticate_frameworks

Enable Mesos authentication for frameworks. You should set mesos_credentials for credentials if this is set.

default: set automatically if framework credentials are present

mesos_authenticate_followers

Enable Mesos authentication from followers. If set, each follower will need mesos_follower_secret set in their host variables.

default: set automatically if follower credentials are present

mesos_follower_principal

The principal to use for follower authentication

default: follower

mesos_follower_secret

The secret to use for follower authentication

default: not set. Set this to enable follower authentication.

mesos_logging_level

The log level for Mesos. This is set for all components.

Default: WARNING