Mesos includes a set of scripts in
[install-prefix]/sbin that can be used to deploy it on a cluster. To use these scripts, you need to create two configuration files:
[install-prefix]/var/mesos/deploy/masters, which should list the hostname(s) of the node(s) you want to be your masters (one per line), and
[install-prefix]/var/mesos/deploy/agents, which should contain a list of hostnames for your agents (one per line).
You can then start a cluster with
[install-prefix]/sbin/mesos-start-cluster.sh and stop it with
It is also possible to set environment variables, ulimits, etc that will affect the master and agent by editing
[install-prefix]/var/mesos/deploy/mesos-deploy-env.sh. One particularly useful setting is
LIBPROCESS_IP, which tells the master and agent binaries which IP address to bind to; in some installations, the default interface that the hostname resolves to is not the machine's external IP address, so you can set the right IP through this variable. Besides the common environment variables of master and agent configured in
[install-prefix/var/mesos/deploy/mesos-deploy-env.sh, it is also possible to set master specific environment variables in
[install-prefix]/var/mesos/deploy/mesos-master-env.sh, agent specific environment variables in
Finally, the deploy scripts do not use ZooKeeper by default. If you want to configure Mesos to use ZooKeeper to coordinate multiple master nodes, please see the High Availability documentation for details.
mesos-agentbinary). Otherwise, they will fail to