deprec 2.1.1 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,5 +1,15 @@
1
1
  # deprec changelog
2
2
 
3
+ = 2.1.4 (Sep 16, 2009)
4
+
5
+ * rubygems-1.3.5
6
+ * git-1.6.4.3
7
+
8
+ = 2.1.2 (Aug 26, 2009)
9
+
10
+ * Better support for Capistrano multistage
11
+ Look for database.yml in config/#{stage}/database.yml
12
+
3
13
  = 2.1.1 (Aug 25, 2009)
4
14
 
5
15
  * Added haproxy
data/bin/depify CHANGED
@@ -58,7 +58,7 @@ files = {
58
58
  # Update these if you're not running everything on one host.
59
59
  role :app, domain
60
60
  role :web, domain
61
- role :db, domain, :primary => true
61
+ role :db, domain, :primary => true, :no_release => true
62
62
 
63
63
  # If you aren't deploying to /opt/apps/\#{application} on the target
64
64
  # servers (which is the deprec default), you can specify the actual location
@@ -330,7 +330,8 @@ module Deprec2
330
330
  end
331
331
 
332
332
  def read_database_yml
333
- db_config = YAML.load_file('config/database.yml')
333
+ stage = exists?(:stage) ? fetch(:stage).to_s : ''
334
+ db_config = YAML.load_file(File.join('config', stage, 'database.yml'))
334
335
  set :db_user, db_config[rails_env]["username"]
335
336
  set :db_password, db_config[rails_env]["password"]
336
337
  set :db_name, db_config[rails_env]["database"]
@@ -201,7 +201,7 @@ Capistrano::Configuration.instance(:must_exist).load do
201
201
 
202
202
  desc "Restart Application"
203
203
  task :restart, :roles => :app do
204
- run "touch #{current_path}/tmp/restart.txt"
204
+ run "#{sudo} touch #{current_path}/tmp/restart.txt"
205
205
  end
206
206
 
207
207
  desc "Restart Apache"
@@ -18,14 +18,16 @@ Capistrano::Configuration.instance(:must_exist).load do
18
18
  }
19
19
 
20
20
  desc "Install collectd"
21
- task :install do
21
+ task :install, :roles => :all_hosts do
22
22
  install_deps
23
23
  deprec2.download_src(SRC_PACKAGES[:collectd], src_dir)
24
24
  deprec2.install_from_src(SRC_PACKAGES[:collectd], src_dir)
25
+ config
26
+ activate
25
27
  end
26
28
 
27
29
  # install dependencies for sysklogd
28
- task :install_deps do
30
+ task :install_deps, :roles => :all_hosts do
29
31
  apt.install( {:base => %w(liboping-dev libcurl4-openssl-dev libperl-dev libdbi0-dev libesmtp-dev libganglia1-dev libmemcache-dev libnet1-dev libnotify-dev libopenipmi-dev liboping-dev libpcap-dev libperl-dev librrd2-dev libsensors-dev libstatgrab-dev libvirt-dev
30
32
  rrdtool librrd2-dev librrds-perl libconfig-general-perl libhtml-parser-perl libregexp-common-perl)}, :stable )
31
33
  end
@@ -37,6 +39,11 @@ rrdtool librrd2-dev librrds-perl libconfig-general-perl libhtml-parser-perl lib
37
39
  :mode => 0640,
38
40
  :owner => 'root:root'},
39
41
 
42
+ {:template => "collectd-init.d",
43
+ :path => '/etc/init.d/collectd',
44
+ :mode => 0755,
45
+ :owner => 'root:root'}
46
+
40
47
  ]
41
48
 
42
49
  desc "Generate Collectd configs"
@@ -49,23 +56,35 @@ rrdtool librrd2-dev librrds-perl libconfig-general-perl libhtml-parser-perl lib
49
56
  desc "Push Chef config files (system & project level) to server"
50
57
  task :config, :roles => :all_hosts, :except => {:collectd_master => true} do
51
58
  deprec2.push_configs(:collectd, SYSTEM_CONFIG_FILES[:collectd])
52
- restart
59
+ reload
53
60
  end
54
61
 
55
62
  desc "Start collectd"
56
63
  task :start, :roles => :all_hosts, :except => { :collectd_master => true } do
