chrisrec 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/Manifest +44 -0
  2. data/Rakefile +2 -2
  3. data/chrisrec.gemspec +3 -3
  4. data/pkg/chrisrec-0.1.2/Manifest +88 -0
  5. data/pkg/chrisrec-0.1.2/README +1 -0
  6. data/pkg/chrisrec-0.1.2/Rakefile +21 -0
  7. data/pkg/chrisrec-0.1.2/chrisrec.gemspec +30 -0
  8. data/pkg/chrisrec-0.1.2/lib/backgroundrb/backgroundrb.rb +22 -0
  9. data/pkg/chrisrec-0.1.2/lib/chrisrec.rb +14 -0
  10. data/pkg/chrisrec-0.1.2/lib/console/console.rb +19 -0
  11. data/pkg/chrisrec-0.1.2/lib/daemon/daemon.rb +134 -0
  12. data/pkg/chrisrec-0.1.2/lib/gitosis/gitosis.rb +131 -0
  13. data/pkg/chrisrec-0.1.2/lib/jekyll/jekyll.rb +87 -0
  14. data/pkg/chrisrec-0.1.2/lib/memcached/memcached.rb +140 -0
  15. data/pkg/chrisrec-0.1.2/lib/munin/munin.rb +135 -0
  16. data/pkg/chrisrec-0.1.2/lib/mysql/mysql.rake +95 -0
  17. data/pkg/chrisrec-0.1.2/lib/mysql/mysql.rb +51 -0
  18. data/pkg/chrisrec-0.1.2/lib/rake/rake.rb +19 -0
  19. data/pkg/chrisrec-0.1.2/lib/rakecron/rakecron.rb +35 -0
  20. data/pkg/chrisrec-0.1.2/lib/starling/starling.rb +124 -0
  21. data/pkg/chrisrec-0.1.2/lib/static/static.rb +80 -0
  22. data/pkg/chrisrec-0.1.2/lib/tomcat/tomcat.rb +202 -0
  23. data/pkg/chrisrec-0.1.2/lib/workling/workling.rb +72 -0
  24. data/pkg/chrisrec-0.1.2/template/daemon/daemon-init-script.erb +59 -0
  25. data/pkg/chrisrec-0.1.2/template/daemon/monit.conf.erb +4 -0
  26. data/pkg/chrisrec-0.1.2/template/jekyll/httpd-vhost-jekyll.conf.erb +16 -0
  27. data/pkg/chrisrec-0.1.2/template/memcached/memcached-conf.erb +1 -0
  28. data/pkg/chrisrec-0.1.2/template/memcached/memcached.erb +59 -0
  29. data/pkg/chrisrec-0.1.2/template/memcached/monit.conf.erb +8 -0
  30. data/pkg/chrisrec-0.1.2/template/memcached/start-memcached.erb +118 -0
  31. data/pkg/chrisrec-0.1.2/template/munin/httpd-vhost-munin.conf.erb +20 -0
  32. data/pkg/chrisrec-0.1.2/template/munin/munin.conf.erb +70 -0
  33. data/pkg/chrisrec-0.1.2/template/munin/munin_nginx_vhost.conf.erb +24 -0
  34. data/pkg/chrisrec-0.1.2/template/rakecron/rakecron.erb +12 -0
  35. data/pkg/chrisrec-0.1.2/template/starling/monit.conf.erb +14 -0
  36. data/pkg/chrisrec-0.1.2/template/starling/starling-init-script.erb +69 -0
  37. data/pkg/chrisrec-0.1.2/template/static/httpd-vhost-static.conf.erb +16 -0
  38. data/pkg/chrisrec-0.1.2/template/tomcat/conf/server.xml.erb +33 -0
  39. data/pkg/chrisrec-0.1.2/template/tomcat/conf/web.xml +1194 -0
  40. data/pkg/chrisrec-0.1.2/template/tomcat/logs/empty.txt +1 -0
  41. data/pkg/chrisrec-0.1.2/template/tomcat/monit.conf.erb +8 -0
  42. data/pkg/chrisrec-0.1.2/template/tomcat/temp/empty.txt +1 -0
  43. data/pkg/chrisrec-0.1.2/template/tomcat/tomcat.erb +28 -0
  44. data/pkg/chrisrec-0.1.2/template/tomcat/webapps/empty.txt +1 -0
  45. data/pkg/chrisrec-0.1.2/template/tomcat/work/empty.txt +1 -0
  46. data/pkg/chrisrec-0.1.2/template/workling/monit.conf.erb +4 -0
  47. data/pkg/chrisrec-0.1.2/template/workling/workling-init-script.erb +56 -0
  48. metadata +48 -4
@@ -0,0 +1,14 @@
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
@@ -0,0 +1,69 @@
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
+
@@ -0,0 +1,16 @@
1
+ Listen 8090
2
+ <VirtualHost *:8090>
3
+ ServerName <%= domain %>
4
+
5
+ DocumentRoot <%= "#{deploy_to}/current" %>
6
+
7
+ <Directory <%= "#{deploy_to}/current" %>>
8
+ Options Indexes FollowSymLinks MultiViews
9
+ AllowOverride None
10
+ Order allow,deny
11
+ allow from all
12
+ </Directory>
13
+
14
+ ErrorLog /var/log/jekyll_log
15
+ CustomLog /var/log/jekyll-access_log combined
16
+ </VirtualHost>
@@ -0,0 +1,33 @@
1
+ <Server port="<%=tomcat_shutdown_port%>" shutdown="TOMCAT_<%=tomcat_port%>_SHUTDOWN" debug="0">
2
+
3
+ <Service name="Catalina">
4
+
5
+ <Connector port="<%=tomcat_port%>"
6
+ maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
7
+ enableLookups="false" redirectPort="<%=tomcat_ssl_port%>" acceptCount="100"
8
+ debug="0" connectionTimeout="20000"
9
+ disableUploadTimeout="true" />
10
+
11
+ <Engine name="Catalina" defaultHost="localhost" debug="0">
12
+
13
+ <Logger className="org.apache.catalina.logger.FileLogger"
14
+ prefix="catalina_log." suffix=".txt"
15
+ timestamp="true"/>
16
+
17
+ <Host name="localhost" debug="0" appBase="webapps"
18
+ unpackWARs="true" autoDeploy="true"
19
+ xmlValidation="false" xmlNamespaceAware="false">
20
+
21
+ <Logger className="org.apache.catalina.logger.FileLogger"
22
+ directory="logs" prefix="localhost_log." suffix=".txt"
23
+ timestamp="true"/>
24
+
25
+ <Context path="" docBase="<%=tomcat_war%>" debug="0"/>
26
+
27
+ </Host>
28
+
29
+ </Engine>
30
+
31
+ </Service>
32
+
33
+ </Server>