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


chef_eye (8) Versions 0.1.0

Installs/Configures chef_eye

cookbook 'chef_eye', '= 0.1.0', :supermarket
cookbook 'chef_eye', '= 0.1.0'
knife supermarket install chef_eye
knife supermarket download chef_eye
Quality 0%


Cookbook for setup eye service and applications

Supported Platforms

  • Ubuntu 12.04
  • Ubuntu 14.04


<td>Hash or Array</td>
<td>Array of users or Hash with users as keys and service options as value</td>
<td>Applications configurations</td>
<td>Try to install ruby packages ruby, ruby-dev</td>



Cookbook used system ruby and try to install ruby, ruby-dev packages if node['eye']['install_ruby'] set to true
If you want to use custom system ruby, you need set node['eye']['install_ruby'] to false and install custom ruby before
before this cookbook. For example, if you want to use uid and gid application options,
you need install ruby 2.0.0 as system ruby. Its installation is your concern.


Services named by eye_ prefix and username. For example, service for user vagrant, well be named as eye_vagrant.
service for user root as eye_root, etc.

If you need to reload service for user vagrant, you can use

some_resource do
  notifies :reload, 'service[eye_vagrant]'

if you want to configure service fore some user, you can setup it

default['eye']['services'] = {
  ubuntu: {
    'logger' => '/var/log/eye/ubuntu.log'
    'mail' => {
      'host' => '',
      'port' => 25,
      'domain' => ''
    contacts: {
      'errors' => {
        'type' => 'mail',
        'contact' => ''
      'dev' => {
        'type' => 'mail',
        'contact' => '',
        'opts' => {}


You can use any valid eye options. For example:

default['eye']['applications']['my_app'] = {
  owner: 'vagrant', # required
  group: 'vagrant',
  checks: {
    cpu: {
      :every => 30,
      :below => 80,
      :times => 3
      :every => 30,
      :below => 73400320,
      :times => [ 3, 5 ]
  process: {
    unicorn: {
      daemonize:  true,
      pid_file: '',
      stdall: 'puma.log',
      start_command: 'bundle exec puma --port 33280 --environment production',
      stop_signals: ['TERM', 5, 'KILL']
    resque: {
      pid_file: 'tmp/pids/',
      start_command: 'bin/resque work --queue=high',
      checks: {
        cpu: {
          :every => 30,
          :below => 80,
          :times => 3

This cookbook will install the eye service for user 'vagrant' (/etc/init.d/eye_vagrant) and generate valid '.eye' configuration file



Cookbook provide chef_eye_application resource. This is a main resource for generate eye configuration.

chef_eye_application 'name_of_my_app' do
  owner 'ubuntu'
  group 'ubuntu'
  config do
    env 'RAILS_ENV' => 'production'
    working_dir '/var/www/my_app'
    trigger :flapping, :times => 10, :within => 1.minute
    process :puma do
      daemonize true
      pid_file ""
      stdall "puma.log"
      start_command "bundle exec puma --port 33280 --environment production"
      stop_signals [:TERM, 5.seconds, :KILL]
      restart_command "kill -USR2 {PID}"
      restart_grace 10.seconds
      check :cpu, :every => 30, :below => 80, :times => 3
      check :memory, :every => 30, :below => 70.megabytes, :times => [3,5]
  action :configure # or :delete
  notifies :reload, 'service[eye_ubuntu]' # you need notify service for reload

or as hash

chef_eye_application 'name_of_my_app' do
  owner 'ubuntu'
  group 'ubuntu'
      env: {
        RAILS_ENV: 'production'
      working_dir: '/var/www/my_app',
      triggers: {
        flapping: {
          :times => 10,
          :within => 1.minute
      processes: {
        puma: {
          daemonize: true,
          pid_file: "",
          stdall: "puma.log",
          start_command: "bundle exec puma --port 33280 --environment production",
          stop_signals: [:TERM, 5.seconds, :KILL],
          restart_command: "kill -USR2 {PID}",
          restart_grace: 10.seconds,
          checks: {
            cpu: {:every => 30, :below => 80, :times => 3},
            memory: {:every => 30, :below => 70.megabytes, :times => [3, 5]}
  action :configure # or :delete
  notifies :reload, 'service[eye_ubuntu]' # you need notify service for reload

Important! If you use LWRP, you need to add owner of application to node['eye']['services'] attribute manually.


Include chef_eye in your node's run_list:

  "run_list": [

License and Authors

Author:: Nikolay Murga (

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.


Initial release of chef-eye

Foodcritic Metric

0.1.0 failed this metric

FC031: Cookbook without metadata file: /tmp/cook/26a02bdf8206d1bf22c45023/chef_eye/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/26a02bdf8206d1bf22c45023/chef_eye/metadata.rb:1