57
- run "#{sudo} collectd"
64
+ run "#{sudo} /etc/init.d/collectd start"
58
65
  end
59
66
 
60
67
  desc "Stop collectd"
61
68
  task :stop, :roles => :all_hosts, :except => { :collectd_master => true } do
62
- run "#{sudo} killall collectd; exit 0;"
69
+ run "#{sudo} /etc/init.d/collectd stop"
63
70
  end
64
71
 
65
72
  desc "Restart collectd"
66
73
  task :restart, :roles => :all_hosts, :except => { :collectd_master => true } do
67
- stop
68
- start
74
+ run "#{sudo} /etc/init.d/collectd restart"
75
+ end
76
+
77
+ desc "Reload collectd"
78
+ task :reload, :roles => :all_hosts, :except => { :collectd_master => true } do
79
+ run "#{sudo} /etc/init.d/collectd force-reload"
80
+ end
81
+
82
+ task :activate, :roles => :all_hosts, :except => { :collectd_master => true } do
83
+ run "#{sudo} update-rc.d collectd defaults"
84
+ end
85
+
86
+ task :deactivate, :roles => :all_hosts, :except => { :collectd_master => true }do
87
+ run "#{sudo} update-rc.d -f collectd remove"
69
88
  end
70
89
 
71
90
  end
@@ -10,8 +10,8 @@ Capistrano::Configuration.instance(:must_exist).load do
10
10
  set :git_root, '/var/git'
11
11
 
12
12
  SRC_PACKAGES[:git] = {
13
- :url => "http://kernel.org/pub/software/scm/git/git-1.6.3.2.tar.gz",
14
- :md5sum => "c9819ba1ad3edbcf3b5de3116048d59f git-1.6.3.2.tar.gz"
13
+ :url => "http://kernel.org/pub/software/scm/git/git-1.6.4.3.tar.gz",
14
+ :md5sum => "95381cd27ad762c645c8e07f922879ce git-1.6.4.3.tar.gz"
15
15
  }
16
16
 
17
17
  desc "Install git"
@@ -1,48 +1,55 @@
1
- # Copyright 2006-2008 by Mike Bailey. All rights reserved.
2
- Capistrano::Configuration.instance(:must_exist).load do
3
- namespace :deprec do
4
- namespace :gitosis do
5
-
6
- # ref: http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way
7
-
8
- set :gitosis_user, 'git'
9
-
10
- desc "Install git"
11
- task :install do
12
- deprec2.create_src_dir
13
- install_deps
14
- run <<-SUDO
15
- cd #{src_dir} && test -d gitosis || #{sudo} git clone git://eagain.net/gitosis.git; exit 0
16
- SUDO
17
- run "cd #{src_dir}/gitosis && #{sudo} python setup.py install"
18
- create_user
19
- init
20
- end
21
-
22
- # install dependencies for nginx
23
- task :install_deps do
24
- apt.install( {:base => %w(python-setuptools)}, :stable )
25
- end
26
-
27
- # Create user for gitosis to run as
28
- # This will also be the account you use for ssh access to git
29
- task :create_user do
30
- run "grep '^#{gitosis_user}:' /etc/passwd || #{sudo} adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/#{gitosis_user} #{gitosis_user}"
31
- sudo "passwd --unlock #{gitosis_user}"
32
- end
33
-
34
- task :init do
35
- sudo "sudo -H -u #{git_user} gitosis-init < ~/.ssh/authorized_keys"
36
- sudo "chmod 0755 /home/git/repositories/gitosis-admin.git/hooks/post-update"
37
- puts
38
- puts "Now check out the gitosis-admin repos, edit configs and push changes back"
39
- puts "Your changes with update gitosis as soon as they are checked in."
40
- puts
41
- puts "git clone git@YOUR_SERVER_HOSTNAME:gitosis-admin.git"
42
- puts "cd gitosis-admin"
43
- puts ""
44
- end
45
-
46
- end
47
- end
48
- end
1
+ # Not working
2
+ #
3
+ # # Copyright 2006-2008 by Mike Bailey. All rights reserved.
4
+ # Capistrano::Configuration.instance(:must_exist).load do
5
+ # namespace :deprec do
6
+ # namespace :gitosis do
7
+ #
8
+ # # ref: http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way
9
+ #
10
+ # set :gitosis_user, 'git'
11
+ #
12
+ # SRC_PACKAGES[:gitosis] = {
13
+ # :url => "git://eagain.net/gitosis.git",
14
+ # :download_method => :git,
15
+ # :configure => '',
16
+ # :make => '',
17
+ # :install => '#{sudo} python setup.py install'
18
+ # }
19
+ #
20
+ # desc "Install gitosis"
21
+ # task :install do
22
+ # install_deps
23
+ # deprec2.download_src(SRC_PACKAGES[:gitosis], src_dir)
24
+ # deprec2.install_from_src(SRC_PACKAGES[:gitosis], src_dir)
25
+ # create_user
26
+ # init
27
+ # end
28
+ #
29
+ # # install dependencies for nginx
30
+ # task :install_deps do
31
+ # apt.install( {:base => %w(python-setuptools)}, :stable )
32
+ # end
33
+ #
34
+ # # Create user for gitosis to run as
35
+ # # This will also be the account you use for ssh access to git
36
+ # task :create_user do
37
+ # run "grep '^#{gitosis_user}:' /etc/passwd || #{sudo} adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/#{gitosis_user} #{gitosis_user}"
38
+ # sudo "passwd --unlock #{gitosis_user}"
39
+ # end
40
+ #
41
+ # task :init do
42
+ # sudo "sudo -H -u #{git_user} gitosis-init < ~/.ssh/authorized_keys"
43
+ # sudo "chmod 0755 /home/git/repositories/gitosis-admin.git/hooks/post-update"
44
+ # puts
45
+ # puts "Now check out the gitosis-admin repo, edit configs and push changes back"
46
+ # puts "Your changes with update gitosis as soon as they are checked in."
47
+ # puts
48
+ # puts "git clone git@YOUR_SERVER_HOSTNAME:gitosis-admin.git"
49
+ # puts "cd gitosis-admin"
50
+ # puts ""
51
+ # end
52
+ #
53
+ # end
54
+ # end
55
+ # end
@@ -9,13 +9,15 @@ Capistrano::Configuration.instance(:must_exist).load do
9
9
  }
