chrisrec 0.1.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.
Files changed (41) hide show
  1. data/Manifest +39 -0
  2. data/README +0 -0
  3. data/Rakefile +15 -0
  4. data/chrisrec.gemspec +30 -0
  5. data/lib/backgroundrb/backgroundrb.rb +22 -0
  6. data/lib/chrisrec.rb +12 -0
  7. data/lib/console/console.rb +19 -0
  8. data/lib/daemon/daemon.rb +134 -0
  9. data/lib/gitosis/gitosis.rb +131 -0
  10. data/lib/memcached/memcached.rb +140 -0
  11. data/lib/munin/munin.rb +135 -0
  12. data/lib/mysql/mysql.rake +95 -0
  13. data/lib/mysql/mysql.rb +51 -0
  14. data/lib/rake/rake.rb +19 -0
  15. data/lib/rakecron/rakecron.rb +35 -0
  16. data/lib/starling/starling.rb +124 -0
  17. data/lib/tomcat/tomcat.rb +200 -0
  18. data/lib/workling/workling.rb +72 -0
  19. data/template/daemon/daemon-init-script.erb +59 -0
  20. data/template/daemon/monit.conf.erb +4 -0
  21. data/template/memcached/memcached-conf.erb +1 -0
  22. data/template/memcached/memcached.erb +59 -0
  23. data/template/memcached/monit.conf.erb +8 -0
  24. data/template/memcached/start-memcached.erb +118 -0
  25. data/template/munin/httpd-vhost-munin.conf.erb +20 -0
  26. data/template/munin/munin.conf.erb +70 -0
  27. data/template/munin/munin_nginx_vhost.conf.erb +24 -0
  28. data/template/rakecron/rakecron.erb +12 -0
  29. data/template/starling/monit.conf.erb +14 -0
  30. data/template/starling/starling-init-script.erb +69 -0
  31. data/template/tomcat/conf/server.xml.erb +33 -0
  32. data/template/tomcat/conf/web.xml +1194 -0
  33. data/template/tomcat/logs/empty.txt +1 -0
  34. data/template/tomcat/monit.conf.erb +8 -0
  35. data/template/tomcat/temp/empty.txt +1 -0
  36. data/template/tomcat/tomcat.erb +28 -0
  37. data/template/tomcat/webapps/empty.txt +1 -0
  38. data/template/tomcat/work/empty.txt +1 -0
  39. data/template/workling/monit.conf.erb +4 -0
  40. data/template/workling/workling-init-script.erb +56 -0
  41. metadata +121 -0
@@ -0,0 +1 @@
1
+ placeholder
@@ -0,0 +1,8 @@
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
@@ -0,0 +1 @@
1
+ placeholder
@@ -0,0 +1,28 @@
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
@@ -0,0 +1 @@
1
+ placeholder
@@ -0,0 +1 @@
1
+ placeholder
@@ -0,0 +1,4 @@
1
+ check process workling_<%= starling_port %> with pidfile <%=deploy_to%>/current/log/workling.pid
2
+ group workling_<%= starling_port %>
3
+ start program = "/etc/init.d/workling_<%= starling_port %> start"
4
+ stop program = "/etc/init.d/workling_<%= starling_port %> stop"
@@ -0,0 +1,56 @@
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
+
metadata ADDED
@@ -0,0 +1,121 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: chrisrec
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 0
9
+ version: 0.1.0
10
+ platform: ruby
11
+ authors:
12
+ - Chris Douglas
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-02-22 00:00:00 +11:00
18
+ default_executable:
19
+ dependencies: []
20
+
21
+ description: Extend Deprec with other recipies.
22
+ email: dougo.chris@gmail.com
23
+ executables: []
24
+
25
+ extensions: []
26
+
27
+ extra_rdoc_files:
28
+ - README
29
+ - lib/backgroundrb/backgroundrb.rb
30
+ - lib/chrisrec.rb
31
+ - lib/console/console.rb
32
+ - lib/daemon/daemon.rb
33
+ - lib/gitosis/gitosis.rb
34
+ - lib/memcached/memcached.rb
35
+ - lib/munin/munin.rb
36
+ - lib/mysql/mysql.rake
37
+ - lib/mysql/mysql.rb
38
+ - lib/rake/rake.rb
39
+ - lib/rakecron/rakecron.rb
40
+ - lib/starling/starling.rb
41
+ - lib/tomcat/tomcat.rb
42
+ - lib/workling/workling.rb
43
+ files:
44
+ - Manifest
45
+ - README
46
+ - Rakefile
47
+ - lib/backgroundrb/backgroundrb.rb
48
+ - lib/chrisrec.rb
49
+ - lib/console/console.rb
50
+ - lib/daemon/daemon.rb
51
+ - lib/gitosis/gitosis.rb
52
+ - lib/memcached/memcached.rb
53
+ - lib/munin/munin.rb
54
+ - lib/mysql/mysql.rake
55
+ - lib/mysql/mysql.rb
56
+ - lib/rake/rake.rb
57
+ - lib/rakecron/rakecron.rb
58
+ - lib/starling/starling.rb
59
+ - lib/tomcat/tomcat.rb
60
+ - lib/workling/workling.rb
61
+ - template/daemon/daemon-init-script.erb
62
+ - template/daemon/monit.conf.erb
63
+ - template/memcached/memcached-conf.erb
64
+ - template/memcached/memcached.erb
65
+ - template/memcached/monit.conf.erb
66
+ - template/memcached/start-memcached.erb
67
+ - template/munin/httpd-vhost-munin.conf.erb
68
+ - template/munin/munin.conf.erb
69
+ - template/munin/munin_nginx_vhost.conf.erb
70
+ - template/rakecron/rakecron.erb
71
+ - template/starling/monit.conf.erb
72
+ - template/starling/starling-init-script.erb
73
+ - template/tomcat/conf/server.xml.erb
74
+ - template/tomcat/conf/web.xml
75
+ - template/tomcat/logs/empty.txt
76
+ - template/tomcat/monit.conf.erb
77
+ - template/tomcat/temp/empty.txt
78
+ - template/tomcat/tomcat.erb
79
+ - template/tomcat/webapps/empty.txt
80
+ - template/tomcat/work/empty.txt
81
+ - template/workling/monit.conf.erb
82
+ - template/workling/workling-init-script.erb
83
+ - chrisrec.gemspec
84
+ has_rdoc: true
85
+ homepage: http://github.com/dougochris/chrisrec
86
+ licenses: []
87
+
88
+ post_install_message:
89
+ rdoc_options:
90
+ - --line-numbers
91
+ - --inline-source
92
+ - --title
93
+ - Chrisrec
94
+ - --main
95
+ - README
96
+ require_paths:
97
+ - lib
98
+ required_ruby_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ segments:
103
+ - 0
104
+ version: "0"
105
+ required_rubygems_version: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ segments:
110
+ - 1
111
+ - 2
112
+ version: "1.2"
113
+ requirements: []
114
+
115
+ rubyforge_project: chrisrec
116
+ rubygems_version: 1.3.6
117
+ signing_key:
118
+ specification_version: 3
119
+ summary: Extend Deprec with other recipies.
120
+ test_files: []
121
+