Giter VIP home page Giter VIP logo

cookbook-mesos's Introduction

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[:mesos][:type] attribute (source or mesosphere).

Platform

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

If you would use cgroups isolator or docker containerizer, version 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[:mesos][:type] variable.

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

Recipes

mesos::default

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

mesos::build_from_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[:mesos][:mesosphere][:with_zookeeper] if required because Mesosphere's mesos package doesn't include zookeeper. You can also specify mesosphere package's build version (see below for details).

mesos::master

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

  • 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 mesosphere as node[:mesos][:type], the node[: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[:mesos][:master] attribute.

If you have a configuration as shown below:

node[: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 here for available options or the output of mesos-master --help.

mesos::slave

Configure slave configuration files, and start mesos-slave.

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

If you choose mesosphere as node[:mesos][:type], the node[: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[:mesos][:slave] hash. If you have a configuration as shown below:

node[: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 here 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. See ./example/mesosphere/Vagrantfile

Usage

Please see below:

Attributes

mesos::default

Key Type Description Default
[:mesos][:type] String installation type(source or mesosphere) source

mesos::build_from_source

Key Type Description Default
[:mesos][:version] String Version(branch or tag name at http://github.com/apache/mesos). 0.20.1
[:mesos][:prefix] String Prefix value to be passed to configure script /usr/local
[:mesos][:home] String Directory which mesos sources are extracted to(node[:mesos][:home]/mesos). /opt
[:mesos][:build][:skip_test] Boolean Flag whether test will be performed. true

mesos::mesosphere

Key Type Description Default
[:mesos][:version] String Version.(see http://mesosphere.io/downloads/) 0.20.1
[:mesos][:mesosphere][:build_version] String build version of mesosphere package. mesosphere's package version consists of 2 parts, `-`, for example `0.20.0-1.0.ubuntu1404` 1.0.ubuntu1404
[:mesos][:mesosphere][:with_zookeeper] String flag for installing zookeeper package false

mesos::master

Key Type Description Default
[:mesos][:prefix] String Prefix value to be passed to configure script. This value will be overridden by /usr/local when you choose mesosphere. /usr/local
[:mesos][:ssh_opt] String ssh options to be used in mesos-[start|stop]-cluster -o StrictHostKeyChecking=no
-o ConnectTimeout=2
[:mesos][:deploy_with_sudo] String Flag whether sudo will be used in mesos-[start|stop]-cluster 1
[:mesos][:cluster_name] String [OBSOLETE] Human readable name for the cluster, displayed at webui. MyCluster
[:mesos][:mater_ips] Array of String IP list of masters used in mesos-[start|stop]-cluster [ ]
[:mesos][:slave_ips] Array of String IP list of slaves used in mesos-[start|stop]-cluster [ ]
[: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)
[:mesos][:master][:work_dir] String [REQUIRED(0.19.1+)] Where to store the persistent information stored in the Registry. /tmp/mesos
[: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.
[:mesos][:master][:<option_name>] String You can set arbitrary command line option for mesos-master. See [here](http://mesos.apache.org/documentation/latest/configuration/) for available options or the output of `mesos-master --help`.

mesos::slave

Key Type Description Default
[:mesos][:prefix] String Prefix value to be passed to configure script. This value will be overridden by /usr/local when you choose mesosphere. /usr/local
[: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.
[:mesos][:slave][:<option_name>] String You can set arbitrary command line option for mesos-slave. See [here](http://mesos.apache.org/documentation/latest/configuration/) for available options or the output of `mesos-slave --help`.

Testing

There are a couple of test suites

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

in place, which tests both source and mesosphere installations (as well as 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

(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)

cookbook-mesos's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cookbook-mesos's Issues

test-kitchen + serverspec for integration tests?

Just a quick question whether you guys have considered some kind of local test setup? For example via test-kitchen and serverspec?

My main motivation for asking is that I'm interested in possibly adding support for CentOS / Official AWS Linux AMIs and would like to make sure that I'm not breaking anything in the process.

I'd be happy to contribute a pull request adding test-kitchen configuration and getting everything running.

'unzip' package cannot be authenticated, causes chef to fail

==> master1: [2014-07-25T22:28:39+00:00] INFO: Running queued delayed notifications before re-raising exception
==> master1: [2014-07-25T22:28:39+00:00] ERROR: Running exception handlers
==> master1: [2014-07-25T22:28:39+00:00] ERROR: Exception handlers complete
==> master1: [2014-07-25T22:28:39+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> master1: [2014-07-25T22:28:39+00:00] ERROR: package[unzip](mesos::mesosphere line 86) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
==> master1: ---- Begin output of apt-get -q -y install unzip=6.0-8ubuntu2 ----
==> master1: STDOUT: Reading package lists...
==> master1: Building dependency tree...
==> master1: Reading state information...
==> master1: The following packages were automatically installed and are no longer required:
==> master1: erubis ohai ruby-bunny ruby-erubis ruby-highline ruby-i18n ruby-ipaddress
==> master1: ruby-mime-types ruby-mixlib-authentication ruby-mixlib-cli
==> master1: ruby-mixlib-config ruby-mixlib-log ruby-mixlib-shellout ruby-moneta
==> master1: ruby-net-ssh ruby-net-ssh-gateway ruby-net-ssh-multi ruby-polyglot
==> master1: ruby-rest-client ruby-sigar ruby-systemu ruby-treetop ruby-uuidtools
==> master1: ruby-yajl
==> master1: Use 'apt-get autoremove' to remove them.
==> master1: Suggested packages:
==> master1: zip
==> master1: The following NEW packages will be installed:
==> master1: unzip
==> master1: 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
==> master1: Need to get 192 kB of archives.
==> master1: After this operation, 394 kB of additional disk space will be used.
==> master1: WARNING: The following packages cannot be authenticated!
==> master1: unzip
==> master1: STDERR: E: There are problems and -y was used without --force-yes
==> master1: ---- End output of apt-get -q -y install unzip=6.0-8ubuntu2 ----
==> master1: Ran apt-get -q -y install unzip=6.0-8ubuntu2 returned 100
==> master1: [2014-07-25T22:28:40+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

As seen in Vagrant's attempt to create a Mesos cluster via VirtualBox.

Add a license file to the repo

Hi @everpeace, I noticed there's a note in the License section of the README about the Apache license, but the reference to the full license is via URL (rather than a local file), and there are some issues with referencing documents via URLs, such as:

  • their contents can change without the URL changing or any notification, or
  • the site can move or become unavailable, and the content the URL is referencing is lost

Could you please add an explicit LICENSE file with the contents of the Apache license to this repo as well?

Thanks!

Mesos master and slave processes restart on every Chef run

This behavior clearly can cause issues to running Mesos loads as mesos masters restarting will cause a master to failover unnecessarily. Mesos slaves restarting will probably kill (or at the very least affect) any executors that were running on that slave.

The better approach here would be to only restart the Mesos master or slave daemons when it's needed based on a configuration file change.

I consider this to be a pretty big issue with this cookbook as it forces me to stop chef-client on my mesos cluster in order to avoid these side affects.

ubuntu package install failed on sudo

10.30.30.179 ---- Begin output of "bash"  "/tmp/chef-script20150219-1419-x9wwkn" ----
10.30.30.179 STDOUT: 
10.30.30.179 STDERR: sudo: sorry, you must have a tty to run sudo
10.30.30.179 sudo: sorry, you must have a tty to run sudo
10.30.30.179 ---- End output of "bash"  "/tmp/chef-script20150219-1419-x9wwkn" ----

why not use the apt_repository and package lwrp?

chef-client run failing on mesos::master nodes: service[mesos_master] not found

Hi,

I have bootstrapped some nodes with mesos::master and the bootstrapping completes successfully and mesos-master is running on them. I needed to make a change to another cookbook on the nodes so I ran chef-client on one of them after pushing the change (a simple AFW rule to open the mesos port). chef-client dies, unable to find service[mesos-master] in the resource collection.

First, here is the relevant portion of the bootstrap:

10.20.0.183 Recipe: mesos::mesosphere
10.20.0.183   * package[unzip] action install
10.20.0.183     - install version 6.0-9ubuntu1 of package unzip
10.20.0.183   * package[libcurl3] action install (up to date)
10.20.0.183   * package[default-jre-headless] action install
10.20.0.183     - install version 2:1.7-51 of package default-jre-headless
10.20.0.183   * link[/usr/lib/libjvm.so] action create
10.20.0.183     - create symlink at /usr/lib/libjvm.so to /usr/lib/jvm/default-java/jre/lib/amd64/server/libjvm.so
10.20.0.183   * remote_file[/var/chef/cache/mesos_0.19.1.deb] action create
10.20.0.183     - create new file /var/chef/cache/mesos_0.19.1.deb
10.20.0.183     - update content in file /var/chef/cache/mesos_0.19.1.deb from none to fed60e
10.20.0.183     (file sizes exceed 10000000 bytes, diff output suppressed)
10.20.0.183     - change mode from '' to '0644'
10.20.0.183   * dpkg_package[mesos] action install
10.20.0.183     - install version 0.19.1-1.0.ubuntu1404 of package mesos
10.20.0.183   * template[/etc/init/mesos-master.conf] action create (skipped due to not_if)
10.20.0.183   * template[/etc/init/mesos-slave.conf] action create (skipped due to not_if)
10.20.0.183   * service[mesos-master] action nothing (skipped due to action :nothing)
10.20.0.183   * service[mesos-slave] action nothing (skipped due to action :nothing)
10.20.0.183 Recipe: mesos::master
10.20.0.183   * template[/usr/local/var/mesos/deploy/masters] action create
10.20.0.183     - create new file /usr/local/var/mesos/deploy/masters
10.20.0.183     - update content in file /usr/local/var/mesos/deploy/masters from none to e3b0c4
10.20.0.183     (no diff)
10.20.0.183     - change mode from '' to '0644'
10.20.0.183     - change owner from '' to 'root'
10.20.0.183     - change group from '' to 'root'
10.20.0.183   * template[/usr/local/var/mesos/deploy/slaves] action create
10.20.0.183     - create new file /usr/local/var/mesos/deploy/slaves
10.20.0.183     - update content in file /usr/local/var/mesos/deploy/slaves from none to e3b0c4
10.20.0.183     (no diff)
10.20.0.183     - change mode from '' to '0644'
10.20.0.183     - change owner from '' to 'root'
10.20.0.183     - change group from '' to 'root'
10.20.0.183   * template[/usr/local/var/mesos/deploy/mesos-deploy-env.sh] action create
10.20.0.183     - create new file /usr/local/var/mesos/deploy/mesos-deploy-env.sh
10.20.0.183     - update content in file /usr/local/var/mesos/deploy/mesos-deploy-env.sh from none to c48128
10.20.0.183     --- /usr/local/var/mesos/deploy/mesos-deploy-env.sh 2014-08-21 20:52:35.409001999 +0000
10.20.0.183     +++ /tmp/chef-rendered-template20140821-1444-g9tytr 2014-08-21 20:52:35.409001999 +0000
10.20.0.183     @@ -1 +1,14 @@
10.20.0.183     +#!/bin/sh
10.20.0.183     +
10.20.0.183     +# This file contains environment variables that modify how the deploy
10.20.0.183     +# scripts are run. For example, it can be used to configure SSH
10.20.0.183     +# options (see below).
10.20.0.183     +
10.20.0.183     +
10.20.0.183     +# Options for SSH.
10.20.0.183     +export SSH_OPTS="-o StrictHostKeyChecking=no -o ConnectTimeout=2"
10.20.0.183     +
10.20.0.183     +
10.20.0.183     +# Use sudo for launching masters and slaves.
10.20.0.183     +export DEPLOY_WITH_SUDO="1"
10.20.0.183     - change mode from '' to '0644'
10.20.0.183     - change owner from '' to 'root'
10.20.0.183     - change group from '' to 'root'
10.20.0.183   * template[/usr/local/var/mesos/deploy/mesos-master-env.sh] action create
10.20.0.183     - create new file /usr/local/var/mesos/deploy/mesos-master-env.sh
10.20.0.183     - update content in file /usr/local/var/mesos/deploy/mesos-master-env.sh from none to c977c9
10.20.0.183     --- /usr/local/var/mesos/deploy/mesos-master-env.sh 2014-08-21 20:52:35.449022000 +0000
10.20.0.183     +++ /tmp/chef-rendered-template20140821-1444-9i1009 2014-08-21 20:52:35.453023999 +0000
10.20.0.183     @@ -1 +1,13 @@
10.20.0.183     +# This file contains environment variables that are passed to mesos-master.
10.20.0.183     +# To get a description of all options run mesos-master --help; any option
10.20.0.183     +# supported as a command-line option is also supported as an environment
10.20.0.183     +# variable.
10.20.0.183     +
10.20.0.183     +export MESOS_log_dir=/var/log/mesos
10.20.0.183     +export MESOS_work_dir=/tmp/mesos
10.20.0.183     +export MESOS_port=5050
10.20.0.183     +export MESOS_quorum=2
10.20.0.183     +export MESOS_zk=zk://10.20.0.144:2181,10.20.0.145:2181,10.20.0.146:2181,10.20.0.147:2181,10.20.0.148:2181,/mesos
10.20.0.183     +
10.20.0.183     +
10.20.0.183     - change mode from '' to '0644'
10.20.0.183     - change owner from '' to 'root'
10.20.0.183     - change group from '' to 'root'
10.20.0.183   * template[/etc/init/mesos-master.conf] action create
10.20.0.183     - update content in file /etc/init/mesos-master.conf from 9f760b to 046216
10.20.0.183     --- /etc/init/mesos-master.conf 2014-07-18 19:06:02.000000000 +0000
10.20.0.183     +++ /tmp/chef-rendered-template20140821-1444-33wper 2014-08-21 20:52:35.497046000 +0000
10.20.0.183     @@ -8,5 +8,4 @@
10.20.0.183      respawn
10.20.0.183
10.20.0.183      exec /usr/bin/mesos-init-wrapper master
10.20.0.183     -
10.20.0.183   * template[/etc/mesos/zk] action create
10.20.0.183     - update content in file /etc/mesos/zk from 2fdc8a to 4e707b
10.20.0.183     --- /etc/mesos/zk   2014-07-18 19:06:02.000000000 +0000
10.20.0.183     +++ /tmp/chef-rendered-template20140821-1444-1c461ly    2014-08-21 20:52:35.533063999 +0000
10.20.0.183     @@ -1,2 +1,3 @@
10.20.0.183     -zk://localhost:2181/mesos
10.20.0.183     +zk://10.20.0.144:2181,10.20.0.145:2181,10.20.0.146:2181,10.20.0.147:2181,10.20.0.148:2181,/mesos
10.20.0.183     +
10.20.0.183   * template[/etc/default/mesos] action create (up to date)
10.20.0.183   * template[/etc/default/mesos-master] action create (up to date)
10.20.0.183   * directory[/etc/mesos-master] action create (up to date)
10.20.0.183   * bash[cleanup /etc/mesos-master/] action run
10.20.0.183     - execute "bash"  "/tmp/chef-script20140821-1444-ewojku"
10.20.0.183   * bash[echo /tmp/mesos > /etc/mesos-master/work_dir] action run
10.20.0.183     - execute "bash"  "/tmp/chef-script20140821-1444-1hhn422"
10.20.0.183   * bash[echo 2 > /etc/mesos-master/quorum] action run
10.20.0.183     - execute "bash"  "/tmp/chef-script20140821-1444-frvlfc"
10.20.0.183 Recipe: chef-client::init_service
10.20.0.183   * service[chef-client] action restart
10.20.0.183     - restart service service[chef-client]
10.20.0.183 Recipe: afw::default
10.20.0.183   * ruby_block[cleanup_rules] action create
10.20.0.183     - execute the ruby block cleanup_rules
10.20.0.183 Recipe: openssh::default
10.20.0.183   * service[ssh] action restart
10.20.0.183     - restart service service[ssh]
10.20.0.183 Recipe: ntp::apparmor
10.20.0.183   * service[apparmor] action restart
10.20.0.183     - restart service service[apparmor]
10.20.0.183 Recipe: ntp::default
10.20.0.183   * service[ntp] action restart
10.20.0.183     - restart service service[ntp]
10.20.0.183 Recipe: rsyslog::default
10.20.0.183   * service[rsyslog] action restart
10.20.0.183     - restart service service[rsyslog]
10.20.0.183 Recipe: mesos::mesosphere
10.20.0.183   * dpkg_package[mesos] action install (skipped due to not_if)
10.20.0.183   * service[mesos-master] action reload (up to date)
10.20.0.183   * service[mesos-master] action restart
10.20.0.183     - restart service service[mesos-master]
10.20.0.183
10.20.0.183 Running handlers:
10.20.0.183 Running handlers complete
10.20.0.183 Chef Client finished, 139/169 resources updated in 130.829191057 seconds

Here is the chef-client run that fails:

Starting Chef Client, version 11.14.6
resolving cookbooks for run list: ["revinate_mesos::master"]
Synchronizing Cookbooks:
  - revinate_base
  - revinate_mesos
  - apt
  - afw
  - cron
  - chef-client
  - logrotate
  - zsh
  - users
  - sudo
  - openssh
  - iptables
  - yum
  - revinate_rsyslog
  - rsyslog
  - gosendlog
  - revinate_ntp
  - mosh
  - ntp
  - copperegg
  - chef_handler
  - resolver
  - mesos
  - java
  - python
  - build-essential
  - yum-epel
  - ark
  - ulimit
  - maven
  - exhibitor
  - runit
  - zookeeper
Compiling Cookbooks...
[2014-08-21T20:55:53+00:00] WARN: Cloning resource attributes for directory[/var/run/chef] from prior resource (CHEF-3694)
[2014-08-21T20:55:53+00:00] WARN: Previous directory[/var/run/chef]: /var/chef/cache/cookbooks/chef-client/libraries/helpers.rb:77:in `block in create_directories'
[2014-08-21T20:55:53+00:00] WARN: Current  directory[/var/run/chef]: /var/chef/cache/cookbooks/chef-client/libraries/helpers.rb:77:in `block in create_directories'
[2014-08-21T20:55:53+00:00] WARN: Cloning resource attributes for directory[/var/cache/chef] from prior resource (CHEF-3694)
[2014-08-21T20:55:53+00:00] WARN: Previous directory[/var/cache/chef]: /var/chef/cache/cookbooks/chef-client/libraries/helpers.rb:77:in `block in create_directories'
[2014-08-21T20:55:53+00:00] WARN: Current  directory[/var/cache/chef]: /var/chef/cache/cookbooks/chef-client/libraries/helpers.rb:77:in `block in create_directories'
[2014-08-21T20:55:53+00:00] WARN: Cloning resource attributes for directory[/var/lib/chef] from prior resource (CHEF-3694)
[2014-08-21T20:55:53+00:00] WARN: Previous directory[/var/lib/chef]: /var/chef/cache/cookbooks/chef-client/libraries/helpers.rb:77:in `block in create_directories'
[2014-08-21T20:55:53+00:00] WARN: Current  directory[/var/lib/chef]: /var/chef/cache/cookbooks/chef-client/libraries/helpers.rb:77:in `block in create_directories'
[2014-08-21T20:55:53+00:00] WARN: Cloning resource attributes for directory[/var/log/chef] from prior resource (CHEF-3694)
[2014-08-21T20:55:53+00:00] WARN: Previous directory[/var/log/chef]: /var/chef/cache/cookbooks/chef-client/libraries/helpers.rb:77:in `block in create_directories'
[2014-08-21T20:55:53+00:00] WARN: Current  directory[/var/log/chef]: /var/chef/cache/cookbooks/chef-client/libraries/helpers.rb:77:in `block in create_directories'
[2014-08-21T20:55:53+00:00] WARN: Cloning resource attributes for directory[/etc/chef] from prior resource (CHEF-3694)
[2014-08-21T20:55:53+00:00] WARN: Previous directory[/etc/chef]: /var/chef/cache/cookbooks/chef-client/libraries/helpers.rb:77:in `block in create_directories'
[2014-08-21T20:55:53+00:00] WARN: Current  directory[/etc/chef]: /var/chef/cache/cookbooks/chef-client/libraries/helpers.rb:77:in `block in create_directories'
Recipe: revinate_rsyslog::default
  * chef_gem[chef-rewind] action install (up to date)
  Converging 81 resources

Running handlers:
[2014-08-21T20:55:54+00:00] ERROR: Running exception handlers
Running handlers complete
[2014-08-21T20:55:54+00:00] ERROR: Exception handlers complete
[2014-08-21T20:55:54+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 5.543179863 seconds
[2014-08-21T20:55:54+00:00] ERROR: resource template[/usr/local/var/mesos/deploy/mesos-master-env.sh] is configured to notify resource service[mesos-master] with action reload, but service[mesos-master] cannot be found in the resource collection. template[/usr/local/var/mesos/deploy/mesos-master-env.sh] is defined in /var/chef/cache/cookbooks/mesos/recipes/master.rb:66:in `from_file'

[2014-08-21T20:55:54+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

This doesn't make sense because the service appears to work just fine in the initial bootstrap:

10.20.0.183 Recipe: mesos::mesosphere
10.20.0.183   * dpkg_package[mesos] action install (skipped due to not_if)
10.20.0.183   * service[mesos-master] action reload (up to date)
10.20.0.183   * service[mesos-master] action restart
10.20.0.183     - restart service service[mesos-master]

Any ideas?

more attributes support.

now, as of 28633f7, very limited options (used in mesos-master, mesos-slave) are supported.

I recognize more options would be required to be supported.

Error executing action `run` on resource 'bash[add an apt's trusted key for mesosphere]'

Error in master installation:

$ vagrant -v
Vagrant 1.7.2
$ vagrant plugin list
vagrant-berkshelf (4.0.4)
vagrant-cachier (1.2.0)
vagrant-hosts (2.4.0)
vagrant-omnibus (1.4.1)
vagrant-share (1.1.3, system)
==> default: ================================================================================
==> default: Error executing action `run` on resource 'bash[add an apt's trusted key for mesosphere]'
==> default: ================================================================================
==> default:
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default:
==> default: ------------------------------------
==> default: Expected process to exit with [0], but received '2'
==> default: ---- Begin output of "bash"  "/tmp/chef-script20150616-1972-1265ytq" ----
==> default:
==> default: STDOUT: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.iz7l6jvFhD --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusd.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv E56151BF
==> default: STDERR: gpg: requesting key E56151BF from hkp server keyserver.ubuntu.com
==> default: gpg: keyserver timed out
==> default:
==> default: gpg: keyserver receive failed: keyserver error
==> default: ---- End output of "bash"  "/tmp/chef-script20150616-1972-1265ytq" ----
==> default: Ran "bash"  "/tmp/chef-script20150616-1972-1265ytq" returned 2
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /tmp/vagrant-chef/f198b082ebbffd265a2cc2d7558bd66a/cookbooks/mesos/libraries/helpers.rb
==> default:
==> default:
==> default: 131:         bash "add an apt's trusted key for mesosphere" do
==> default: 132:           code <<-EOH
==> default:
==> default: 133:             apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF
==> default: 134:           EOH
==> default: 135:           action :run
==> default: 136:         end
==> default: 137:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /tmp/vagrant-chef/f198b082ebbffd265a2cc2d7558bd66a/cookbooks/mesos/libraries/helpers.rb:131:in `install_mesos'
==> default:
==> default: bash("add an apt's trusted key for mesosphere") do
==> default:   action [:run]
==> default:   retries 0
==> default:   retry_delay 2
==> default:   default_guard_interpreter :default
==> default:   command "add an apt's trusted key for mesosphere"
==> default:   backup 5
==> default:   returns 0
==> default:   code "            apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF\n"
==> default:   interpreter "bash"
==> default:   declared_type :bash
==> default:   cookbook_name :mesos
==> default:
==> default:   recipe_name "mesosphere"
==> default: end
==> default:
==> default:
==> default: [2015-06-16T14:22:05+00:00] INFO: Running queued delayed notifications before re-raising exception
==> default: [2015-06-16T14:22:05+00:00] ERROR: Running exception handlers
==> default: [2015-06-16T14:22:05+00:00] ERROR: Exception handlers complete
==> default: [2015-06-16T14:22:05+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-06-16T14:22:05+00:00] ERROR: bash[add an apt's trusted key for mesosphere] (mesos::mesosphere line 131) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected processo exit with [0], but received '2'
==> default: ---- Begin output of "bash"  "/tmp/chef-script20150616-1972-1265ytq" ----
==> default: STDOUT: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.iz7l6jvFhD --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusd.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv E56151BF
==> default: STDERR: gpg: requesting key E56151BF from hkp server keyserver.ubuntu.com
==> default: gpg: keyserver timed out
==> default: gpg: keyserver receive failed: keyserver error
==> default: ---- End output of "bash"  "/tmp/chef-script20150616-1972-1265ytq" ----
==> default: Ran "bash"  "/tmp/chef-script20150616-1972-1265ytq" returned 2
==> default: [2015-06-16T14:22:05+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Change or review the value in file https://github.com/everpeace/cookbook-mesos/blob/master/libraries/helpers.rb
this line 133

apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF

by

sudo gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xdf7d54cbe56151bf

Thanks and sorry by my english

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.