Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Latest commit

 

History

History
162 lines (117 loc) · 7.18 KB

README.md

File metadata and controls

162 lines (117 loc) · 7.18 KB

Mesos Packaging

This repository contains Hammer specs for building Apache Mesos.

Table of Contents

Dynamic Configuration

Dynamic configuration is performed with Consul. The {package}-dynamic entries in this README describe the key spaces they look for to render configuration to disk. Be aware that most of these daemons need to be restarted when configuration changes, so account for that when you're changing keys.

Per-node Configuration

In addition to the documented keys under each package, you can set per-node global options for these packages with certain flags. These will be documented in the config files if not set, but here's a short list:

Key Description
config/nodes/{node}/external_ip node's external IP address
config/nodes/{node}/internal_ip node's internal IP address
config/nodes/{node}/hostname node's hostname

Packages

Core

mesos

spec

The base Mesos package, including bindings. There is no configuration in this package.

mesos-master

spec

The mesos master process. This is a configuration-only package, and will provide the mesos-master service by depending on mesos. mesos-master is configured via environment variables in /etc/sysconfig/mesos-master.

mesos-master-dynamic

spec

Makes mesos-master dynamic by populating it with consul-template (spec).

Available configuration:

Key Description Default
config/mesos/agents/{node}/principal and config/mesos/agents/{node}/secret agent principal(s) and secret(s), respectively not set
config/mesos/frameworks/{name}/principal and config/mesos/frameworks/{name}/secret framework principal(s) and secret(s), respectively not set
config/mesos/master/extra_options extra command-line options to pass to mesos-master not set
config/mesos/master/firewall_rules see Mesos docs {}
config/mesos/master/nodes/{node}/options same as options, but per-node not set
config/mesos/master/options any key from the configuration options. Value will be uppercased to become an environment variable. not set

This package assumes that authentication will be done globally, and so will not pay attention to unsetting the authentication per-node; it must be done globally. It also pays attention to both the authenticate_slaves and authenticate_agents flags for backwards compatibility.

This package also uses internal_ip, external_ip, and hostname from the Per-node Configuration. Do note that you can override the values set in this way in the configuration by overriding them in config/mesos/master/nodes/{node}/options.

mesos-agent

spec

The mesos agent process (formerly mesos-slave). This package name is being changed in advance of the upstream change to mesos-agent, and will call the appropriate binaries for the version of Mesos provided. This is a configuration-only package, and will provide the mesos-agent service by depending on mesos. mesos-agent is configured via environment variables in /etc/sysconfig/mesos-agent.

mesos-agent-dynamic

spec

Makes mesos-agent dynamic by populating it with consul-template (spec).

Available configuration:

Key Description Default
config/mesos/agent/extra_options extra command-line options to pass to mesos-agent not set
config/mesos/agent/firewall_rules see Mesos docs {}
config/mesos/agent/nodes/{node}/options same as options, but per-node not set
config/mesos/agent/options any key from the configuration options. Value will be uppercased to become an environment variable. not set
config/mesos/agents/{node}/principal and config/mesos/agents/{node}/secret agent principal and secret, respectively. This uses the value of the Consul node to determine the key. not set

Authentication for this package will be enabled if the principal and secret are both set.

This package also uses internal_ip and hostname from the Per-node Configuration. Do note that you can override the values set in this way in the configuration by overriding them in config/mesos/agent/nodes/{node}/options.

Frameworks

marathon

spec

Marathon, a cluster-wide init and control system for services in cgroups or Docker containers. Marathon can be controlled with environment variables in /etc/sysconfig/marathon, the available options are documented in the Marathon command-line flags documentation.

marathon-dynamic

spec

Makes marathon dynamic by populating it with consul-template (spec).

Available configuration:

Key Description
config/marathon/options/{key} any key from the command line flags. Value will be uppercased to become an environment variable.
config/marathon/hosts/{node}/options/{key} the same as marathon/config/{key}, but the flags will only be applied to the specified node

Building

If you're on linux, run hammer to build all of the packages, which will end up in out. If you're on another platform, run ./build.sh to fire up a Vagrant VM that will provision itself with hammer and do the same.