10
10
 
11
11
  desc "Install haproxy"
12
- task :install do
12
+ task :install, :roles => :haproxy do
13
13
  install_deps
14
14
  deprec2.download_src(SRC_PACKAGES[:haproxy], src_dir)
15
15
  deprec2.install_from_src(SRC_PACKAGES[:haproxy], src_dir)
16
+ config
17
+ activate
16
18
  end
17
19
 
18
- task :install_deps do
20
+ task :install_deps, :roles => :haproxy do
19
21
  apt.install( {:base => %w(build-essential)}, :stable )
20
22
  end
21
23
 
@@ -62,7 +64,8 @@ Capistrano::Configuration.instance(:must_exist).load do
62
64
  desc 'Deploy configuration filess for haproxy'
63
65
  task :config, :roles => :haproxy do
64
66
  config_system
65
- config_project
67
+ # config_project
68
+ reload
66
69
  end
67
70
 
68
71
  task :config_system, :roles => :haproxy do
@@ -100,4 +103,4 @@ Capistrano::Configuration.instance(:must_exist).load do
100
103
 
101
104
  end
102
105
  end
103
- end
106
+ end
@@ -35,7 +35,7 @@ Capistrano::Configuration.instance(:must_exist).load do
35
35
 
36
36
  # Install dependencies for Integrity
37
37
  task :install_deps, :roles => :ci do
38
- apt.install( {:base => %w(sqlite3 libsqlite3-dev git libxslt1-dev libxml2-dev)}, :stable )
38
+ apt.install( {:base => %w(postfix sqlite3 libsqlite3-dev git libxslt1-dev libxml2-dev)}, :stable )
39
39
  gem2.install 'sqlite3-ruby'
40
40
  gem2.install 'do_sqlite3'
41
41
  # Gems your tests might need
@@ -142,14 +142,13 @@ Capistrano::Configuration.instance(:must_exist).load do
142
142
  # XXX This should be restricted a bit to limit what app can write to. - Mike
143
143
  desc "set group ownership and permissions on dirs app server needs to write to"
144
144
  task :make_writable_by_app, :roles => :app do
