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


eye (14) Versions 0.7.1

Installs eye gem and configures it to manage services, includes eye_service LWRP

cookbook 'eye', '= 0.7.1', :supermarket
cookbook 'eye', '= 0.7.1'
knife supermarket install eye
knife supermarket download eye
Quality -%

eye Cookbook

eye is a process monitoring tool, inspired by bluepill and god.
This chef cookbook installs the eye RubyGem and configures it to manage services. It also includes a LWRP.


eye is written in Ruby, so it should work on any system. If you want to use eye's uid or gid features, Ruby > 2.0.0 is required.


  • node['eye']['version'] - Version of eye, default is '0.6.1'
  • node['eye']['conf_dir'] - Location of eye's configuration files, default '/etc/eye'
  • node['eye']['bin'] - Location of eye binary, default "node['languages']['ruby']['bin_dir']/eye"
  • node['eye']['log_dir'] - Location of eye's logfiles, default '/var/log/eye'
  • node['eye']['run_dir'] - Path of state directory, default '/var/run/eye'
  • node['eye']['user'] - Owner of eye process, directories and configuration files, default 'root'
  • node['eye']['group'] - Group of eye process, directories and configuration files, default 'root'
  • node['eye']['http']['install'] - if set to true, eye-http gem will be installed, default 'false'
  • node['eye']['http']['version'] - Version of eye-http, default is '0.6'


This cookbook contains a LWRPs, eye_service.

eye_service 'my_service' do
    action [:enable, :reload, :restart]

This loads eye daemon with a needed configuration 'my_service.eye' in a subdirectory of node['eye']['conf_dir'] named by the default eye owner (e.g /etc/eye/root/my_service.rb) and starts the according process. The owner of eye daemon and the process itself is the user defined with node['eye']['user']

An (additional) eye daemon can also be started by a different owner (with it's own logfile, e.g in '/var/log/eye/deploy/eye.log')

eye_service 'my_service' do
user_srv true
user_srv_uid 'deploy'
user_srv_gid 'deploy'
user_srv_home '/home/deploy'
action [:enable, :reload, :restart]

In that case the configuration file should be in '/etc/eye/deploy/my_service.eye'

If eye daemon should by controlled by node['eye']['user'], but the process should be started as different user, use eye's uid or gid configuration features.

eye_service creates an init script, e.g. '/etc/init.d/my_service'. This init script can be prefixed, like

eye_service 'my_service' do
    init_script_prefix 'eye-'

There's also a definition eye_app which creates the necessary configuration files, log directories and calls eye_service afterwards.

Example for unicorn:

eye_app "test_unicorn" do
user_srv true
user_srv_uid "deploy"
user_srv_gid "deploy"
user_srv_home '/home/deploy'
enable true
reload false
restart false
template "rails_unicorn.conf.erb"
cookbook "rails_app"
variables :ruby => "#{node['languages']['ruby']['bin_dir']}/ruby",
:environment => 'test',
:working_dir => '/var/www/rails_dir'

with according template:

Eye.application "test_unicorn" do
  env "RAILS_ENV" => '<%= @environment %>'
  env "PATH" => "#{File.dirname("<%= @ruby %>")}:#{ENV['PATH']}"

  working_dir "<%= @working_dir %>"

  process("unicorn") do
    pid_file "tmp/pids/"
    start_command "<%= @ruby %> ./bin/unicorn -Dc ./config/unicorn.rb -E <%= @environment %>"
    stdall "log/unicorn.log"

    stop_signals [:TERM, 10.seconds]

    restart_command "kill -USR2 {PID}"

    check :cpu, :every => 30, :below => 80, :times => 3
    check :memory, :every => 30, :below => 150.megabytes, :times => [3,5]

    start_timeout 30.seconds
    restart_grace 30.seconds

    monitor_children do
      stop_command "kill -QUIT {PID}"
      check :cpu, :every => 30, :below => 80, :times => 3
      check :memory, :every => 30, :below => 150.megabytes, :times => [3,5]



Just include eye in your node's run_list:

  "run_list": [


  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 and Authors

Authors: Holger Amann

Licensed under Apache License, Version 2.0

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

No quality metric results found