<commit_before>Mesos Cookbook
==============
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](http://mesosophere.io) package.  You can switch installation type by `node[:mesos][:type]` variable (`source` or `mesosphere`).

[BETA] This cookbook also contains some mesos scheduler framework or executors:

* `mesos::docker-exectuor` (only supports Mesos 0.14.0)
* `mesos::marathon-framework` (planned.)

Platform
------------
only support `ubuntu`

Installation Type
----
You have to specify intallation type (`source` or `mesosphere`) by `node[:mesos][:type]` variable.

Cookbooks
----
### mesos::default
install mesos by `build_from_source` recipe or `mesosphere` recipe.

###mesos::build_from_source
install mesos(download zip from [github](https://github.com/apache/mesos), configure, make, make install).

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

### mesos::master
configure master and cluster deployment configuration files. If you choose `mesosphere`, `node[:mesos][:prefix]` would be overridden by `/usr/local` because mesosphere package installs deploy files to the directory.

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

if you choose installation type `mesosphere`,  this recipe also confiures upstart conf files which are installed by mesosphere mesos package.

* `/etc/mesos/zk`
* `/etc/defaults/mesos`
* `/etc/defaults/mesos-master`

### mesos::slave
configure slave configuration files.  If you choose `mesosphere`, `node[:mesos][:prefix]` would be overridden by `/usr/local` because mesosphere package installs deploy files to the directory.

* `node[:mesos][:prefix]/var/mesos/deploy/mesos-slave-env.sh`

if you choose installation type `mesosphere`,  this recipe also confiures upstart conf files which are installed by mesosphere mesos package.

* `/etc/mesos/zk`
* `/etc/defaults/mesos`
* `/etc/defaults/mesos-slave`

### [BETA] mesos::docker-executor
install [mesos-docker executor](https://github.com/mesosphere/mesos-docker).  currently only Mesos 0.14.0 is supported.

__NOTE__: This cookbook DOES NOT install docker automatically. So, you need to install docker manually. see [./sample/mesosphere/Vagrantfile](https://github.com/everpeace/cookbook-mesos/tree/master/example/mesosphere/Vagrantfile)

Usage
----
please see bellows

* [everpeace/vagrant-mesos](https://github.com/everpeace/vagrant-mesos)
* [./sample/source](https://github.com/everpeace/cookbook-mesos/tree/master/example/source/)
* [./sample/mesosphere](https://github.com/everpeace/cookbook-mesos/tree/master/example/mesosphere/)

Attributes
----------
#### mesos::default
<table>
  <tr>
    <th>Key</th>
    <th>Type</th>
    <th>Description</th>
    <th>Default</th>
  </tr>
  <tr>
    <td><tt>[:mesos][:type]</tt></td>
    <td>String</td>
    <td>installation type(<tt>source</tt> or <tt>mesosphere</tt>)</td>
    <td><tt>source</tt></td>
  </tr>
</table>

#### mesos::build_from_source
<table>
  <tr>
    <th>Key</th>
    <th>Type</th>
    <th>Description</th>
    <th>Default</th>
  </tr>
  <tr>
    <td><tt>[:mesos][:version]</tt></td>
    <td>String</td>
    <td>Version(branch or tag name at http://github.com/apache/mesos).</td>
    <td><tt>0.15.0-rc5</tt></td>
  </tr>
  <tr>
  <td><tt>[:mesos][:prefix]</tt></td>
  <td>String</td>
  <td>Prefix value to be passed to configure script</td>
  <td><tt>/usr/local</tt></td>
  </tr>
  <tr>
  <td><tt>[:mesos][:home]</tt></td>
  <td>String</td>
  <td>Directory which mesos sources are extracted to(<tt>node[:mesos][:home]/mesos</tt>).</td>
  <td><tt>/opt</tt></td>
  </tr>
  <tr>
    <td><tt>[:mesos][:build][:skip_test]</tt></td>
    <td>Boolean</td>
    <td>Flag whether test will be performed.</td>
    <td><tt>true</tt></td>
  </tr>
</table>

#### mesos::mesosphere
<table>
  <tr>
    <th>Key</th>
    <th>Type</th>
    <th>Description</th>
    <th>Default</th>
  </tr>
  <tr>
    <td><tt>[:mesos][:version]</tt></td>
    <td>String</td>
    <td>Version(one of 0.14.0, 0.14.1, 0.14.2, 0.15.0-rc4, 0.15.0-rc5).</td>
    <td><tt>0.15.0-rc4</tt></td>
  </tr>
  <tr>
    <td><tt>[:mesos][:mesosphere][:with_zookeeper]</tt></td>
    <td>String</td>
    <td>flag for installing zookeeper package</td>
    <td><tt>false</tt></td>
  </tr>
</table>

### mesos::master
<table>
  <tr>
    <th>Key</th>
    <th>Type</th>
    <th>Description</th>
    <th>Default</th>
  </tr>
  <tr><commit_msg>fix a typo.<commit_after>Mesos Cookbook
==============
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](http://mesosophere.io) package.  You can switch installation type by `node[:mesos][:type]` variable (`source` or `mesosphere`).

[BETA] This cookbook also contains some mesos scheduler framework or executors:

* `mesos::docker-exectuor` (only supports Mesos 0.14.0)
* `mesos::marathon-framework` (planned.)

Platform
------------
only support `ubuntu`

Installation Type
----
You have to specify intallation type (`source` or `mesosphere`) by `node[:mesos][:type]` variable.

Cookbooks
----
### mesos::default
install mesos by `build_from_source` recipe or `mesosphere` recipe.

###mesos::build_from_source
install mesos(download zip from [github](https://github.com/apache/mesos), configure, make, make install).

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

### mesos::master
configure master and cluster deployment configuration files. If you choose `mesosphere`, `node[:mesos][:prefix]` would be overridden by `/usr/local` because mesosphere package installs deploy files to the directory.

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

if you choose installation type `mesosphere`,  this recipe also confiures upstart conf files which are installed by mesosphere mesos package.

* `/etc/mesos/zk`
* `/etc/defaults/mesos`
* `/etc/defaults/mesos-master`

### mesos::slave
configure slave configuration files.  If you choose `mesosphere`, `node[:mesos][:prefix]` would be overridden by `/usr/local` because mesosphere package installs deploy files to the directory.

* `node[:mesos][:prefix]/var/mesos/deploy/mesos-slave-env.sh`

if you choose installation type `mesosphere`,  this recipe also confiures upstart conf files which are installed by mesosphere mesos package.

* `/etc/mesos/zk`
* `/etc/defaults/mesos`
* `/etc/defaults/mesos-slave`

### [BETA] mesos::docker-executor
install [mesos-docker executor](https://github.com/mesosphere/mesos-docker).  currently only Mesos 0.14.0 is supported.

__NOTE__: This cookbook DOES NOT install docker automatically. So, you need to install docker manually. see [./sample/mesosphere/Vagrantfile](https://github.com/everpeace/cookbook-mesos/tree/master/example/mesosphere/Vagrantfile)

Usage
----
please see bellows

* [everpeace/vagrant-mesos](https://github.com/everpeace/vagrant-mesos)
* [./sample/source](https://github.com/everpeace/cookbook-mesos/tree/master/example/source/)
* [./sample/mesosphere](https://github.com/everpeace/cookbook-mesos/tree/master/example/mesosphere/)

Attributes
----------
#### mesos::default
<table>
  <tr>
    <th>Key</th>
    <th>Type</th>
    <th>Description</th>
    <th>Default</th>
  </tr>
  <tr>
    <td><tt>[:mesos][:type]</tt></td>
    <td>String</td>
    <td>installation type(<tt>source</tt> or <tt>mesosphere</tt>)</td>
    <td><tt>source</tt></td>
  </tr>
</table>

#### mesos::build_from_source
<table>
  <tr>
    <th>Key</th>
    <th>Type</th>
    <th>Description</th>
    <th>Default</th>
  </tr>
  <tr>
    <td><tt>[:mesos][:version]</tt></td>
    <td>String</td>
    <td>Version(branch or tag name at http://github.com/apache/mesos).</td>
    <td><tt>0.15.0-rc5</tt></td>
  </tr>
  <tr>
  <td><tt>[:mesos][:prefix]</tt></td>
  <td>String</td>
  <td>Prefix value to be passed to configure script</td>
  <td><tt>/usr/local</tt></td>
  </tr>
  <tr>
  <td><tt>[:mesos][:home]</tt></td>
  <td>String</td>
  <td>Directory which mesos sources are extracted to(<tt>node[:mesos][:home]/mesos</tt>).</td>
  <td><tt>/opt</tt></td>
  </tr>
  <tr>
    <td><tt>[:mesos][:build][:skip_test]</tt></td>
    <td>Boolean</td>
    <td>Flag whether test will be performed.</td>
    <td><tt>true</tt></td>
  </tr>
</table>

#### mesos::mesosphere
<table>
  <tr>
    <th>Key</th>
    <th>Type</th>
    <th>Description</th>
    <th>Default</th>
  </tr>
  <tr>
    <td><tt>[:mesos][:version]</tt></td>
    <td>String</td>
    <td>Version(one of 0.14.0, 0.14.1, 0.14.2, 0.15.0-rc4, 0.15.0-rc5).</td>
    <td><tt>0.15.0-rc5</tt></td>
  </tr>
  <tr>
    <td><tt>[:mesos][:mesosphere][:with_zookeeper]</tt></td>
    <td>String</td>
    <td>flag for installing zookeeper package</td>
    <td><tt>false</tt></td>
  </tr>
</table>

### mesos::master
<table>
  <tr>
    <th>Key</th>
    <th>Type</th>
    <th>Description</th>
    <th>Default</th>
  </tr>
  <tr>
{'fraction_non_alphanumeric': 0.1955440414507772, 'fraction_numerical': 0.008290155440414507, 'mean_word_length': 4.216756756756757, 'pattern_counts': {'":': 0, '<': 309, '<?xml version=': 0, '>': 309, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6357961', 'n_tokens_mistral': 3657, 'n_tokens_neox': 3510, 'n_words': 735}