rubber-jcarnegie 0.0.1

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 (396) hide show
  1. data/CHANGELOG +477 -0
  2. data/COPYING +339 -0
  3. data/README +6 -0
  4. data/TODO +11 -0
  5. data/VERSION +1 -0
  6. data/bin/vulcanize +25 -0
  7. data/generators/vulcanize/USAGE +6 -0
  8. data/generators/vulcanize/templates/apache/config/rubber/deploy-apache.rb +51 -0
  9. data/generators/vulcanize/templates/apache/config/rubber/role/apache/deflate.conf +10 -0
  10. data/generators/vulcanize/templates/apache/config/rubber/role/apache/expires.conf +9 -0
  11. data/generators/vulcanize/templates/apache/config/rubber/role/apache/headers.conf +6 -0
  12. data/generators/vulcanize/templates/apache/config/rubber/role/apache/monit-apache.conf +8 -0
  13. data/generators/vulcanize/templates/apache/config/rubber/role/apache/ports.conf +8 -0
  14. data/generators/vulcanize/templates/apache/config/rubber/role/apache/setenvif.conf +52 -0
  15. data/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-apache-vhost.conf +79 -0
  16. data/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-apache.auth +7 -0
  17. data/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-index.html +34 -0
  18. data/generators/vulcanize/templates/apache/config/rubber/rubber-apache.yml +6 -0
  19. data/generators/vulcanize/templates/apache/templates.yml +1 -0
  20. data/generators/vulcanize/templates/base/Capfile +14 -0
  21. data/generators/vulcanize/templates/base/Rakefile +23 -0
  22. data/generators/vulcanize/templates/base/config/deploy.rb +56 -0
  23. data/generators/vulcanize/templates/base/config/rubber/common/crontab +22 -0
  24. data/generators/vulcanize/templates/base/config/rubber/common/monit-postfix.conf +8 -0
  25. data/generators/vulcanize/templates/base/config/rubber/common/rubber.profile +13 -0
  26. data/generators/vulcanize/templates/base/config/rubber/deploy-setup.rb +92 -0
  27. data/generators/vulcanize/templates/base/config/rubber/deploy-util.rb +97 -0
  28. data/generators/vulcanize/templates/base/config/rubber/rubber-dns.yml +78 -0
  29. data/generators/vulcanize/templates/base/config/rubber/rubber-rvm.yml +33 -0
  30. data/generators/vulcanize/templates/base/config/rubber/rubber.yml +241 -0
  31. data/generators/vulcanize/templates/base/lib/tasks/rubber.rake +15 -0
  32. data/generators/vulcanize/templates/base/script/cron-rake +18 -0
  33. data/generators/vulcanize/templates/base/script/cron-runner +18 -0
  34. data/generators/vulcanize/templates/base/script/cron-sh +67 -0
  35. data/generators/vulcanize/templates/base/templates.rb +11 -0
  36. data/generators/vulcanize/templates/base/templates.yml +6 -0
  37. data/generators/vulcanize/templates/cassandra/config/rubber/deploy-cassandra.rb +88 -0
  38. data/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/cassandra.in.sh +60 -0
  39. data/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/cassandra.yaml +210 -0
  40. data/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/log4j-server.properties +45 -0
  41. data/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/monit-cassandra.conf +8 -0
  42. data/generators/vulcanize/templates/cassandra/config/rubber/rubber-cassandra.yml +18 -0
  43. data/generators/vulcanize/templates/cassandra/templates.yml +1 -0
  44. data/generators/vulcanize/templates/complete_mongrel_mysql/config/rubber/role/haproxy/haproxy-mongrel.conf +23 -0
  45. data/generators/vulcanize/templates/complete_mongrel_mysql/config/rubber/role/nginx/nginx-mongrel.conf +113 -0
  46. data/generators/vulcanize/templates/complete_mongrel_mysql/config/rubber/rubber-complete.yml +41 -0
  47. data/generators/vulcanize/templates/complete_mongrel_mysql/templates.yml +6 -0
  48. data/generators/vulcanize/templates/complete_passenger/config/rubber/role/haproxy/haproxy-passenger.conf +21 -0
  49. data/generators/vulcanize/templates/complete_passenger/config/rubber/rubber-complete.yml +40 -0
  50. data/generators/vulcanize/templates/complete_passenger/templates.rb +9 -0
  51. data/generators/vulcanize/templates/complete_passenger/templates.yml +9 -0
  52. data/generators/vulcanize/templates/complete_passenger_mysql/templates.yml +4 -0
  53. data/generators/vulcanize/templates/complete_passenger_postgresql/templates.yml +4 -0
  54. data/generators/vulcanize/templates/cruise/config/rubber/deploy-cruise.rb +72 -0
  55. data/generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise +40 -0
  56. data/generators/vulcanize/templates/cruise/config/rubber/role/cruise/my.cnf +165 -0
  57. data/generators/vulcanize/templates/cruise/config/rubber/role/cruise/production.rb +8 -0
  58. data/generators/vulcanize/templates/cruise/config/rubber/role/cruise/site_config.rb +76 -0
  59. data/generators/vulcanize/templates/cruise/config/rubber/role/web_tools/cruise-nginx.conf +11 -0
  60. data/generators/vulcanize/templates/cruise/config/rubber/rubber-cruise.yml +18 -0
  61. data/generators/vulcanize/templates/cruise/templates.yml +1 -0
  62. data/generators/vulcanize/templates/haproxy/config/rubber/deploy-haproxy.rb +45 -0
  63. data/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/haproxy-base.conf +26 -0
  64. data/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/haproxy-default.conf +8 -0
  65. data/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/monit-haproxy.conf +9 -0
  66. data/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/syslog-haproxy.conf +11 -0
  67. data/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/syslogd-default.conf +21 -0
  68. data/generators/vulcanize/templates/haproxy/config/rubber/role/web_tools/haproxy-nginx.conf +10 -0
  69. data/generators/vulcanize/templates/haproxy/config/rubber/rubber-haproxy.yml +7 -0
  70. data/generators/vulcanize/templates/haproxy/templates.yml +1 -0
  71. data/generators/vulcanize/templates/jetty/config/rubber/deploy-jetty.rb +59 -0
  72. data/generators/vulcanize/templates/jetty/config/rubber/role/jetty/jetty.sh +589 -0
  73. data/generators/vulcanize/templates/jetty/config/rubber/role/jetty/jetty.xml +199 -0
  74. data/generators/vulcanize/templates/jetty/config/rubber/role/jetty/monit-jetty.conf +9 -0
  75. data/generators/vulcanize/templates/jetty/config/rubber/rubber-jetty.yml +10 -0
  76. data/generators/vulcanize/templates/jetty/templates.yml +1 -0
  77. data/generators/vulcanize/templates/memcached/config/memcached.yml +28 -0
  78. data/generators/vulcanize/templates/memcached/config/rubber/common/memcached.yml +14 -0
  79. data/generators/vulcanize/templates/memcached/config/rubber/role/memcached/memcached.conf +52 -0
  80. data/generators/vulcanize/templates/memcached/config/rubber/role/memcached/memcached_munin_plugin +249 -0
  81. data/generators/vulcanize/templates/memcached/config/rubber/rubber-memcached.yml +7 -0
  82. data/generators/vulcanize/templates/memcached/templates.yml +1 -0
  83. data/generators/vulcanize/templates/minimal_mysql/templates.yml +7 -0
  84. data/generators/vulcanize/templates/minimal_nodb/templates.yml +6 -0
  85. data/generators/vulcanize/templates/mongrel/config/rubber/deploy-mongrel.rb +75 -0
  86. data/generators/vulcanize/templates/mongrel/config/rubber/role/mongrel/mongrel_cluster.yml +12 -0
  87. data/generators/vulcanize/templates/mongrel/config/rubber/role/mongrel/monit-mongrel.conf +20 -0
  88. data/generators/vulcanize/templates/mongrel/config/rubber/rubber-mongrel.yml +9 -0
  89. data/generators/vulcanize/templates/mongrel/templates.yml +1 -0
  90. data/generators/vulcanize/templates/monit/config/rubber/common/monit-default.conf +15 -0
  91. data/generators/vulcanize/templates/monit/config/rubber/common/monit.conf +252 -0
  92. data/generators/vulcanize/templates/monit/config/rubber/deploy-monit.rb +33 -0
  93. data/generators/vulcanize/templates/monit/config/rubber/role/web_tools/monit-admin-nginx.conf +10 -0
  94. data/generators/vulcanize/templates/monit/config/rubber/rubber-monit.yml +6 -0
  95. data/generators/vulcanize/templates/monit/templates.yml +1 -0
  96. data/generators/vulcanize/templates/munin/config/rubber/common/monit-munin.conf +8 -0
  97. data/generators/vulcanize/templates/munin/config/rubber/common/munin-node.conf +48 -0
  98. data/generators/vulcanize/templates/munin/config/rubber/common/munin-plugins.conf +11 -0
  99. data/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb +46 -0
  100. data/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin-nginx.conf +8 -0
  101. data/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin-plugins.conf +31 -0
  102. data/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin.conf +115 -0
  103. data/generators/vulcanize/templates/munin/config/rubber/rubber-munin.yml +8 -0
  104. data/generators/vulcanize/templates/munin/script/munin/example_mysql_query.rb +55 -0
  105. data/generators/vulcanize/templates/munin/script/munin/example_simple.rb +24 -0
  106. data/generators/vulcanize/templates/munin/templates.yml +1 -0
  107. data/generators/vulcanize/templates/mysql/config/rubber/common/database.yml +12 -0
  108. data/generators/vulcanize/templates/mysql/config/rubber/deploy-mysql.rb +169 -0
  109. data/generators/vulcanize/templates/mysql/config/rubber/role/db/apparmor-mysql.conf +46 -0
  110. data/generators/vulcanize/templates/mysql/config/rubber/role/db/crontab +14 -0
  111. data/generators/vulcanize/templates/mysql/config/rubber/role/db/monit-mysql.cnf +10 -0
  112. data/generators/vulcanize/templates/mysql/config/rubber/role/db/my.cnf +163 -0
  113. data/generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin +51 -0
  114. data/generators/vulcanize/templates/mysql/config/rubber/rubber-mysql.yml +47 -0
  115. data/generators/vulcanize/templates/mysql/templates.yml +1 -0
  116. data/generators/vulcanize/templates/mysql_cluster/config/rubber/common/mysql_cluster_migrations.rb +13 -0
  117. data/generators/vulcanize/templates/mysql_cluster/config/rubber/deploy-mysql_cluster.rb +177 -0
  118. data/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_data/my.cnf +15 -0
  119. data/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_mgm/ndb_mgmd.cnf +39 -0
  120. data/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_sql/monit-mysql_cluster_sql.cnf +10 -0
  121. data/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_sql/my.cnf +23 -0
  122. data/generators/vulcanize/templates/mysql_cluster/config/rubber/rubber-mysql_cluster.yml +32 -0
  123. data/generators/vulcanize/templates/mysql_cluster/templates.yml +1 -0
  124. data/generators/vulcanize/templates/mysql_proxy/config/rubber/common/database.yml +16 -0
  125. data/generators/vulcanize/templates/mysql_proxy/config/rubber/common/monit-mysql_proxy.cnf +10 -0
  126. data/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy +153 -0
  127. data/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy.conf +10 -0
  128. data/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy.lua +5 -0
  129. data/generators/vulcanize/templates/mysql_proxy/config/rubber/deploy-mysql_proxy.rb +52 -0
  130. data/generators/vulcanize/templates/mysql_proxy/config/rubber/rubber-mysql_proxy.yml +11 -0
  131. data/generators/vulcanize/templates/mysql_proxy/templates.yml +1 -0
  132. data/generators/vulcanize/templates/nginx/config/rubber/deploy-nginx.rb +45 -0
  133. data/generators/vulcanize/templates/nginx/config/rubber/role/nginx/crontab +9 -0
  134. data/generators/vulcanize/templates/nginx/config/rubber/role/nginx/monit-nginx.conf +8 -0
  135. data/generators/vulcanize/templates/nginx/config/rubber/role/nginx/nginx.conf +42 -0
  136. data/generators/vulcanize/templates/nginx/config/rubber/role/web_tools/nginx-tools.conf +55 -0
  137. data/generators/vulcanize/templates/nginx/config/rubber/role/web_tools/tools-index.html +30 -0
  138. data/generators/vulcanize/templates/nginx/config/rubber/role/web_tools/tools-nginx.auth +7 -0
  139. data/generators/vulcanize/templates/nginx/config/rubber/rubber-nginx.yml +10 -0
  140. data/generators/vulcanize/templates/nginx/templates.yml +1 -0
  141. data/generators/vulcanize/templates/node/INSTALL_NOTES +20 -0
  142. data/generators/vulcanize/templates/node/config/rubber/deploy-node.rb +33 -0
  143. data/generators/vulcanize/templates/node/config/rubber/rubber-node.yml +1 -0
  144. data/generators/vulcanize/templates/passenger/config/rubber/deploy-passenger.rb +45 -0
  145. data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger-memory.conf +34 -0
  146. data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger-sudoers.conf +8 -0
  147. data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger.conf +47 -0
  148. data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf +48 -0
  149. data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger.conf +41 -0
  150. data/generators/vulcanize/templates/passenger/config/rubber/rubber-passenger.yml +15 -0
  151. data/generators/vulcanize/templates/passenger/templates.yml +3 -0
  152. data/generators/vulcanize/templates/postgresql/config/rubber/common/database.yml +12 -0
  153. data/generators/vulcanize/templates/postgresql/config/rubber/deploy-postgresql.rb +158 -0
  154. data/generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab +14 -0
  155. data/generators/vulcanize/templates/postgresql/config/rubber/role/db/monit-postgresql.conf +10 -0
  156. data/generators/vulcanize/templates/postgresql/config/rubber/role/db/munin-postgresql.conf +7 -0
  157. data/generators/vulcanize/templates/postgresql/config/rubber/role/db/pg_hba.conf +89 -0
  158. data/generators/vulcanize/templates/postgresql/config/rubber/role/db/postgresql-sysctl.conf +6 -0
  159. data/generators/vulcanize/templates/postgresql/config/rubber/role/db/postgresql.conf +531 -0
  160. data/generators/vulcanize/templates/postgresql/config/rubber/rubber-postgresql.yml +45 -0
  161. data/generators/vulcanize/templates/postgresql/templates.yml +1 -0
  162. data/generators/vulcanize/templates/redis/config/rubber/deploy-redis.rb +76 -0
  163. data/generators/vulcanize/templates/redis/config/rubber/role/redis/crontab +8 -0
  164. data/generators/vulcanize/templates/redis/config/rubber/role/redis/monit-redis.conf +9 -0
  165. data/generators/vulcanize/templates/redis/config/rubber/role/redis/redis.conf +320 -0
  166. data/generators/vulcanize/templates/redis/config/rubber/rubber-redis.yml +9 -0
  167. data/generators/vulcanize/templates/redis/templates.yml +1 -0
  168. data/generators/vulcanize/templates/resque/config/initializers/resque.rb +15 -0
  169. data/generators/vulcanize/templates/resque/config/rubber/common/resque.yml +5 -0
  170. data/generators/vulcanize/templates/resque/config/rubber/deploy-resque.rb +58 -0
  171. data/generators/vulcanize/templates/resque/config/rubber/role/resque_web/monit-resque_web.conf +14 -0
  172. data/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf +19 -0
  173. data/generators/vulcanize/templates/resque/config/rubber/rubber-resque.yml +18 -0
  174. data/generators/vulcanize/templates/resque/script/resque_worker_management.rb +144 -0
  175. data/generators/vulcanize/templates/resque/templates.rb +1 -0
  176. data/generators/vulcanize/templates/resque/templates.yml +3 -0
  177. data/generators/vulcanize/templates/sphinx/config/rubber/common/sphinx.yml +46 -0
  178. data/generators/vulcanize/templates/sphinx/config/rubber/deploy-sphinx.rb +112 -0
  179. data/generators/vulcanize/templates/sphinx/config/rubber/role/sphinx/crontab +11 -0
  180. data/generators/vulcanize/templates/sphinx/config/rubber/role/sphinx/monit-sphinx.conf +13 -0
  181. data/generators/vulcanize/templates/sphinx/config/rubber/rubber-sphinx.yml +6 -0
  182. data/generators/vulcanize/templates/sphinx/templates.yml +1 -0
  183. data/generators/vulcanize/vulcanize_generator.rb +184 -0
  184. data/lib/capistrano/hostcmd.rb +12 -0
  185. data/lib/generators/vulcanize/USAGE +6 -0
  186. data/lib/generators/vulcanize/templates/apache/config/rubber/deploy-apache.rb +51 -0
  187. data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/deflate.conf +10 -0
  188. data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/expires.conf +9 -0
  189. data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/headers.conf +6 -0
  190. data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/monit-apache.conf +8 -0
  191. data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/ports.conf +8 -0
  192. data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/setenvif.conf +52 -0
  193. data/lib/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-apache-vhost.conf +79 -0
  194. data/lib/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-apache.auth +7 -0
  195. data/lib/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-index.html +34 -0
  196. data/lib/generators/vulcanize/templates/apache/config/rubber/rubber-apache.yml +6 -0
  197. data/lib/generators/vulcanize/templates/apache/templates.yml +1 -0
  198. data/lib/generators/vulcanize/templates/base/Capfile +14 -0
  199. data/lib/generators/vulcanize/templates/base/Rakefile +23 -0
  200. data/lib/generators/vulcanize/templates/base/config/deploy.rb +56 -0
  201. data/lib/generators/vulcanize/templates/base/config/rubber/common/crontab +22 -0
  202. data/lib/generators/vulcanize/templates/base/config/rubber/common/monit-postfix.conf +8 -0
  203. data/lib/generators/vulcanize/templates/base/config/rubber/common/rubber.profile +13 -0
  204. data/lib/generators/vulcanize/templates/base/config/rubber/deploy-setup.rb +92 -0
  205. data/lib/generators/vulcanize/templates/base/config/rubber/deploy-util.rb +97 -0
  206. data/lib/generators/vulcanize/templates/base/config/rubber/rubber-dns.yml +78 -0
  207. data/lib/generators/vulcanize/templates/base/config/rubber/rubber-rvm.yml +33 -0
  208. data/lib/generators/vulcanize/templates/base/config/rubber/rubber.yml +241 -0
  209. data/lib/generators/vulcanize/templates/base/lib/tasks/rubber.rake +15 -0
  210. data/lib/generators/vulcanize/templates/base/script/cron-rake +18 -0
  211. data/lib/generators/vulcanize/templates/base/script/cron-runner +18 -0
  212. data/lib/generators/vulcanize/templates/base/script/cron-sh +67 -0
  213. data/lib/generators/vulcanize/templates/base/templates.rb +11 -0
  214. data/lib/generators/vulcanize/templates/base/templates.yml +6 -0
  215. data/lib/generators/vulcanize/templates/cassandra/config/rubber/deploy-cassandra.rb +88 -0
  216. data/lib/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/cassandra.in.sh +60 -0
  217. data/lib/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/cassandra.yaml +210 -0
  218. data/lib/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/log4j-server.properties +45 -0
  219. data/lib/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/monit-cassandra.conf +8 -0
  220. data/lib/generators/vulcanize/templates/cassandra/config/rubber/rubber-cassandra.yml +18 -0
  221. data/lib/generators/vulcanize/templates/cassandra/templates.yml +1 -0
  222. data/lib/generators/vulcanize/templates/complete_mongrel_mysql/config/rubber/role/haproxy/haproxy-mongrel.conf +23 -0
  223. data/lib/generators/vulcanize/templates/complete_mongrel_mysql/config/rubber/role/nginx/nginx-mongrel.conf +113 -0
  224. data/lib/generators/vulcanize/templates/complete_mongrel_mysql/config/rubber/rubber-complete.yml +41 -0
  225. data/lib/generators/vulcanize/templates/complete_mongrel_mysql/templates.yml +6 -0
  226. data/lib/generators/vulcanize/templates/complete_passenger/config/rubber/role/haproxy/haproxy-passenger.conf +21 -0
  227. data/lib/generators/vulcanize/templates/complete_passenger/config/rubber/rubber-complete.yml +40 -0
  228. data/lib/generators/vulcanize/templates/complete_passenger/templates.rb +9 -0
  229. data/lib/generators/vulcanize/templates/complete_passenger/templates.yml +9 -0
  230. data/lib/generators/vulcanize/templates/complete_passenger_mysql/templates.yml +4 -0
  231. data/lib/generators/vulcanize/templates/complete_passenger_postgresql/templates.yml +4 -0
  232. data/lib/generators/vulcanize/templates/cruise/config/rubber/deploy-cruise.rb +72 -0
  233. data/lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise +40 -0
  234. data/lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/my.cnf +165 -0
  235. data/lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/production.rb +8 -0
  236. data/lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/site_config.rb +76 -0
  237. data/lib/generators/vulcanize/templates/cruise/config/rubber/role/web_tools/cruise-nginx.conf +11 -0
  238. data/lib/generators/vulcanize/templates/cruise/config/rubber/rubber-cruise.yml +18 -0
  239. data/lib/generators/vulcanize/templates/cruise/templates.yml +1 -0
  240. data/lib/generators/vulcanize/templates/haproxy/config/rubber/deploy-haproxy.rb +45 -0
  241. data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/haproxy-base.conf +26 -0
  242. data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/haproxy-default.conf +8 -0
  243. data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/monit-haproxy.conf +9 -0
  244. data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/syslog-haproxy.conf +11 -0
  245. data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/syslogd-default.conf +21 -0
  246. data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/web_tools/haproxy-nginx.conf +10 -0
  247. data/lib/generators/vulcanize/templates/haproxy/config/rubber/rubber-haproxy.yml +7 -0
  248. data/lib/generators/vulcanize/templates/haproxy/templates.yml +1 -0
  249. data/lib/generators/vulcanize/templates/jetty/config/rubber/deploy-jetty.rb +59 -0
  250. data/lib/generators/vulcanize/templates/jetty/config/rubber/role/jetty/jetty.sh +589 -0
  251. data/lib/generators/vulcanize/templates/jetty/config/rubber/role/jetty/jetty.xml +199 -0
  252. data/lib/generators/vulcanize/templates/jetty/config/rubber/role/jetty/monit-jetty.conf +9 -0
  253. data/lib/generators/vulcanize/templates/jetty/config/rubber/rubber-jetty.yml +10 -0
  254. data/lib/generators/vulcanize/templates/jetty/templates.yml +1 -0
  255. data/lib/generators/vulcanize/templates/memcached/config/memcached.yml +28 -0
  256. data/lib/generators/vulcanize/templates/memcached/config/rubber/common/memcached.yml +14 -0
  257. data/lib/generators/vulcanize/templates/memcached/config/rubber/role/memcached/memcached.conf +52 -0
  258. data/lib/generators/vulcanize/templates/memcached/config/rubber/role/memcached/memcached_munin_plugin +249 -0
  259. data/lib/generators/vulcanize/templates/memcached/config/rubber/rubber-memcached.yml +7 -0
  260. data/lib/generators/vulcanize/templates/memcached/templates.yml +1 -0
  261. data/lib/generators/vulcanize/templates/minimal_mysql/templates.yml +7 -0
  262. data/lib/generators/vulcanize/templates/minimal_nodb/templates.yml +6 -0
  263. data/lib/generators/vulcanize/templates/mongrel/config/rubber/deploy-mongrel.rb +75 -0
  264. data/lib/generators/vulcanize/templates/mongrel/config/rubber/role/mongrel/mongrel_cluster.yml +12 -0
  265. data/lib/generators/vulcanize/templates/mongrel/config/rubber/role/mongrel/monit-mongrel.conf +20 -0
  266. data/lib/generators/vulcanize/templates/mongrel/config/rubber/rubber-mongrel.yml +9 -0
  267. data/lib/generators/vulcanize/templates/mongrel/templates.yml +1 -0
  268. data/lib/generators/vulcanize/templates/monit/config/rubber/common/monit-default.conf +15 -0
  269. data/lib/generators/vulcanize/templates/monit/config/rubber/common/monit.conf +252 -0
  270. data/lib/generators/vulcanize/templates/monit/config/rubber/deploy-monit.rb +33 -0
  271. data/lib/generators/vulcanize/templates/monit/config/rubber/role/web_tools/monit-admin-nginx.conf +10 -0
  272. data/lib/generators/vulcanize/templates/monit/config/rubber/rubber-monit.yml +6 -0
  273. data/lib/generators/vulcanize/templates/monit/templates.yml +1 -0
  274. data/lib/generators/vulcanize/templates/munin/config/rubber/common/monit-munin.conf +8 -0
  275. data/lib/generators/vulcanize/templates/munin/config/rubber/common/munin-node.conf +48 -0
  276. data/lib/generators/vulcanize/templates/munin/config/rubber/common/munin-plugins.conf +11 -0
  277. data/lib/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb +46 -0
  278. data/lib/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin-nginx.conf +8 -0
  279. data/lib/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin-plugins.conf +31 -0
  280. data/lib/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin.conf +115 -0
  281. data/lib/generators/vulcanize/templates/munin/config/rubber/rubber-munin.yml +8 -0
  282. data/lib/generators/vulcanize/templates/munin/script/munin/example_mysql_query.rb +55 -0
  283. data/lib/generators/vulcanize/templates/munin/script/munin/example_simple.rb +24 -0
  284. data/lib/generators/vulcanize/templates/munin/templates.yml +1 -0
  285. data/lib/generators/vulcanize/templates/mysql/config/rubber/common/database.yml +12 -0
  286. data/lib/generators/vulcanize/templates/mysql/config/rubber/deploy-mysql.rb +169 -0
  287. data/lib/generators/vulcanize/templates/mysql/config/rubber/role/db/apparmor-mysql.conf +46 -0
  288. data/lib/generators/vulcanize/templates/mysql/config/rubber/role/db/crontab +14 -0
  289. data/lib/generators/vulcanize/templates/mysql/config/rubber/role/db/monit-mysql.cnf +10 -0
  290. data/lib/generators/vulcanize/templates/mysql/config/rubber/role/db/my.cnf +163 -0
  291. data/lib/generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin +51 -0
  292. data/lib/generators/vulcanize/templates/mysql/config/rubber/rubber-mysql.yml +47 -0
  293. data/lib/generators/vulcanize/templates/mysql/templates.yml +1 -0
  294. data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/common/mysql_cluster_migrations.rb +13 -0
  295. data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/deploy-mysql_cluster.rb +177 -0
  296. data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_data/my.cnf +15 -0
  297. data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_mgm/ndb_mgmd.cnf +39 -0
  298. data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_sql/monit-mysql_cluster_sql.cnf +10 -0
  299. data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_sql/my.cnf +23 -0
  300. data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/rubber-mysql_cluster.yml +32 -0
  301. data/lib/generators/vulcanize/templates/mysql_cluster/templates.yml +1 -0
  302. data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/database.yml +16 -0
  303. data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/monit-mysql_proxy.cnf +10 -0
  304. data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy +153 -0
  305. data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy.conf +10 -0
  306. data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy.lua +5 -0
  307. data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/deploy-mysql_proxy.rb +52 -0
  308. data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/rubber-mysql_proxy.yml +11 -0
  309. data/lib/generators/vulcanize/templates/mysql_proxy/templates.yml +1 -0
  310. data/lib/generators/vulcanize/templates/nginx/config/rubber/deploy-nginx.rb +45 -0
  311. data/lib/generators/vulcanize/templates/nginx/config/rubber/role/nginx/crontab +9 -0
  312. data/lib/generators/vulcanize/templates/nginx/config/rubber/role/nginx/monit-nginx.conf +8 -0
  313. data/lib/generators/vulcanize/templates/nginx/config/rubber/role/nginx/nginx.conf +42 -0
  314. data/lib/generators/vulcanize/templates/nginx/config/rubber/role/web_tools/nginx-tools.conf +55 -0
  315. data/lib/generators/vulcanize/templates/nginx/config/rubber/role/web_tools/tools-index.html +30 -0
  316. data/lib/generators/vulcanize/templates/nginx/config/rubber/role/web_tools/tools-nginx.auth +7 -0
  317. data/lib/generators/vulcanize/templates/nginx/config/rubber/rubber-nginx.yml +10 -0
  318. data/lib/generators/vulcanize/templates/nginx/templates.yml +1 -0
  319. data/lib/generators/vulcanize/templates/passenger/config/rubber/deploy-passenger.rb +45 -0
  320. data/lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger-memory.conf +34 -0
  321. data/lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger-sudoers.conf +8 -0
  322. data/lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger.conf +47 -0
  323. data/lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf +48 -0
  324. data/lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger.conf +41 -0
  325. data/lib/generators/vulcanize/templates/passenger/config/rubber/rubber-passenger.yml +15 -0
  326. data/lib/generators/vulcanize/templates/passenger/templates.yml +3 -0
  327. data/lib/generators/vulcanize/templates/postgresql/config/rubber/common/database.yml +12 -0
  328. data/lib/generators/vulcanize/templates/postgresql/config/rubber/deploy-postgresql.rb +158 -0
  329. data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab +14 -0
  330. data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/monit-postgresql.conf +10 -0
  331. data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/munin-postgresql.conf +7 -0
  332. data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/pg_hba.conf +89 -0
  333. data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/postgresql-sysctl.conf +6 -0
  334. data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/postgresql.conf +531 -0
  335. data/lib/generators/vulcanize/templates/postgresql/config/rubber/rubber-postgresql.yml +45 -0
  336. data/lib/generators/vulcanize/templates/postgresql/templates.yml +1 -0
  337. data/lib/generators/vulcanize/templates/redis/config/rubber/deploy-redis.rb +76 -0
  338. data/lib/generators/vulcanize/templates/redis/config/rubber/role/redis/crontab +8 -0
  339. data/lib/generators/vulcanize/templates/redis/config/rubber/role/redis/monit-redis.conf +9 -0
  340. data/lib/generators/vulcanize/templates/redis/config/rubber/role/redis/redis.conf +320 -0
  341. data/lib/generators/vulcanize/templates/redis/config/rubber/rubber-redis.yml +9 -0
  342. data/lib/generators/vulcanize/templates/redis/templates.yml +1 -0
  343. data/lib/generators/vulcanize/templates/resque/config/initializers/resque.rb +15 -0
  344. data/lib/generators/vulcanize/templates/resque/config/rubber/common/resque.yml +5 -0
  345. data/lib/generators/vulcanize/templates/resque/config/rubber/deploy-resque.rb +58 -0
  346. data/lib/generators/vulcanize/templates/resque/config/rubber/role/resque_web/monit-resque_web.conf +14 -0
  347. data/lib/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf +19 -0
  348. data/lib/generators/vulcanize/templates/resque/config/rubber/rubber-resque.yml +18 -0
  349. data/lib/generators/vulcanize/templates/resque/script/resque_worker_management.rb +144 -0
  350. data/lib/generators/vulcanize/templates/resque/templates.rb +1 -0
  351. data/lib/generators/vulcanize/templates/resque/templates.yml +3 -0
  352. data/lib/generators/vulcanize/templates/sphinx/config/rubber/common/sphinx.yml +46 -0
  353. data/lib/generators/vulcanize/templates/sphinx/config/rubber/deploy-sphinx.rb +112 -0
  354. data/lib/generators/vulcanize/templates/sphinx/config/rubber/role/sphinx/crontab +11 -0
  355. data/lib/generators/vulcanize/templates/sphinx/config/rubber/role/sphinx/monit-sphinx.conf +13 -0
  356. data/lib/generators/vulcanize/templates/sphinx/config/rubber/rubber-sphinx.yml +6 -0
  357. data/lib/generators/vulcanize/templates/sphinx/templates.yml +1 -0
  358. data/lib/generators/vulcanize/vulcanize_generator.rb +184 -0
  359. data/lib/rubber.rb +76 -0
  360. data/lib/rubber/capistrano.rb +1 -0
  361. data/lib/rubber/cloud.rb +13 -0
  362. data/lib/rubber/cloud/aws.rb +362 -0
  363. data/lib/rubber/cloud/base.rb +16 -0
  364. data/lib/rubber/configuration.rb +47 -0
  365. data/lib/rubber/dns.rb +13 -0
  366. data/lib/rubber/dns/base.rb +84 -0
  367. data/lib/rubber/dns/dyndns.rb +77 -0
  368. data/lib/rubber/dns/nettica.rb +117 -0
  369. data/lib/rubber/dns/zerigo.rb +115 -0
  370. data/lib/rubber/environment.rb +177 -0
  371. data/lib/rubber/generator.rb +209 -0
  372. data/lib/rubber/instance.rb +176 -0
  373. data/lib/rubber/railtie.rb +14 -0
  374. data/lib/rubber/recipes/rubber.rb +96 -0
  375. data/lib/rubber/recipes/rubber/bundles.rb +30 -0
  376. data/lib/rubber/recipes/rubber/deploy.rb +90 -0
  377. data/lib/rubber/recipes/rubber/instances.rb +453 -0
  378. data/lib/rubber/recipes/rubber/load_balancers.rb +44 -0
  379. data/lib/rubber/recipes/rubber/security_groups.rb +189 -0
  380. data/lib/rubber/recipes/rubber/setup.rb +534 -0
  381. data/lib/rubber/recipes/rubber/spot_requests.rb +23 -0
  382. data/lib/rubber/recipes/rubber/static_ips.rb +190 -0
  383. data/lib/rubber/recipes/rubber/tags.rb +12 -0
  384. data/lib/rubber/recipes/rubber/utils.rb +226 -0
  385. data/lib/rubber/recipes/rubber/volumes.rb +265 -0
  386. data/lib/rubber/tag.rb +16 -0
  387. data/lib/rubber/tasks/rubber.rb +279 -0
  388. data/lib/rubber/util.rb +72 -0
  389. data/rails/init.rb +6 -0
  390. data/test/environment_test.rb +144 -0
  391. data/test/generator_test.rb +370 -0
  392. data/test/instance_test.rb +96 -0
  393. data/test/test_helper.rb +14 -0
  394. data/test/util_test.rb +19 -0
  395. data/test/zerigo_test.rb +88 -0
  396. metadata +540 -0