145
- tmp_dir = "#{deploy_to}/current/tmp"
146
- shared_dir = "#{deploy_to}/shared"
147
- # XXX Factor this out
148
- files = ["#{mongrel_log_dir}/mongrel.log", "#{mongrel_log_dir}/#{rails_env}.log"]
149
-
150
- sudo "chgrp -R #{app_group} #{tmp_dir} #{shared_dir}"
151
- sudo "chmod -R g+w #{tmp_dir} #{shared_dir}"
145
+ dirs = "#{shared_path} #{current_path}/tmp #{current_path}/public"
146
+ sudo "chgrp -R #{app_group} #{dirs}"
147
+ sudo "chmod -R g+w #{dirs}"
148
+
152
149
  # set owner and group of log files
150
+ # XXX Factor out mongrel
151
+ files = ["#{mongrel_log_dir}/mongrel.log", "#{mongrel_log_dir}/#{rails_env}.log"]
153
152
  files.each { |file|
154
153
  sudo "touch #{file}"
155
154
  sudo "chown #{app_user} #{file}"
@@ -286,13 +285,15 @@ Capistrano::Configuration.instance(:must_exist).load do
286
285
 
287
286
  desc "Link in the production database.yml"
288
287
  task :symlink_database_yml, :roles => :app do
289
- run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
288
+ run "#{sudo} ln -nfs #{shared_path}/config/database.yml #{current_path}/config/database.yml"
290
289
  end
291
290
 
292
291
  desc "Copy database.yml to shared/config/database.yml. Useful if not kept in scm"
293
292
  task :push_database_yml, :roles => :app do
294
- if File.exists?('config/database.yml')
295
- put(File.read('config/database.yml'), "#{shared_path}/config/database.yml")
293
+ stage = exists?(:stage) ? fetch(:stage).to_s : ''
294
+ full_local_path = File.join('config', stage, 'database.yml')
295
+ if File.exists?(full_local_path)
296
+ std.su_put(File.read(full_local_path), "#{shared_path}/config/database.yml", '/tmp/')
296
297
  end
297
298
  end
298
299
 
@@ -30,10 +30,10 @@ Capistrano::Configuration.instance(:must_exist).load do
30
30
  namespace :rubygems do
31
31
 
32
32
  SRC_PACKAGES[:rubygems] = {
33
- :md5sum => "b17b398503253bf36a101c58f02a226f rubygems-1.3.4.tgz",
34
- :url => "http://rubyforge.org/frs/download.php/57643/rubygems-1.3.4.tgz",
35
- :configure => "",
36
- :make => "",
33
+ :md5sum => "6e317335898e73beab15623cdd5f8cff rubygems-1.3.5.tgz",
34
+ :url => "http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz",
35
+ :configure => "",
36
+ :make => "",
37
37
  :install => 'ruby setup.rb;'
38
38
  }
39
39
 
@@ -41,7 +41,7 @@ Capistrano::Configuration.instance(:must_exist).load do
41
41
 
42
42
  desc "Install some useful utils"
43
43
  task :other do
44
- apps = %w(vim-full tree psmisc screen)
44
+ apps = %w(lsof vim-full tree psmisc screen)
45
45
  apt.install( {:base => apps}, :stable )
46
46
  end
47
47
 
@@ -29,8 +29,18 @@ Capistrano::Configuration.instance(:must_exist).load do
29
29
  { :template => 'namevirtualhosts.conf',
30
30
  :path => '/etc/apache2/conf.d/namevirtualhosts.conf',
31
31
  :mode => 0644,
32
- :owner => 'root:root'}
32
+ :owner => 'root:root'},
33
+
34
+ # { :template => 'ports.conf.erb',
35
+ # :path => '/etc/apache2/ports.conf',
36
+ # :mode => 0644,
37
+ # :owner => 'root:root'},
33
38
 
39
+ { :template => 'status.conf.erb',
40
+ :path => '/etc/apache2/mods-available/status.conf',
41
+ :mode => 0644,
42
+ :owner => 'root:root'}
43
+
34
44
  ]
35
45
 
