Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

mesos (16) Versions 2.0.0

Installs/Configures Apache Mesos

Policyfile
Berkshelf
Knife
cookbook 'mesos', '= 2.0.0', :supermarket
cookbook 'mesos', '= 2.0.0'
knife supermarket install mesos
knife supermarket download mesos
README
Dependencies
Changelog
Quality 0%

Mesos Cookbook

Build Status

Description

Application cookbook for installing the Apache Mesos cluster manager.
Mesos provides efficient resource isolation and sharing across distributed
applications, or frameworks. This cookbook installs Mesos via packages
provided by Mesosphere.

This cookbook serves as the base for the following additional Mesos framework
cookbooks maintained by Medidata Solutions:

  • marathon - This cookbook installs the Apache Mesos Marathon framework.
  • chronos - This cookbook installs the Apache Mesos Chronos framework.

Requirements

Chef 11.12.2+

This cookbook assumes you will be running a ZooKeeper ensemble for production
use of Mesos.

The following cookbooks are dependencies:

  • apt
  • yum
  • java
  • docker

The following cookbooks are suggested:

Platform:

Tested on

  • Ubuntu 12.04
  • Ubuntu 13.04
  • Ubuntu 14.04
  • Debian Wheezy
  • CentOS 6
  • Scientific Linux 6.3

Attributes

  • node['mesos']['version'] - Mesosphere Mesos package version. Default: '0.17.0'.
  • node['mesos']['cluster_name'] - Human readable name for the cluster, displayed in the webui. Default: 'MyMesosCluster'.
  • node['mesos']['port'] - Port to listen on. Default: 5050.
  • node['mesos']['logs_dir'] - Location to put log files. Default: '/var/log/mesos'.
  • node['mesos']['work_dir'] - Where to place framework work directories. Default: '/tmp/mesos'
  • node['mesos']['isolation_type'] - Isolation mechanism, may be one of: process, cgroups. Default: 'process'.
  • node['mesos']['zookeeper_server_list'] - List of ZooKeeper hostnames or IP addresses. Default: [].
  • node['mesos']['zookeeper_port'] - ZooKeeper port. Default: 2181.
  • node['mesos']['zookeeper_path'] - ZooKeeper path. Default: 'mesos'.
  • node['mesos']['zookeeper_exhibitor_discovery'] - Flag to enable ZooKeeper ensemble discovery via Netflix Exhibitor. Default: false.
  • node['mesos']['zookeeper_exhibitor_url'] - Netflix Exhibitor ZooKeeper ensemble url.
  • node['mesos']['set_ec2_hostname'] - If true and running in ec2, set hostname to public dns name. Default: true.
  • node['mesos']['python_egg'] - URL of mesos python egg to download
  • node['mesos']['slave']['checkpoint'] - Enable slave recovery. Default: 'true'.
  • node['mesos']['slave']['strict'] - If true, any recovery error is fatal. Default: 'false'.
  • node['mesos']['slave']['recover'] - Whether to recover status updates and reconnect with old executors. Default: 'reconnect'

Recipes

default

The default mesos recipe will run mesos::install.

install

The install recipe pulls down the specified version of the mesosphere mesos
package and installs it. It also configures to stop both mesos-master and
mesos-slave init files so that they don't automatically start on server
restart.

master

The master recipe runs mesos::install as well as creating several
mesos-master configuration files that are used at startup. This recipe also
uses the zookeeper attributes and/or exhibitor attributes to configure the
mesos-master using zookeeper. Lastly it sets the mesos-master init config to
'start' so that mesos-master is started on server restart.

slave

The slave recipe runs mesos::install as well as creating several
mesos-slave configuration files that are used at startup. This recipe also
uses the zookeeper attributes and/or exhibitor attributes to configure the
mesos-slave using zookeeper. Lastly it sets the mesos-slave init config to
'start' so that mesos-slave is started on server restart.

docker