@@ -0,0 +1,45 @@
1
+
2
+ # REQUIRED: The credentials for creating/accessong your app's database
3
+ #
4
+ db_user: "#{app_name[0,16]}"
5
+ db_pass:
6
+ db_name: "#{app_name}_#{RUBBER_ENV}"
7
+
8
+ db_slave_user: "#{('slave_' + db_user)[0,16]}"
9
+ db_replicator_user: "#{('replicator_' + db_user)[0,16]}"
10
+
11
+ # REQUIRED: The command to use to do a full backup of your database using
12
+ # "rake rubber:backup_db"
13
+ db_backup_cmd: "nice sudo -u postgres pg_dumpall -U postgres | gzip -c > %backup_file%"
14
+
15
+ # REQUIRED: The command to use to restore the database using
16
+ # "rake rubber:restore_db_s3"
17
+ # This command will receive the data generated by db_backup_cmd via
18
+ # its standard input
19
+ db_restore_cmd: "zcat - | psql -Uroot -h %host% %name%"
20
+
21
+ postgresql_ver: 9.0
22
+ postgresql_conf_dir: "/etc/postgresql/#{postgresql_ver}/main"
23
+ postgresql_data_dir: /mnt/postgresql/data
24
+ postgresql_archive_dir: /mnt/postgresql/archive
25
+ postgresql_pid_file: "/var/run/postgresql/#{postgresql_ver}-main.pid"
26
+ postgresql_ctl: "/usr/bin/env service postgresql"
27
+
28
+ # Capistrano needs db:primary role for migrate to work,
29
+ # so we might as well just make consistent across the board
30
+ role_dependencies:
31
+ postgresql_master: [db:primary=true]
32
+ postgresql_slave: [db]
33
+ db:primary=true: [postgresql_master]
34
+ db: [postgresql_slave]
35
+
36
+ packages: [postgresql-client, libpq-dev]
37
+ gems: [pg]
38
+
39
+ roles:
40
+ postgresql_master:
41
+ db_server_id: 1
42
+ postgresql_slave:
43
+ db_server_id: 2
44
+ db:
45
+ packages: [postgresql-9.0, libdbd-pg-perl]
@@ -0,0 +1 @@
1
+ description: The PostgreSQL database system
@@ -0,0 +1,76 @@
1
+ namespace :rubber do
2
+
3
+ namespace :redis do
4
+
5
+ rubber.allow_optional_tasks(self)
6
+
7
+ before "rubber:install_packages", "rubber:redis:setup_apt_sources"
8
+
9
+ task :setup_apt_sources, :roles => :redis do
10
+ rsudo "add-apt-repository ppa:soren/nova"
11
+ end
12
+
13
+ after "rubber:install_packages", "rubber:redis:custom_install"
14
+
15
+ task :custom_install, :roles => :redis do
16
+ rubber.sudo_script 'install_redis', <<-ENDSCRIPT
17
+ if ! redis-server --version | grep "#{rubber_env.redis_server_version}" &> /dev/null; then
18
+ # Fetch the sources.
19
+ wget http://redis.googlecode.com/files/redis-#{rubber_env.redis_server_version}.tar.gz
20
+ tar -zxf redis-#{rubber_env.redis_server_version}.tar.gz
21
+
22
+ # Build the binaries.
23
+ cd redis-#{rubber_env.redis_server_version}
24
+ make
25
+
26
+ # Install the binaries.
27
+ /etc/init.d/redis-server stop
28
+
29
+ mv redis-benchmark /usr/bin/
30
+ mv redis-check-aof /usr/bin/
31
+ mv redis-check-dump /usr/bin/
32
+ mv redis-cli /usr/bin/
33
+ mv redis-server /usr/bin/
34
+
35
+ /etc/init.d/redis-server start
36
+
37
+ # Clean up after ourselves.
38
+ cd ..
39
+ rm -rf redis-#{rubber_env.redis_server_version}
40
+ rm redis-#{rubber_env.redis_server_version}.tar.gz
41
+ fi
42
+ ENDSCRIPT
43
+ end
44
+
45
+ after "rubber:bootstrap", "rubber:redis:bootstrap"
46
+
47
+ task :bootstrap, :roles => :redis do
48
+ rubber.sudo_script 'bootstrap_redis', <<-ENDSCRIPT
49
+ mkdir -p #{rubber_env.redis_db_dir}
50
+ chown -R redis:redis #{rubber_env.redis_db_dir}
51
+ ENDSCRIPT
52
+ end
53
+
54
+ desc "Stops the redis server"
55
+ task :stop, :roles => :redis, :on_error => :continue do
56
+ rsudo "/etc/init.d/redis-server stop"
57
+ end
58
+
59
+ desc "Starts the redis server"
60
+ task :start, :roles => :redis do
61
+ rsudo "/etc/init.d/redis-server start"
62
+ end
63
+
64
+ desc "Restarts the redis server"
65
+ task :restart, :roles => :redis do
66
+ rsudo "/etc/init.d/redis-server restart"
67
+ end
68
+
69
+ desc "Reloads the redis server"
70
+ task :reload, :roles => :redis do
71
+ rsudo "/etc/init.d/redis-server restart"
72
+ end
73
+
74
+ end
75
+
76
+ end
@@ -0,0 +1,8 @@
1
+ <%
2
+ @read_cmd = 'crontab -l'
3
+ @write_cmd = 'crontab -'
4
+ @additive = ['# start-redis-crontab', '# end-redis-crontab']
5
+ %>
6
+
7
+ # backup redis DBs every hour
8
+ 0 * * * * BACKUP_DIR=/mnt/redis_backups BACKUP_NAME=redis BACKUP_CMD="tar -czf \%dir\%/redis_\%time_stamp\%.tgz <%= rubber_env.redis_db_dir %>" <%= RUBBER_ROOT %>/script/cron-rake rubber:backup
@@ -0,0 +1,9 @@
1
+ <%
2
+ @path = '/etc/monit/monit.d/monit-redis.conf'
3
+ %>
4
+ <% PIDFILE = "/var/run/redis.pid" %>
5
+ check process redis with pidfile <%= PIDFILE %>
6
+ group redis-<%= RUBBER_ENV %>
7
+ start program = "/etc/init.d/redis-server start"
8
+ stop program = "/etc/init.d/redis-server stop"
9
+ if failed host <%= rubber_env.host %> port 6379 with timeout 10 seconds for 10 cycles then restart
@@ -0,0 +1,320 @@
1
+ <%
2
+ @path = '/etc/redis/redis.conf'
3
+ @post = <<-SCRIPT
4
+ mkdir -p #{rubber_env.redis_db_dir}
5
+ chown -R redis:redis #{rubber_env.redis_db_dir}
6
+ /etc/init.d/redis-server restart
7
+ SCRIPT
8
+ %>
9
+
10
+ # Redis configuration file example
11
+
12
+ # Note on units: when memory size is needed, it is possible to specifiy
13
+ # it in the usual form of 1k 5GB 4M and so forth:
14
+ #
15
+ # 1k => 1000 bytes
16
+ # 1kb => 1024 bytes
17
+ # 1m => 1000000 bytes
18
+ # 1mb => 1024*1024 bytes
19
+ # 1g => 1000000000 bytes
20
+ # 1gb => 1024*1024*1024 bytes
21
+ #
22
+ # units are case insensitive so 1GB 1Gb 1gB are all the same.
23
+
24
+ # By default Redis does not run as a daemon. Use 'yes' if you need it.
25
+ # Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
26
+ daemonize yes
27
+
28
+ # When running daemonized, Redis writes a pid file in /var/run/redis.pid by
29
+ # default. You can specify a custom pid file location here.
30
+ pidfile /var/run/redis.pid
31
+
32
+ # Accept connections on the specified port, default is 6379
33
+ port 6379
34
+
35
+ # If you want you can bind a single interface, if the bind option is not
36
+ # specified all the interfaces will listen for incoming connections.
37
+ #
38
+ # bind 127.0.0.1
39
+
40
+ # Close the connection after a client is idle for N seconds (0 to disable)
41
+ timeout 300
42
+
43
+ # Set server verbosity to 'debug'
44
+ # it can be one of:
45
+ # debug (a lot of information, useful for development/testing)
46
+ # verbose (many rarely useful info, but not a mess like the debug level)
47
+ # notice (moderately verbose, what you want in production probably)
48
+ # warning (only very important / critical messages are logged)
49
+ loglevel notice
50
+
51
+ # Specify the log file name. Also 'stdout' can be used to force
52
+ # Redis to log on the standard output. Note that if you use standard
53
+ # output for logging but daemonize, logs will be sent to /dev/null
54
+ logfile /var/log/redis/redis-server.log
55
+
56
+ # Set the number of databases. The default database is DB 0, you can select
57
+ # a different one on a per-connection basis using SELECT <dbid> where
58
+ # dbid is a number between 0 and 'databases'-1
59
+ databases 16
60
+
61
+ ################################ SNAPSHOTTING #################################
62
+ #
63
+ # Save the DB on disk:
64
+ #
65
+ # save <seconds> <changes>
66
+ #
67
+ # Will save the DB if both the given number of seconds and the given
68
+ # number of write operations against the DB occurred.
69
+ #
70
+ # In the example below the behaviour will be to save:
71
+ # after 900 sec (15 min) if at least 1 key changed
72
+ # after 300 sec (5 min) if at least 10 keys changed
73
+ # after 60 sec if at least 10000 keys changed
74
+ #
75
+ # Note: you can disable saving at all commenting all the "save" lines.
76
+
77
+ save 900 1
78
+ save 300 10
79
+ save 60 10000
80
+
81
+ # Compress string objects using LZF when dump .rdb databases?
82
+ # For default that's set to 'yes' as it's almost always a win.
83
+ # If you want to save some CPU in the saving child set it to 'no' but
84
+ # the dataset will likely be bigger if you have compressible values or keys.
85
+ rdbcompression yes
86
+
87
+ # The filename where to dump the DB
88
+ dbfilename dump.rdb
89
+
90
+ # The working directory.
91
+ #
92
+ # The DB will be written inside this directory, with the filename specified
93
+ # above using the 'dbfilename' configuration directive.
94
+ #
95
+ # Also the Append Only File will be created inside this directory.
96
+ #
97
+ # Note that you must specify a directory here, not a file name.
98
+ dir <%= rubber_env.redis_db_dir %>
99
+
100
+ ################################# REPLICATION #################################
101
+
102
+ # Master-Slave replication. Use slaveof to make a Redis instance a copy of
103
+ # another Redis server. Note that the configuration is local to the slave
104
+ # so for example it is possible to configure the slave to save the DB with a
105
+ # different interval, or to listen to another port, and so on.
106
+ #
107
+ # slaveof <masterip> <masterport>
108
+
109
+ # If the master is password protected (using the "requirepass" configuration
110
+ # directive below) it is possible to tell the slave to authenticate before
111
+ # starting the replication synchronization process, otherwise the master will
112
+ # refuse the slave request.
113
+ #
114
+ # masterauth <master-password>
115
+
116
+ ################################## SECURITY ###################################
117
+
118
+ # Require clients to issue AUTH <PASSWORD> before processing any other
119
+ # commands. This might be useful in environments in which you do not trust
120
+ # others with access to the host running redis-server.
121
+ #
122
+ # This should stay commented out for backward compatibility and because most
123
+ # people do not need auth (e.g. they run their own servers).
124
+ #
125
+ # Warning: since Redis is pretty fast an outside user can try up to
126
+ # 150k passwords per second against a good box. This means that you should
127
+ # use a very strong password otherwise it will be very easy to break.
128
+ #
129
+ # requirepass foobared
130
+
131
+ ################################### LIMITS ####################################
132
+
133
+ # Set the max number of connected clients at the same time. By default there
134
+ # is no limit, and it's up to the number of file descriptors the Redis process
135
+ # is able to open. The special value '0' means no limits.
136
+ # Once the limit is reached Redis will close all the new connections sending
137
+ # an error 'max number of clients reached'.
138
+ #
139
+ # maxclients 128
140
+
141
+ # Don't use more memory than the specified amount of bytes.
142
+ # When the memory limit is reached Redis will try to remove keys with an
143
+ # EXPIRE set. It will try to start freeing keys that are going to expire
144
+ # in little time and preserve keys with a longer time to live.
145
+ # Redis will also try to remove objects from free lists if possible.
146
+ #
147
+ # If all this fails, Redis will start to reply with errors to commands
148
+ # that will use more memory, like SET, LPUSH, and so on, and will continue
149
+ # to reply to most read-only commands like GET.
150
+ #
151
+ # WARNING: maxmemory can be a good idea mainly if you want to use Redis as a
152
+ # 'state' server or cache, not as a real DB. When Redis is used as a real
153
+ # database the memory usage will grow over the weeks, it will be obvious if
154
+ # it is going to use too much memory in the long run, and you'll have the time
155
+ # to upgrade. With maxmemory after the limit is reached you'll start to get
156
+ # errors for write operations, and this may even lead to DB inconsistency.
157
+ #
158
+ # maxmemory <bytes>
159
+
160
+ ############################## APPEND ONLY MODE ###############################
161
+
162
+ # By default Redis asynchronously dumps the dataset on disk. If you can live
163
+ # with the idea that the latest records will be lost if something like a crash
164
+ # happens this is the preferred way to run Redis. If instead you care a lot
165
+ # about your data and don't want to that a single record can get lost you should
166
+ # enable the append only mode: when this mode is enabled Redis will append
167
+ # every write operation received in the file appendonly.aof. This file will
168
+ # be read on startup in order to rebuild the full dataset in memory.
169
+ #
170
+ # Note that you can have both the async dumps and the append only file if you
171
+ # like (you have to comment the "save" statements above to disable the dumps).
172
+ # Still if append only mode is enabled Redis will load the data from the
173
+ # log file at startup ignoring the dump.rdb file.
174
+ #
175
+ # IMPORTANT: Check the BGREWRITEAOF to check how to rewrite the append
176
+ # log file in background when it gets too big.
177
+
178
+ appendonly no
179
+
180
+ # The name of the append only file (default: "appendonly.aof")
181
+ # appendfilename appendonly.aof
182
+
183
+ # The fsync() call tells the Operating System to actually write data on disk
184
+ # instead to wait for more data in the output buffer. Some OS will really flush
185
+ # data on disk, some other OS will just try to do it ASAP.
186
+ #
187
+ # Redis supports three different modes:
188
+ #
189
+ # no: don't fsync, just let the OS flush the data when it wants. Faster.
190
+ # always: fsync after every write to the append only log . Slow, Safest.
191
+ # everysec: fsync only if one second passed since the last fsync. Compromise.
192
+ #
193
+ # The default is "everysec" that's usually the right compromise between
194
+ # speed and data safety. It's up to you to understand if you can relax this to
195
+ # "no" that will will let the operating system flush the output buffer when
196
+ # it wants, for better performances (but if you can live with the idea of
197
+ # some data loss consider the default persistence mode that's snapshotting),
198
+ # or on the contrary, use "always" that's very slow but a bit safer than
199
+ # everysec.
200
+ #
201
+ # If unsure, use "everysec".
202
+
203
+ # appendfsync always
204
+ appendfsync everysec
205
+ # appendfsync no
206
+
207
+ ################################ VIRTUAL MEMORY ###############################
208
+
209
+ # Virtual Memory allows Redis to work with datasets bigger than the actual
210
+ # amount of RAM needed to hold the whole dataset in memory.
211
+ # In order to do so very used keys are taken in memory while the other keys
212
+ # are swapped into a swap file, similarly to what operating systems do
213
+ # with memory pages.
214
+ #
215
+ # To enable VM just set 'vm-enabled' to yes, and set the following three
216
+ # VM parameters accordingly to your needs.
217
+
218
+ vm-enabled no
219
+
220
+ # This is the path of the Redis swap file. As you can guess, swap files
221
+ # can't be shared by different Redis instances, so make sure to use a swap
222
+ # file for every redis process you are running. Redis will complain if the
223
+ # swap file is already in use.
224
+ #
225
+ # The best kind of storage for the Redis swap file (that's accessed at random)
226
+ # is a Solid State Disk (SSD).
227
+ #
228
+ # *** WARNING *** if you are using a shared hosting the default of putting
229
+ # the swap file under /tmp is not secure. Create a dir with access granted
230
+ # only to Redis user and configure Redis to create the swap file there.
231
+ vm-swap-file <%= rubber_env.redis_db_dir %>/redis.swap
232
+
233
+ # vm-max-memory configures the VM to use at max the specified amount of
234
+ # RAM. Everything that deos not fit will be swapped on disk *if* possible, that
235
+ # is, if there is still enough contiguous space in the swap file.
236
+ #
237
+ # With vm-max-memory 0 the system will swap everything it can. Not a good
238
+ # default, just specify the max amount of RAM you can in bytes, but it's
239
+ # better to leave some margin. For instance specify an amount of RAM
240
+ # that's more or less between 60 and 80% of your free RAM.
241
+ vm-max-memory 0
242
+
243
+ # Redis swap files is split into pages. An object can be saved using multiple
244
+ # contiguous pages, but pages can't be shared between different objects.
245
+ # So if your page is too big, small objects swapped out on disk will waste
246
+ # a lot of space. If you page is too small, there is less space in the swap
247
+ # file (assuming you configured the same number of total swap file pages).
248
+ #
249
+ # If you use a lot of small objects, use a page size of 64 or 32 bytes.
250
+ # If you use a lot of big objects, use a bigger page size.
251
+ # If unsure, use the default :)
252
+ vm-page-size 32
253
+
254
+ # Number of total memory pages in the swap file.
255
+ # Given that the page table (a bitmap of free/used pages) is taken in memory,
256
+ # every 8 pages on disk will consume 1 byte of RAM.
257
+ #
258
+ # The total swap size is vm-page-size * vm-pages
259
+ #
260
+ # With the default of 32-bytes memory pages and 134217728 pages Redis will
261
+ # use a 4 GB swap file, that will use 16 MB of RAM for the page table.
262
+ #
263
+ # It's better to use the smallest acceptable value for your application,
264
+ # but the default is large in order to work in most conditions.
265
+ vm-pages 134217728
266
+
267
+ # Max number of VM I/O threads running at the same time.
268
+ # This threads are used to read/write data from/to swap file, since they
269
+ # also encode and decode objects from disk to memory or the reverse, a bigger
270
+ # number of threads can help with big objects even if they can't help with
271
+ # I/O itself as the physical device may not be able to couple with many
272
+ # reads/writes operations at the same time.
273
+ #
274
+ # The special value of 0 turn off threaded I/O and enables the blocking
275
+ # Virtual Memory implementation.
276
+ vm-max-threads 4
277
+
278
+ ############################### ADVANCED CONFIG ###############################
279
+
280
+ # Glue small output buffers together in order to send small replies in a
281
+ # single TCP packet. Uses a bit more CPU but most of the times it is a win
282
+ # in terms of number of queries per second. Use 'yes' if unsure.
283
+ glueoutputbuf yes
284
+
285
+ # Hashes are encoded in a special way (much more memory efficient) when they
286
+ # have at max a given numer of elements, and the biggest element does not
287
+ # exceed a given threshold. You can configure this limits with the following
288
+ # configuration directives.
289
+ hash-max-zipmap-entries 64
290
+ hash-max-zipmap-value 512
291
+
292
+ # Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
293
+ # order to help rehashing the main Redis hash table (the one mapping top-level
294
+ # keys to values). The hash table implementation redis uses (see dict.c)
295
+ # performs a lazy rehashing: the more operation you run into an hash table
296
+ # that is rhashing, the more rehashing "steps" are performed, so if the
297
+ # server is idle the rehashing is never complete and some more memory is used
298
+ # by the hash table.
299
+ #
300
+ # The default is to use this millisecond 10 times every second in order to
301
+ # active rehashing the main dictionaries, freeing memory when possible.
302
+ #
303
+ # If unsure:
304
+ # use "activerehashing no" if you have hard latency requirements and it is
305
+ # not a good thing in your environment that Redis can reply form time to time
306
+ # to queries with 2 milliseconds delay.
307
+ #
308
+ # use "activerehashing yes" if you don't have such hard requirements but
309
+ # want to free memory asap when possible.
310
+ activerehashing yes
311
+
312
+ ################################## INCLUDES ###################################
313
+
314
+ # Include one or more other config files here. This is useful if you
315
+ # have a standard template that goes to all redis server but also need
316
+ # to customize a few per-server settings. Include files can include
317
+ # other files, so use this wisely.
318
+ #
319
+ # include /path/to/local.conf
320
+ # include /path/to/other.conf