36
46
  PROJECT_CONFIG_FILES[:apache] = [
@@ -62,6 +72,7 @@ Capistrano::Configuration.instance(:must_exist).load do
62
72
  desc "Push apache config files to server"
63
73
  task :config, :roles => :web do
64
74
  config_system
75
+ reload
65
76
  end
66
77
 
67
78
  desc "Generate initial configs and copy direct to server."
@@ -205,6 +205,13 @@ Capistrano::Configuration.instance(:must_exist).load do
205
205
  end
206
206
  end
207
207
 
208
+ # Add support for intrepid and jaunty guests to hardy host
209
+ #
210
+ # root@x1:/usr/share/debootstrap/scripts# ln -s gutsy jaunty
211
+ # root@x1:/usr/share/debootstrap/scripts# ln -s gutsy intrepid
212
+ #
213
+ # root@x1:/usr/lib/xen-tools# ln -s edgy.d intrepid.d
214
+ # root@x1:/usr/lib/xen-tools# ln -s edgy.d jaunty.d
208
215
 
209
216
  # Stop the 'incrementing ethX problem'
210
217
  #
@@ -20,7 +20,7 @@ require "#{File.dirname(__FILE__)}/recipes/web/apache"
20
20
  require "#{File.dirname(__FILE__)}/recipes/web/nginx"
21
21
 
22
22
  require "#{File.dirname(__FILE__)}/recipes/git"
23
- require "#{File.dirname(__FILE__)}/recipes/gitosis"
23
+ # require "#{File.dirname(__FILE__)}/recipes/gitosis"
24
24
  require "#{File.dirname(__FILE__)}/recipes/svn"
25
25
  require "#{File.dirname(__FILE__)}/recipes/integrity"
26
26
 
@@ -0,0 +1,5 @@
1
+ Listen 80
2
+
3
+ <IfModule mod_ssl.c>
4
+ Listen 443
5
+ </IfModule>
@@ -0,0 +1,17 @@
1
+ <IfModule mod_status.c>
2
+ #
3
+ # Allow server status reports generated by mod_status,
4
+ # with the URL of http://servername/server-status
5
+ # Uncomment and change the ".example.com" to allow
6
+ # access from other hosts.
7
+ #
8
+ ExtendedStatus On
9
+ <Location /server-status>
10
+ SetHandler server-status
11
+ Order deny,allow
12
+ Deny from all
13
+ Allow from localhost ip6-localhost
14
+ # Allow from .example.com
15
+ </Location>
16
+
17
+ </IfModule>
@@ -0,0 +1,153 @@
1
+ #!/bin/bash
2
+ #
3
+ # collectd - start and stop the statistics collection daemon
4
+ # http://collectd.org/
5
+ #
6
+ # Copyright (C) 2005-2006 Florian Forster <octo@verplant.org>
7
+ # Copyright (C) 2006-2008 Sebastian Harl <sh@tokkee.org>
8
+ #
9
+
10
+ ### BEGIN INIT INFO
11
+ # Provides: collectd
12
+ # Required-Start: $local_fs $remote_fs
13
+ # Required-Stop: $local_fs $remote_fs
14
+ # Should-Start: $network $named $syslog $time
15
+ # Should-Stop: $network $named $syslog
16
+ # Default-Start: 2 3 4 5
17
+ # Default-Stop: 0 1 6
18
+ # Short-Description: start the statistics collection daemon
19
+ ### END INIT INFO
20
+
21
+ set -e
22
+
23
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
24
+
25
+ DISABLE=0
26
+
27
+ DESC="statistics collection and monitoring daemon"
28
+ NAME=collectd
29
+ DAEMON=/usr/local/sbin/collectd
30
+
31
+ CONFIGFILE=/usr/local/etc/collectd.conf
32
+ PIDFILE=/usr/local/var/run/collectd.pid
33
+
34
+ USE_COLLECTDMON=1
35
+ COLLECTDMON_DAEMON=/usr/local/sbin/collectdmon
36
+ COLLECTDMON_PIDFILE=/usr/local/var/run/collectdmon.pid
37
+
38
+ MAXWAIT=30
39
+
40
+ # Gracefully exit if the package has been removed.
41
+ test -x $DAEMON || exit 0
42
+
43
+ if [ -r /etc/default/$NAME ]; then
44
+ . /etc/default/$NAME
45
+ fi
46
+
47
+ if test "$DISABLE" != 0; then
48
+ echo "$NAME has been disabled - see /etc/default/$NAME."
49
+ exit 0
50
+ fi
51
+
52
+ if test "$ENABLE_COREFILES" == 1; then
53
+ ulimit -c unlimited
54
+ fi
55
+
56
+ if test "$USE_COLLECTDMON" == 1; then
57
+ _PIDFILE="$COLLECTDMON_PIDFILE"
58
+ else
59
+ _PIDFILE="$PIDFILE"
60
+ fi
61
+
62
+ d_start() {
63
+ if ! $DAEMON -t -C "$CONFIGFILE" > /dev/null 2>&1; then
64
+ $DAEMON -t -C "$CONFIGFILE"
65
+ exit 1
66
+ fi
67
+
68
+ if test "$USE_COLLECTDMON" == 1; then
69
+ start-stop-daemon --start --quiet --pidfile "$_PIDFILE" \
70
+ --exec $COLLECTDMON_DAEMON -- -P "$_PIDFILE" -- -C "$CONFIGFILE"
71
+ else
72
+ start-stop-daemon --start --quiet --pidfile "$_PIDFILE" \
73
+ --exec $DAEMON -- -C "$CONFIGFILE" -P "$_PIDFILE"
74
+ fi
75
+ }
76
+
77
+ still_running_warning="
78
+ WARNING: $NAME might still be running.
79
+ In large setups it might take some time to write all pending data to
80
+ the disk. You can adjust the waiting time in /etc/default/collectd."
81
+
82
+ d_stop() {
83
+ PID=$( cat "$_PIDFILE" 2> /dev/null ) || true
84
+
85
+ start-stop-daemon --stop --quiet --oknodo --pidfile "$_PIDFILE"
86
+
87
+ sleep 1
88
+ if test -n "$PID" && kill -0 $PID 2> /dev/null; then
89
+ i=0
90
+ while kill -0 $PID 2> /dev/null; do
91
+ i=$(( $i + 2 ))
92
+ echo -n " ."
93
+
94
+ if test $i -gt $MAXWAIT; then
95
+ echo "$still_running_warning" >&2
96
+ return 1
97
+ fi
98
+
99
+ sleep 2
100
+ done
101
+ return 0
102
+ fi
103
+ }
104
+
105
+ d_status() {
106
+ PID=$( cat "$_PIDFILE" 2> /dev/null ) || true
107
+
108
+ if test -n "$PID" && kill -0 $PID 2> /dev/null; then
109
+ echo "collectd ($PID) is running."
110
+ exit 0
111
+ else
112
+ PID=$( pidof collectd ) || true
113
+
114
+ if test -n "$PID"; then
115
+ echo "collectd ($PID) is running."
116
+ exit 0
117
+ else
118
+ echo "collectd is stopped."
119
+ fi
120
+ fi
121
+ }
122
+
123
+ case "$1" in
124
+ start)
125
+ echo -n "Starting $DESC: $NAME"
126
+ d_start
127
+ echo "."
128
+ ;;
129
+ stop)
130
+ echo -n "Stopping $DESC: $NAME"
131
+ d_stop
132
+ echo "."
133
+ ;;
134
+ status)
135
+ d_status
136
+ ;;
137
+ restart|force-reload)
138
+ echo -n "Restarting $DESC: $NAME"
139
+ d_stop
140
+ sleep 1
141
+ d_start
142
+ echo "."
143
+ ;;
144
+ *)
145
+ echo "Usage: $0 {start|stop|restart|force-reload}" >&2
146
+ exit 1
147
+ ;;
148
+ esac
149
+
150
+ exit 0
151
+
152
+ # vim: syntax=sh noexpandtab sw=4 ts=4 :
153
+
@@ -48,8 +48,9 @@ haproxy_stop()
48
48
 