The docker recipe installs docker via Brian Flad's docker cookbook as well
as Jason Dusek's mesos-docker script as a mesos executor. After running
this recipe on a mesos slave you should be able to run the mesos-docker
examples listed in Jason Dusek's docker on mesos blog post.

Usage

Here is a sample role for configuring a Mesos master in a ZooKeeper backed
production mode.

chef_type:           role
default_attributes:
description:
env_run_lists:
json_class:          Chef::Role
name:                mesos_master
override_attributes:
  mesos:
    version: 0.17.0
    cluster_name: mesos-sandbox
    zookeeper_server_list: [ '203.0.113.2', '203.0.113.3', '203.0.113.4' ]
    zookeeper_port: 2181
    zookeeper_path: 'mesos-sandbox'
run_list:
  recipe[mesos::master]

Here is a sample role for creating a Mesos slave node with a seperate ZooKeeper
ensemble dynamically discovered via Netflix Exhibitor:
YAML
chef_type: role
default_attributes:
description:
env_run_lists:
json_class: Chef::Role
name: mesos_slave
override_attributes:
mesos:
version: 0.17.0
cluster_name: mesos-sandbox
zookeeper_path: 'mesos'
zookeeper_exhibitor_discovery: true
zookeeper_exhibitor_url: 'http://zk-exhibitor-endpoint.example.com:8080'
run_list:
recipe[mesos::slave]

Here is a sample role for creating a Mesos slave node running the experimental
docker executor. This node is also dynamically configured via zookeeper and
exhibitor. (Note: this recipe only works with Ubuntu 13.04 as of now.)
YAML
chef_type: role
default_attributes:
description:
env_run_lists:
json_class: Chef::Role
name: mesos_slave_docker
override_attributes:
mesos:
version: 0.17.0
cluster_name: mesos-sandbox
zookeeper_path: 'mesos'
zookeeper_exhibitor_discovery: true
zookeeper_exhibitor_url: 'http://zk-exhibitor-endpoint.example.com:8080'
run_list:
recipe[mesos::docker]

Development

Please see the [Contributing](CONTRIBUTING.md) Guidelines.

License and Author

Copyright 2014 Medidata Solutions Worldwide

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

mesos Cookbook CHANGELOG

This file is used to list changes made in each version of the mesos cookbook.

2.0.0 (2014-11-14)

  • Writes all attributes under node['mesos']['common]/node['mesos']['master'] to respective config files
  • Adds support for Ubuntu 14.04 (Trusty Tahr)
  • Adds support for Debian 7 (Wheezy)

1.0.6 (2014-02-19)

  • Re-added default-jre-headless as required package due to breaking issues with mesos debian package when used with a non-openjdk java like Oracle.
  • Added some serverspecs to verify working cookbook with oracle jdk 7.

1.0.5 (2014-02-15)

  • Removed default-jre-headless as required package
  • Added slave checkpointing defaults
  • Added kitchen-ec2 configuration for CI

1.0.4 (2014-02-07)

  • Add support for RHEL linux family
  • Updated integration tests (serverspec)

1.0.3 (2014-02-03)

  • Fix zk_string generating logic to strip triailing comma
  • Add exhibitor discover zookeepers retry logic

1.0.2 (2014-01-31)

  • Fix docker-mesos egg url

1.0.1 (2014-01-13)

  • Update default mesos version to 0.15.0
  • Use attribute for mesos python bindings egg

1.0.0 (2013-12-12)

  • Public release of cookbook
  • Added experimental docker-mesos recipe
  • Updated mesos default version to 0.14.2

0.1.0 (2013-10-08)

  • Initial Cookbook release

Foodcritic Metric
            

2.0.0 failed this metric

FC024: Consider adding platform equivalents: /tmp/cook/d8f4b5700d73bf613c2c750c/mesos/recipes/install.rb:58
FC031: Cookbook without metadata file: /tmp/cook/d8f4b5700d73bf613c2c750c/mesos/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/d8f4b5700d73bf613c2c750c/mesos/metadata.rb:1