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

et_mesos (13) Versions 1.0.1

Installs/Configures mesos

Policyfile
Berkshelf
Knife
cookbook 'et_mesos', '= 1.0.1', :supermarket
cookbook 'et_mesos', '= 1.0.1'
knife supermarket install et_mesos
knife supermarket download et_mesos
README
Dependencies
Quality 0%

Mesos Cookbook Build Status

Install Mesos (http://mesos.apache.org/) and configure mesos master and slave.
This cookbook also supports installation by both bulding from source and with Mesosphere package.
You can switch installation type using the node[:et_mesos][:type] attribute (source or mesosphere).

All credit to @everpeace for the basis for this cookbook, everpeace/cookbook-mesos.

Platform

Currently only supports ubuntu and centos. But centos support is experimental.

If you would use cgroups isolator or docker containerizer, Ubuntu 14.04 is highly recommended. Note that docker containerizer is only supported by Mesos 0.20.0+.

Installation Type

You have to specify intallation type (source or mesosphere) by setting node[:et_mesos][:type] variable.

Currently this cookbook defaults to build mesos from source, i.e.
node[:et_mesos][:type] is set to source.

Recipes

mesos::default

Install mesos using source recipe or mesosphere recipe, depending
on what the node[:et_mesos][:type] attribute is set to (source or mesosphere).

mesos::source

Install mesos (download zip from github, configure, make, make install).

mesos::mesosphere

Install mesos using Mesosphere's mesos package.
You can also install zookeeper package by node[:et_mesos][:mesosphere][:with_zookeeper] if required because Mesosphere's mesos package doesn't include zookeeper.

mesos::master

Configure master and cluster deployment configuration files, and start
mesos-master.

  • node[:et_mesos][:prefix]/var/mesos/deploy/masters
  • node[:et_mesos][:prefix]/var/mesos/deploy/slaves
  • node[:et_mesos][:prefix]/var/mesos/deploy/mesos-deploy-env.sh
  • node[:et_mesos][:prefix]/var/mesos/deploy/mesos-master-env.sh

If you choose mesosphere as node[:et_mesos][:type], the node[:et_mesos][:prefix] attribute
will be overridden to /usr/local, which is because the package from Mesosphere
installs mesos into that directory.

Furthermore, this recipe will also configure upstart configuration files.

  • /etc/mesos/zk
  • /etc/defaults/mesos
  • /etc/defaults/mesos-master

How to configure mesos-master

You can configure mesos-master command line options using the node[:et_mesos][:master] attribute.

If you have a configuration as shown below:

node[:et_mesos][:master] = {
  port:    "5050",
  log_dir: "/var/log/mesos",
  zk:      "zk://localhost:2181/mesos",
  cluster: "MyCluster",
  quorum:  "1"
}

Then mesos-master will be invoked with command line options like this:

mesos-master --zk=zk://localhost:2181/mesos --port=5050 --log_dir=/var/log/mesos --cluster=MyCluster

See the latest Mesos config docs for available options or the output of mesos-master --help.

mesos::slave

Configure slave configuration files, and start mesos-slave.

  • node[:et_mesos][:prefix]/var/mesos/deploy/mesos-slave-env.sh

If you choose mesosphere as node[:et_mesos][:type], the node[:et_mesos][:prefix] attribute
will be overridden to /usr/local, which is because the package from Mesosphere
installs mesos into that directory by default.

Furthermore, this recipe also configures upstart configuration files.

  • /etc/mesos/zk
  • /etc/defaults/mesos
  • /etc/defaults/mesos-slave

How to configure mesos-slave

You can configure mesos-slave command line options by node[:et_mesos][:slave] hash.
If you have a configuration as shown below:

node[:et_mesos][:slave] = {
  master:         'zk://localhost:2181/mesos',
  log_dir:        '/var/log/mesos',
  containerizers: 'docker,mesos',
  isolation:      'cgroups/cpu,cgroups/mem',
  work_dir:       '/var/run/work'
}

Then mesos-slave will be invoked with command line options like this:

mesos-slave --master=zk://localhost:2181/mesos --log_dir=/var/log/mesos --containerizers=docker,mesos --isolation=cgroups/cpu,cgroups/mem --work_dir=/var/run/work

See the latest Mesos config docs for available options or the output of mesos-slave --help.

[Deprecated] mesos::docker-executor

Install mesos-docker executor.
Currently only Mesos 0.14.0 is supported.

NOTE: This cookbook DOES NOT install docker automatically.
So, you need to install docker manually.

Usage

Wrap this cookbook, setting the node[:et_mesos][:type] attribute as appropriate for your installation, and include_recipe 'mesos::master' or include_recipe 'mesos::slave', depending on what part of the cluster you need to provision.

The recommendation would be to have two wrapper cookbooks, one for the master(s), and another for your slave(s).

Attributes

Key Type Description Default
[:et_mesos][:type] String installation type(source or mesosphere) source
[:et_mesos][:version] String Version(branch or tag name at http://github.com/apache/mesos). 0.22.1
[:et_mesos][:prefix] String Prefix value to be passed to configure script. This value will be overridden by /usr/local if node[:et_mesos][:type] == mesosphere. /usr/local
[:et_mesos][:home] String Directory which mesos sources are extracted to(node[:et_mesos][:home]/mesos). /opt
[:et_mesos][:build][:skip_test] Boolean Flag whether test will be performed on the build before installing. true
[:et_mesos][:mesosphere][:with_zookeeper] String Flag for installing zookeeper package, only applies to [:et_mesos][:type] = mesosphere. false
[:et_mesos][:ssh_opt] String ssh options to be used in mesos-[start|stop]-cluster -o StrictHostKeyChecking=no
-o ConnectTimeout=2
[:et_mesos][:deploy_with_sudo] String Flag whether sudo will be used in mesos-[start|stop]-cluster 1
[:et_mesos][:cluster_name] String [OBSOLETE] Human readable name for the cluster, displayed at webui. MyCluster
[:et_mesos][:master_ips] Array of String IP list of masters used in mesos-[start|stop]-cluster [ ]
[:et_mesos][:slave_ips] Array of String IP list of slaves used in mesos-[start|stop]-cluster [ ]
[:et_mesos][:master][:zk] String [REQUIRED(0.19.1+)] ZooKeeper URL (used for leader election amongst masters). May be one of:
zk://host1:port1,host2:port2,…path
zk://username:password@host1:port1,host2:port2,…/path
file://path/to/file (where file contains one of the above)
[:et_mesos][:master][:work_dir] String [REQUIRED(0.19.1+)] Where to store the persistent information stored in the Registry. /tmp/mesos
[:et_mesos][:master][:quorum] String [REQUIRED(0.19.1+)] The size of the quorum of replicas when using “replicated_log” based registry. It is imperative to set this value to be a majority of masters, i.e., quorum > (number of masters) / 2.
[:et_mesos][:master][:option_name] String You can set arbitrary command line option for mesos-master, replace `option_name` with the key for the option to set. See the latest Mesos config docs for available options, or the output of `mesos-master --help`.
[:et_mesos][:slave][:master] String [REQUIRED] mesos master url.This should be ip:port for non-ZooKeeper based masters, otherwise a zk:// . when mesosphere, you should set zk:// address.
[:et_mesos][:slave][:option_name] String Like [:et_mesos][:master][:option_name] above, arbitrary options may be specified as a key for a slave by replacing `option_name` with your option’s key.

Testing

There are a couple of test suites in place:

  • chefspec for unit tests.
  • test-kitchen with serverspec for integration tests (using vagrant).

These test both source and mesosphere type installations (using both the master and slave recipes).

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write you change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License

MIT License. see [LICENSE.txt](LICENSE.txt)

(Please note that before 2015-02-06-18:00 PST, this project is opened under Apache License, Version 2.0. See also README.md in old version)

Foodcritic Metric
            

1.0.1 failed this metric

FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/attributes/default.rb:1
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/attributes/default.rb:28
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/attributes/default.rb:30
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/attributes/default.rb:37
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/default.rb:12
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/default.rb:24
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/docker-executor.rb:6
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/master.rb:14
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/master.rb:21
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/master.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/master.rb:26
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/master.rb:30
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/master.rb:34
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/master.rb:53
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/master.rb:59
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/master.rb:65
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/master.rb:72
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/master.rb:79
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/master.rb:90
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/mesosphere.rb:6
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/mesosphere.rb:40
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/mesosphere.rb:50
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/slave.rb:14
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/slave.rb:21
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/slave.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/slave.rb:26
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/slave.rb:30
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/slave.rb:42
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/slave.rb:48
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/slave.rb:51
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/slave.rb:56
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/slave.rb:61
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/slave.rb:71
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/source.rb:55
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/source.rb:56
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/source.rb:65
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/source.rb:66
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/source.rb:72
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/source.rb:77
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/source.rb:79
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/source.rb:83
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/templates/default/masters.erb:1
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/templates/default/mesos-deploy-env.sh.erb:9
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/templates/default/mesos-deploy-env.sh.erb:13
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/templates/default/mesos-master-env.sh.erb:6
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/templates/default/mesos-master-env.sh.erb:7
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/templates/default/mesos-slave-env.sh.erb:11
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/templates/default/mesos-slave-env.sh.erb:12
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/templates/default/slaves.erb:1
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/templates/default/upstart.conf.for.source.erb:13
FC002: Avoid string interpolation where not required: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/slave.rb:78
FC002: Avoid string interpolation where not required: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/source.rb:66
FC019: Access node attributes in a consistent manner: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/default.rb:7
FC019: Access node attributes in a consistent manner: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/default.rb:8
FC019: Access node attributes in a consistent manner: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/default.rb:16
FC019: Access node attributes in a consistent manner: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/docker-executor.rb:7
FC019: Access node attributes in a consistent manner: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/mesosphere.rb:8
FC019: Access node attributes in a consistent manner: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/mesosphere.rb:43
FC019: Access node attributes in a consistent manner: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/mesosphere.rb:44
FC019: Access node attributes in a consistent manner: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/mesosphere.rb:50
FC019: Access node attributes in a consistent manner: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/source.rb:14
FC019: Access node attributes in a consistent manner: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/zookeeper.rb:6
FC031: Cookbook without metadata file: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/metadata.rb:1
FC048: Prefer Mixlib::ShellOut: /tmp/cook/45c63afc1e1ca0d193f6663c/et_mesos/recipes/source.rb:60