/chef-user_runit

Cookbook for creating user-owned runit services

Primary LanguageRuby

chef-user_runit

Description

Installs one or more user-owned runit monitor services

Usage

Include recipe[user_runit] in your run_list and specify a runit service for a list of users. Example:

node['user_runit']['services'] = [
  { 'user' => 'deploy' },
  { 'user' => 'admin' }
]

In this example runsvdir-deploy and runsvdir-admin services will be created. These services will monitor /home/deploy/service and /home/admin/service directories respectively for user-owned services.

Additionally, a sv directory is also created for each service, giving users the ability to symlink their services to ~/service as they please.

Global Attributes

These attributes apply to all users in the services list.

service_dir

The name of the service directory created in the user's home.

Te default is "service"

sv_dir

The name of the sv directory created in the user's home.

Te default is "sv"

services

A list of services, one for each user. Represented as a hash:

node['user_runit']['services'] = [
  { 'user' => 'deploy' },
  { 'user' => 'admin' }
]

Currently the only option is user. More options may be added in the future to give more control over where service directories are created

The default is []

Development

License and Author

Author:: Jeff Siegel (jdsiegel@gmail.com)

Copyright 2012, Jeff Siegel

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.