chrisrec 0.1.3 → 0.2.0
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/Manifest +9 -53
- data/README +14 -0
- data/Rakefile +1 -1
- data/chrisrec.gemspec +11 -12
- data/lib/chrisrec.rb +6 -11
- data/{lib → retired/lib}/backgroundrb/backgroundrb.rb +0 -0
- data/{lib → retired/lib}/gitosis/gitosis.rb +0 -0
- data/{lib → retired/lib}/memcached/memcached.rb +0 -0
- data/{lib → retired/lib}/starling/starling.rb +0 -0
- data/{lib → retired/lib}/workling/workling.rb +0 -0
- data/{pkg/chrisrec-0.1.2 → retired}/template/starling/monit.conf.erb +0 -0
- data/{pkg/chrisrec-0.1.2 → retired}/template/starling/starling-init-script.erb +0 -0
- data/{pkg/chrisrec-0.1.2 → retired}/template/workling/monit.conf.erb +0 -0
- data/{pkg/chrisrec-0.1.2 → retired}/template/workling/workling-init-script.erb +0 -0
- data/template/static/httpd-vhost-static.conf.erb +2 -2
- metadata +30 -100
- data/pkg/chrisrec-0.1.2/Manifest +0 -88
- data/pkg/chrisrec-0.1.2/README +0 -1
- data/pkg/chrisrec-0.1.2/Rakefile +0 -21
- data/pkg/chrisrec-0.1.2/chrisrec.gemspec +0 -30
- data/pkg/chrisrec-0.1.2/lib/backgroundrb/backgroundrb.rb +0 -22
- data/pkg/chrisrec-0.1.2/lib/chrisrec.rb +0 -14
- data/pkg/chrisrec-0.1.2/lib/console/console.rb +0 -19
- data/pkg/chrisrec-0.1.2/lib/daemon/daemon.rb +0 -134
- data/pkg/chrisrec-0.1.2/lib/gitosis/gitosis.rb +0 -131
- data/pkg/chrisrec-0.1.2/lib/jekyll/jekyll.rb +0 -87
- data/pkg/chrisrec-0.1.2/lib/memcached/memcached.rb +0 -140
- data/pkg/chrisrec-0.1.2/lib/munin/munin.rb +0 -135
- data/pkg/chrisrec-0.1.2/lib/mysql/mysql.rake +0 -95
- data/pkg/chrisrec-0.1.2/lib/mysql/mysql.rb +0 -51
- data/pkg/chrisrec-0.1.2/lib/rake/rake.rb +0 -19
- data/pkg/chrisrec-0.1.2/lib/rakecron/rakecron.rb +0 -35
- data/pkg/chrisrec-0.1.2/lib/starling/starling.rb +0 -124
- data/pkg/chrisrec-0.1.2/lib/static/static.rb +0 -80
- data/pkg/chrisrec-0.1.2/lib/tomcat/tomcat.rb +0 -202
- data/pkg/chrisrec-0.1.2/lib/workling/workling.rb +0 -72
- data/pkg/chrisrec-0.1.2/template/daemon/daemon-init-script.erb +0 -59
- data/pkg/chrisrec-0.1.2/template/daemon/monit.conf.erb +0 -4
- data/pkg/chrisrec-0.1.2/template/jekyll/httpd-vhost-jekyll.conf.erb +0 -16
- data/pkg/chrisrec-0.1.2/template/memcached/memcached-conf.erb +0 -1
- data/pkg/chrisrec-0.1.2/template/memcached/memcached.erb +0 -59
- data/pkg/chrisrec-0.1.2/template/memcached/monit.conf.erb +0 -8
- data/pkg/chrisrec-0.1.2/template/memcached/start-memcached.erb +0 -118
- data/pkg/chrisrec-0.1.2/template/munin/httpd-vhost-munin.conf.erb +0 -20
- data/pkg/chrisrec-0.1.2/template/munin/munin.conf.erb +0 -70
- data/pkg/chrisrec-0.1.2/template/munin/munin_nginx_vhost.conf.erb +0 -24
- data/pkg/chrisrec-0.1.2/template/rakecron/rakecron.erb +0 -12
- data/pkg/chrisrec-0.1.2/template/static/httpd-vhost-static.conf.erb +0 -16
- data/pkg/chrisrec-0.1.2/template/tomcat/conf/server.xml.erb +0 -33
- data/pkg/chrisrec-0.1.2/template/tomcat/conf/web.xml +0 -1194
- data/pkg/chrisrec-0.1.2/template/tomcat/logs/empty.txt +0 -1
- data/pkg/chrisrec-0.1.2/template/tomcat/monit.conf.erb +0 -8
- data/pkg/chrisrec-0.1.2/template/tomcat/temp/empty.txt +0 -1
- data/pkg/chrisrec-0.1.2/template/tomcat/tomcat.erb +0 -28
- data/pkg/chrisrec-0.1.2/template/tomcat/webapps/empty.txt +0 -1
- data/pkg/chrisrec-0.1.2/template/tomcat/work/empty.txt +0 -1
- data/template/starling/monit.conf.erb +0 -14
- data/template/starling/starling-init-script.erb +0 -69
- data/template/workling/monit.conf.erb +0 -4
- data/template/workling/workling-init-script.erb +0 -56
|
@@ -1 +0,0 @@
|
|
|
1
|
-
placeholder
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
check host tomcat_<%= tomcat_port %> with address <%= tomcat_address %>
|
|
2
|
-
group tomcat_<%= tomcat_port %>
|
|
3
|
-
start program = "/etc/init.d/tomcat_<%= tomcat_port %> start"
|
|
4
|
-
stop program = "/etc/init.d/tomcat_<%= tomcat_port %> stop"
|
|
5
|
-
|
|
6
|
-
if failed host <%= tomcat_address %> port <%= tomcat_port %>
|
|
7
|
-
with timeout 10 seconds
|
|
8
|
-
then alert
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
placeholder
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
#! /bin/sh
|
|
2
|
-
#
|
|
3
|
-
# Tomcat auto-start
|
|
4
|
-
#
|
|
5
|
-
# description: Auto-starts tomcat
|
|
6
|
-
# processname: tomcat
|
|
7
|
-
# pidfile: /var/run/tomcat.pid
|
|
8
|
-
|
|
9
|
-
export JAVA_HOME=/usr/lib/jvm/java-6-sun
|
|
10
|
-
export JAVA_OPTS="-Xmx800m -Xms800m"
|
|
11
|
-
export CATALINA_HOME="/usr/local/tomcat"
|
|
12
|
-
export CATALINA_BASE="<%=deploy_to%>/tomcat"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
case $1 in
|
|
16
|
-
start)
|
|
17
|
-
sh $CATALINA_HOME/bin/startup.sh
|
|
18
|
-
;;
|
|
19
|
-
stop)
|
|
20
|
-
sh $CATALINA_HOME/bin/shutdown.sh
|
|
21
|
-
sleep 5
|
|
22
|
-
;;
|
|
23
|
-
restart)
|
|
24
|
-
sh $CATALINA_HOME/bin/shutdown.sh
|
|
25
|
-
sh $CATALINA_HOME/bin/startup.sh
|
|
26
|
-
;;
|
|
27
|
-
esac
|
|
28
|
-
exit 0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
placeholder
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
placeholder
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
check process starling_<%= starling_port %> with pidfile <%= starling_run_dir %>/starling_<%= starling_port %>.pid
|
|
2
|
-
group starling_<%= starling_port %>
|
|
3
|
-
start program = "/etc/init.d/starling_<%= starling_port %> start"
|
|
4
|
-
stop program = "/etc/init.d/starling_<%= starling_port %> stop"
|
|
5
|
-
|
|
6
|
-
if failed host <%= starling_address %> port <%= starling_port %>
|
|
7
|
-
with timeout 10 seconds
|
|
8
|
-
then alert
|
|
9
|
-
|
|
10
|
-
if totalmem > 100 Mb then restart
|
|
11
|
-
if cpu > 60% for 2 cycles then alert
|
|
12
|
-
if cpu > 80% for 5 cycles then restart
|
|
13
|
-
if loadavg(5min) > 10 for 8 cycles then restart
|
|
14
|
-
if 3 restarts within 5 cycles then timeout
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
#! /bin/sh
|
|
2
|
-
### BEGIN INIT INFO
|
|
3
|
-
# Provides: starling
|
|
4
|
-
# Required-Start: $local_fs $remote_fs
|
|
5
|
-
# Required-Stop: $local_fs $remote_fs
|
|
6
|
-
# Default-Start: 2 3 4 5
|
|
7
|
-
# Default-Stop: S 0 1 6
|
|
8
|
-
# Short-Description: Starling queue server
|
|
9
|
-
# Description: The Starling distributed, transactional queue server
|
|
10
|
-
### END INIT INFO
|
|
11
|
-
# Author:
|
|
12
|
-
# Version:
|
|
13
|
-
|
|
14
|
-
set -e
|
|
15
|
-
|
|
16
|
-
LOGFILE=<%= starling_log_dir %>/starling_<%= starling_port %>.log
|
|
17
|
-
SPOOLDIR=<%= starling_spool_dir %>
|
|
18
|
-
PORT=<%= starling_port %>
|
|
19
|
-
LISTEN=<%= starling_address %>
|
|
20
|
-
PIDFILE=<%= starling_run_dir %>/starling_<%= starling_port %>.pid
|
|
21
|
-
|
|
22
|
-
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
23
|
-
NAME=starling
|
|
24
|
-
DESC="Starling"
|
|
25
|
-
INSTALL_DIR=/usr/local/bin
|
|
26
|
-
DAEMON=$INSTALL_DIR/$NAME
|
|
27
|
-
SCRIPTNAME=/etc/init.d/$NAME
|
|
28
|
-
OPTS="-h $LISTEN -p $PORT -d -q $SPOOLDIR -P $PIDFILE -L $LOGFILE"
|
|
29
|
-
|
|
30
|
-
. /lib/lsb/init-functions
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
# Gracefully exit if the package has been removed.
|
|
34
|
-
test -x $DAEMON || exit 0
|
|
35
|
-
|
|
36
|
-
d_start() {
|
|
37
|
-
log_begin_msg "Starting Starling Server..."
|
|
38
|
-
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \
|
|
39
|
-
-- $OPTS || log_end_msg 1
|
|
40
|
-
log_end_msg 0
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
d_stop() {
|
|
44
|
-
log_begin_msg "Stopping Starling Server..."
|
|
45
|
-
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
|
|
46
|
-
|| log_end_msg 1
|
|
47
|
-
log_end_msg 0
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
case "$1" in
|
|
51
|
-
start)
|
|
52
|
-
d_start
|
|
53
|
-
;;
|
|
54
|
-
stop)
|
|
55
|
-
d_stop
|
|
56
|
-
;;
|
|
57
|
-
restart|force-reload|reload)
|
|
58
|
-
d_stop
|
|
59
|
-
sleep 2
|
|
60
|
-
d_start
|
|
61
|
-
;;
|
|
62
|
-
*)
|
|
63
|
-
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
|
64
|
-
exit 3
|
|
65
|
-
;;
|
|
66
|
-
esac
|
|
67
|
-
|
|
68
|
-
exit 0
|
|
69
|
-
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
#! /bin/sh
|
|
2
|
-
### BEGIN INIT INFO
|
|
3
|
-
# Provides: workling
|
|
4
|
-
# Required-Start: $local_fs $remote_fs
|
|
5
|
-
# Required-Stop: $local_fs $remote_fs
|
|
6
|
-
# Default-Start: 2 3 4 5
|
|
7
|
-
# Default-Stop: S 0 1 6
|
|
8
|
-
# Short-Description: workling queue processor
|
|
9
|
-
# Description: workling queue processor
|
|
10
|
-
### END INIT INFO
|
|
11
|
-
# Author:
|
|
12
|
-
# Version:
|
|
13
|
-
|
|
14
|
-
set -e
|
|
15
|
-
|
|
16
|
-
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
|
17
|
-
NAME=workling
|
|
18
|
-
DESC="Workling"
|
|
19
|
-
SCRIPTNAME=/etc/init.d/$NAME
|
|
20
|
-
|
|
21
|
-
. /lib/lsb/init-functions
|
|
22
|
-
|
|
23
|
-
d_start() {
|
|
24
|
-
log_begin_msg "Starting Workling Server..."
|
|
25
|
-
sh -c 'cd <%=deploy_to%>/current/; RAILS_ENV=<%=rails_env%> ./script/workling_client start' \
|
|
26
|
-
|| log_end_msg 1
|
|
27
|
-
log_end_msg 0
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
d_stop() {
|
|
31
|
-
log_begin_msg "Stopping Workling Server..."
|
|
32
|
-
sh -c 'cd <%=deploy_to%>/current/; RAILS_ENV=<%=rails_env%> ./script/workling_client stop' \
|
|
33
|
-
|| log_end_msg 1
|
|
34
|
-
log_end_msg 0
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
case "$1" in
|
|
38
|
-
start)
|
|
39
|
-
d_start
|
|
40
|
-
;;
|
|
41
|
-
stop)
|
|
42
|
-
d_stop
|
|
43
|
-
;;
|
|
44
|
-
restart|force-reload|reload)
|
|
45
|
-
d_stop
|
|
46
|
-
sleep 2
|
|
47
|
-
d_start
|
|
48
|
-
;;
|
|
49
|
-
*)
|
|
50
|
-
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
|
51
|
-
exit 3
|
|
52
|
-
;;
|
|
53
|
-
esac
|
|
54
|
-
|
|
55
|
-
exit 0
|
|
56
|
-
|