Coder Social home page Coder Social logo

supervisor's Introduction

supervisor Cookbook

Installs (Python) supervisor and provides resources to configure services

Requirements

Platforms

Supports Debian and RHEL based systems. Tested on Ubuntu 10.04, CentOS 5.10, CentOS 6.5.

Cookbooks

  • python

Attributes

  • node['supervisor']['inet_port'] - The port on which you want to serve the internal web-based admin dashboard, e.g. 'localhost:9001'
  • node['supervisor']['inet_username'] - The username for authentication to this HTTP server
  • node['supervisor']['inet_password'] - The password for authentication to this HTTP server (supports both cleartext and SHA-1 hashed passwords prefixed by {SHA})
  • node['supervisor']['dir'] - location of supervisor config files
  • node['supervisor']['log_dir'] - location of supervisor logs
  • node['supervisor']['logfile_maxbytes'] - max bytes for the supervisord logfile before it is rotated rotated, default '50MB'
  • node['supervisor']['logfile_backups'] - the number of backups of that logfile to keep, default 10
  • node['supervisor']['loglevel'] - the minimum severity for those log messages, default 'info'
  • node['supervisor']['minfds'] - The minimum number of file descriptors that must be available before supervisord will start successfully.
  • node['supervisor']['minprocs'] - The minimum number of process descriptors that must be available before supervisord will start successfully.
  • node['supervisor']['version'] - Sets the version of supervisor to install, must be 3.0+ to use minprocs and minfds.

Resources/Providers

supervisor_service

Actions

The default action is the array [:enable, :start]. Actions use the supervisorctl program.

  • :enable - enables the service at boot time
  • :disable - disables the service at boot time
  • :start - starts the service
  • :stop - stops the service
  • :restart - restarts the service
  • :reload - reloads the service

Attribute Parameters

  • :service_name - (Name Attribute), a string, name of the service

The following attributes are used in the program.conf.erb as the values for the corresponding configuration option. See the supervisor documentation for more information about each setting, including applicable defaults.

  • :command - string
  • :process_name - string
  • :numprocs - integer
  • :numprocs_start - integer
  • :priority - integer
  • :autostart - true or false
  • :autorestart - string, symbol, true or false
  • :startsecs - integer
  • :startretries - integer
  • :exitcodes - array
  • :stopsignal - string or symbol
  • :stopwaitsecs - integer
  • :user - string or nil
  • :redirect_stderr - true or false
  • :stdout_logfile - string
  • :stdout_logfile_maxbytes - string
  • :stdout_logfile_backups - string
  • :stdout_capture_maxbytes - string
  • :stdout_events_enabled - true or false
  • :stderr_logfile - string
  • :stderr_logfile_maxbytes - string
  • :stderr_logfile_backups - integer
  • :stderr_capture_maxbytes - string
  • :stderr_events_enabled - true or false
  • :environment- hash
  • :directory- string or nil
  • :umask - string or nil
  • :serverurl - string

Examples

supervisor_service "celery" do
  action :enable
  autostart false
  user "nobody"
end

Recipes

default

Includes the python recipe, installs the supervisor PIP package and sets up supervisor.

License & Authors

Copyright:: 2011-2012, Opscode, Inc <[email protected]>
Copyright:: 2011, Formspring.me

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

supervisor's People

Contributors

aarono avatar alambike avatar cjerdonek avatar coderanger avatar gilles avatar lehrblogger avatar makmanalp avatar mal avatar ranjib avatar sethvargo avatar stevendanna avatar streeter avatar tejaycar avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

nagyist

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.