49
49
  haproxy_reload()
50
50
  {
51
- $HAPROXY -f "$CONFIG" -p $PIDFILE -D $EXTRAOPTS -st $(<$PIDFILE) \
52
- || return 2
51
+
52
+ # haproxy -f /etc/haproxy.conf -sf `cat /var/run/haproxy.pid`
53
+ $HAPROXY -f "$CONFIG" -sf `cat $PIDFILE` || return 2
53
54
  return 0
54
55
  }
55
56
 
@@ -1,8 +1,8 @@
1
1
  # /etc/haproxy.cfg
2
2
  #
3
- # Reload gracelly with:
3
+ # Reload gracefully with:
4
4
  #
5
- # haproxy -f /etc/haproxy.conf -sf `cat /var/run/haproxy.pid`
5
+ # haproxy -f /etc/haproxy.cfg -sf `cat /var/run/haproxy.pid`
6
6
  #
7
7
  global
8
8
  log /var/log/haproxy.log daemon info
@@ -65,14 +65,25 @@ define contactgroup{
65
65
 
66
66
  # Generic contact definition template - This is NOT a real contact, just a template!
67
67
 
68
- define contact{
69
- name generic-contact ; The name of this contact template
70
- service_notification_period 24x7 ; service notifications can be sent anytime
71
- host_notification_period 24x7 ; host notifications can be sent anytime
72
- service_notification_options w,u,c,r,f,s ; send notifications for all service states, flapping events, and scheduled downtime events
73
- host_notification_options d,u,r,f,s ; send notifications for all host states, flapping events, and scheduled downtime events
74
- service_notification_commands notify-service-by-email ; send service notifications via email
75
- host_notification_commands notify-host-by-email ; send host notifications via email
76
- register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
77
- }
68
+ define contact{ # example contact
69
+ name contact_template
70
+ # contact_name name
71
+ # alias longer_name
72
+ # contactgroups contactgroup_names
73
+ host_notifications_enabled 0
74
+ service_notifications_enabled 0
75
+ host_notification_period 24x7
76
+ service_notification_period 24x7
77
+ host_notification_options d,u,r,f,s
78
+ service_notification_options w,u,c,r,f,s
79
+ host_notification_commands notify-host-by-email
80
+ service_notification_commands notify-service-by-email
81
+ # email user@address.com
82
+ # pager pager_number or pager_email_gateway
83
+ # addressx additional_contact_address
84
+ # can_submit_commands [0/1]
85
+ # retain_status_information [0/1]
86
+ # retain_nonstatus_information [0/1]
87
+ register 0
88
+ }
78
89
 
@@ -79,19 +79,19 @@ define service{
79
79
  check_command check_dns
80
80
  }
81
81
 
82
- define service {
83
- use generic-service ; Name of service template to use
84
- hostgroup_name mail
85
- service_description postfix smtp
86
- check_command check_nrpe!check_postfix_satellite
87
- }
88
-
89
- define service{
90
- use generic-service
91
- hostgroup_name mysql_servers
92
- service_description Mysql
93
- check_command check_nrpe!check_mysql
94
- }
82
+ # define service {
83
+ # use generic-service ; Name of service template to use
84
+ # hostgroup_name mail
85
+ # service_description postfix smtp
86
+ # check_command check_nrpe!check_postfix_satellite
87
+ # }
88
+ #
89
+ # define service{
90
+ # use generic-service
91
+ # hostgroup_name mysql_servers
92
+ # service_description Mysql
93
+ # check_command check_nrpe!check_mysql
94
+ # }
95
95
 
96
96
  # Check requests per second to Apache (via collectd)
97
97
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deprec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Bailey
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-25 00:00:00 +10:00
12
+ date: 2009-09-16 00:00:00 +10:00
13
13
  default_executable: depify
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -98,10 +98,13 @@ files:
98
98
  - lib/deprec/templates/aoe/aoe-init
99
99
  - lib/deprec/templates/aoe/fence_aoemask
100
100
  - lib/deprec/templates/apache/namevirtualhosts.conf
101
+ - lib/deprec/templates/apache/ports.conf.erb
102
+ - lib/deprec/templates/apache/status.conf.erb
101
103
  - lib/deprec/templates/ar_sendmail/logrotate.conf.erb
102
104
  - lib/deprec/templates/ar_sendmail/monit.conf.erb
103
105
  - lib/deprec/templates/chef/chef.json.erb
104
106
  - lib/deprec/templates/chef/solo.rb
107
+ - lib/deprec/templates/collectd/collectd-init.d
105
108
  - lib/deprec/templates/collectd/collectd.conf.erb
106
109
  - lib/deprec/templates/ddclient/ddclient.conf.erb
107
110
  - lib/deprec/templates/ddclient/ddclient.erb
@@ -232,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
235
  requirements: []
233
236
 
234
237
  rubyforge_project: deprec
235
- rubygems_version: 1.3.3
238
+ rubygems_version: 1.3.5
236
239
  signing_key:
237
240
  specification_version: 3
238
241
  summary: deployment recipes for capistrano