adamhjk (owner)

Revisions

gist: 220182 Download_button fork
public
Public Clone URL: git://gist.github.com/220182.git
Embed All Files: show embed
default.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#
# Author:: Nathan Haneysmith <nathan@opscode.com>
# Cookbook Name:: opscode-account
# Recipe:: default
#
# Copyright 2009, Opscode, Inc.
#
 
include_recipe "opscode-base"
include_recipe "opscode-github"
include_recipe "opscode-chef::library"
include_recipe "opscode-audit::library"
 
cap_setup "opscode-account" do
  owner "root"
  group "sysadmin"
  appowner "opscode"
  path "/srv/opscode-account"
end
 
include_recipe "runit"
 
runit_service "opscode-account"
 
execute "echo account_shut_down_service" do
  notifies :stop, resources(:service => "opscode-account")
  not_if do File.exist?("/srv/opscode-account/current/bin/opscode-account") end
end
 
r = resources(:service => "opscode-account")
unicorn_config "/etc/unicorn/opscode-account.rb" do
  listen 6880 => { :backlog => 1024, :tcp_nodelay => true }
  worker_timeout 3600
  preload_app false
  worker_processes node.cpu.total.to_i * 4
  owner "opscode"
  group "opscode"
  mode "0644"
  notifies :restart, r
end