rubber-jcarnegie 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +477 -0
- data/COPYING +339 -0
- data/README +6 -0
- data/TODO +11 -0
- data/VERSION +1 -0
- data/bin/vulcanize +25 -0
- data/generators/vulcanize/USAGE +6 -0
- data/generators/vulcanize/templates/apache/config/rubber/deploy-apache.rb +51 -0
- data/generators/vulcanize/templates/apache/config/rubber/role/apache/deflate.conf +10 -0
- data/generators/vulcanize/templates/apache/config/rubber/role/apache/expires.conf +9 -0
- data/generators/vulcanize/templates/apache/config/rubber/role/apache/headers.conf +6 -0
- data/generators/vulcanize/templates/apache/config/rubber/role/apache/monit-apache.conf +8 -0
- data/generators/vulcanize/templates/apache/config/rubber/role/apache/ports.conf +8 -0
- data/generators/vulcanize/templates/apache/config/rubber/role/apache/setenvif.conf +52 -0
- data/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-apache-vhost.conf +79 -0
- data/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-apache.auth +7 -0
- data/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-index.html +34 -0
- data/generators/vulcanize/templates/apache/config/rubber/rubber-apache.yml +6 -0
- data/generators/vulcanize/templates/apache/templates.yml +1 -0
- data/generators/vulcanize/templates/base/Capfile +14 -0
- data/generators/vulcanize/templates/base/Rakefile +23 -0
- data/generators/vulcanize/templates/base/config/deploy.rb +56 -0
- data/generators/vulcanize/templates/base/config/rubber/common/crontab +22 -0
- data/generators/vulcanize/templates/base/config/rubber/common/monit-postfix.conf +8 -0
- data/generators/vulcanize/templates/base/config/rubber/common/rubber.profile +13 -0
- data/generators/vulcanize/templates/base/config/rubber/deploy-setup.rb +92 -0
- data/generators/vulcanize/templates/base/config/rubber/deploy-util.rb +97 -0
- data/generators/vulcanize/templates/base/config/rubber/rubber-dns.yml +78 -0
- data/generators/vulcanize/templates/base/config/rubber/rubber-rvm.yml +33 -0
- data/generators/vulcanize/templates/base/config/rubber/rubber.yml +241 -0
- data/generators/vulcanize/templates/base/lib/tasks/rubber.rake +15 -0
- data/generators/vulcanize/templates/base/script/cron-rake +18 -0
- data/generators/vulcanize/templates/base/script/cron-runner +18 -0
- data/generators/vulcanize/templates/base/script/cron-sh +67 -0
- data/generators/vulcanize/templates/base/templates.rb +11 -0
- data/generators/vulcanize/templates/base/templates.yml +6 -0
- data/generators/vulcanize/templates/cassandra/config/rubber/deploy-cassandra.rb +88 -0
- data/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/cassandra.in.sh +60 -0
- data/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/cassandra.yaml +210 -0
- data/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/log4j-server.properties +45 -0
- data/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/monit-cassandra.conf +8 -0
- data/generators/vulcanize/templates/cassandra/config/rubber/rubber-cassandra.yml +18 -0
- data/generators/vulcanize/templates/cassandra/templates.yml +1 -0
- data/generators/vulcanize/templates/complete_mongrel_mysql/config/rubber/role/haproxy/haproxy-mongrel.conf +23 -0
- data/generators/vulcanize/templates/complete_mongrel_mysql/config/rubber/role/nginx/nginx-mongrel.conf +113 -0
- data/generators/vulcanize/templates/complete_mongrel_mysql/config/rubber/rubber-complete.yml +41 -0
- data/generators/vulcanize/templates/complete_mongrel_mysql/templates.yml +6 -0
- data/generators/vulcanize/templates/complete_passenger/config/rubber/role/haproxy/haproxy-passenger.conf +21 -0
- data/generators/vulcanize/templates/complete_passenger/config/rubber/rubber-complete.yml +40 -0
- data/generators/vulcanize/templates/complete_passenger/templates.rb +9 -0
- data/generators/vulcanize/templates/complete_passenger/templates.yml +9 -0
- data/generators/vulcanize/templates/complete_passenger_mysql/templates.yml +4 -0
- data/generators/vulcanize/templates/complete_passenger_postgresql/templates.yml +4 -0
- data/generators/vulcanize/templates/cruise/config/rubber/deploy-cruise.rb +72 -0
- data/generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise +40 -0
- data/generators/vulcanize/templates/cruise/config/rubber/role/cruise/my.cnf +165 -0
- data/generators/vulcanize/templates/cruise/config/rubber/role/cruise/production.rb +8 -0
- data/generators/vulcanize/templates/cruise/config/rubber/role/cruise/site_config.rb +76 -0
- data/generators/vulcanize/templates/cruise/config/rubber/role/web_tools/cruise-nginx.conf +11 -0
- data/generators/vulcanize/templates/cruise/config/rubber/rubber-cruise.yml +18 -0
- data/generators/vulcanize/templates/cruise/templates.yml +1 -0
- data/generators/vulcanize/templates/haproxy/config/rubber/deploy-haproxy.rb +45 -0
- data/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/haproxy-base.conf +26 -0
- data/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/haproxy-default.conf +8 -0
- data/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/monit-haproxy.conf +9 -0
- data/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/syslog-haproxy.conf +11 -0
- data/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/syslogd-default.conf +21 -0
- data/generators/vulcanize/templates/haproxy/config/rubber/role/web_tools/haproxy-nginx.conf +10 -0
- data/generators/vulcanize/templates/haproxy/config/rubber/rubber-haproxy.yml +7 -0
- data/generators/vulcanize/templates/haproxy/templates.yml +1 -0
- data/generators/vulcanize/templates/jetty/config/rubber/deploy-jetty.rb +59 -0
- data/generators/vulcanize/templates/jetty/config/rubber/role/jetty/jetty.sh +589 -0
- data/generators/vulcanize/templates/jetty/config/rubber/role/jetty/jetty.xml +199 -0
- data/generators/vulcanize/templates/jetty/config/rubber/role/jetty/monit-jetty.conf +9 -0
- data/generators/vulcanize/templates/jetty/config/rubber/rubber-jetty.yml +10 -0
- data/generators/vulcanize/templates/jetty/templates.yml +1 -0
- data/generators/vulcanize/templates/memcached/config/memcached.yml +28 -0
- data/generators/vulcanize/templates/memcached/config/rubber/common/memcached.yml +14 -0
- data/generators/vulcanize/templates/memcached/config/rubber/role/memcached/memcached.conf +52 -0
- data/generators/vulcanize/templates/memcached/config/rubber/role/memcached/memcached_munin_plugin +249 -0
- data/generators/vulcanize/templates/memcached/config/rubber/rubber-memcached.yml +7 -0
- data/generators/vulcanize/templates/memcached/templates.yml +1 -0
- data/generators/vulcanize/templates/minimal_mysql/templates.yml +7 -0
- data/generators/vulcanize/templates/minimal_nodb/templates.yml +6 -0
- data/generators/vulcanize/templates/mongrel/config/rubber/deploy-mongrel.rb +75 -0
- data/generators/vulcanize/templates/mongrel/config/rubber/role/mongrel/mongrel_cluster.yml +12 -0
- data/generators/vulcanize/templates/mongrel/config/rubber/role/mongrel/monit-mongrel.conf +20 -0
- data/generators/vulcanize/templates/mongrel/config/rubber/rubber-mongrel.yml +9 -0
- data/generators/vulcanize/templates/mongrel/templates.yml +1 -0
- data/generators/vulcanize/templates/monit/config/rubber/common/monit-default.conf +15 -0
- data/generators/vulcanize/templates/monit/config/rubber/common/monit.conf +252 -0
- data/generators/vulcanize/templates/monit/config/rubber/deploy-monit.rb +33 -0
- data/generators/vulcanize/templates/monit/config/rubber/role/web_tools/monit-admin-nginx.conf +10 -0
- data/generators/vulcanize/templates/monit/config/rubber/rubber-monit.yml +6 -0
- data/generators/vulcanize/templates/monit/templates.yml +1 -0
- data/generators/vulcanize/templates/munin/config/rubber/common/monit-munin.conf +8 -0
- data/generators/vulcanize/templates/munin/config/rubber/common/munin-node.conf +48 -0
- data/generators/vulcanize/templates/munin/config/rubber/common/munin-plugins.conf +11 -0
- data/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb +46 -0
- data/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin-nginx.conf +8 -0
- data/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin-plugins.conf +31 -0
- data/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin.conf +115 -0
- data/generators/vulcanize/templates/munin/config/rubber/rubber-munin.yml +8 -0
- data/generators/vulcanize/templates/munin/script/munin/example_mysql_query.rb +55 -0
- data/generators/vulcanize/templates/munin/script/munin/example_simple.rb +24 -0
- data/generators/vulcanize/templates/munin/templates.yml +1 -0
- data/generators/vulcanize/templates/mysql/config/rubber/common/database.yml +12 -0
- data/generators/vulcanize/templates/mysql/config/rubber/deploy-mysql.rb +169 -0
- data/generators/vulcanize/templates/mysql/config/rubber/role/db/apparmor-mysql.conf +46 -0
- data/generators/vulcanize/templates/mysql/config/rubber/role/db/crontab +14 -0
- data/generators/vulcanize/templates/mysql/config/rubber/role/db/monit-mysql.cnf +10 -0
- data/generators/vulcanize/templates/mysql/config/rubber/role/db/my.cnf +163 -0
- data/generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin +51 -0
- data/generators/vulcanize/templates/mysql/config/rubber/rubber-mysql.yml +47 -0
- data/generators/vulcanize/templates/mysql/templates.yml +1 -0
- data/generators/vulcanize/templates/mysql_cluster/config/rubber/common/mysql_cluster_migrations.rb +13 -0
- data/generators/vulcanize/templates/mysql_cluster/config/rubber/deploy-mysql_cluster.rb +177 -0
- data/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_data/my.cnf +15 -0
- data/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_mgm/ndb_mgmd.cnf +39 -0
- data/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_sql/monit-mysql_cluster_sql.cnf +10 -0
- data/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_sql/my.cnf +23 -0
- data/generators/vulcanize/templates/mysql_cluster/config/rubber/rubber-mysql_cluster.yml +32 -0
- data/generators/vulcanize/templates/mysql_cluster/templates.yml +1 -0
- data/generators/vulcanize/templates/mysql_proxy/config/rubber/common/database.yml +16 -0
- data/generators/vulcanize/templates/mysql_proxy/config/rubber/common/monit-mysql_proxy.cnf +10 -0
- data/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy +153 -0
- data/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy.conf +10 -0
- data/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy.lua +5 -0
- data/generators/vulcanize/templates/mysql_proxy/config/rubber/deploy-mysql_proxy.rb +52 -0
- data/generators/vulcanize/templates/mysql_proxy/config/rubber/rubber-mysql_proxy.yml +11 -0
- data/generators/vulcanize/templates/mysql_proxy/templates.yml +1 -0
- data/generators/vulcanize/templates/nginx/config/rubber/deploy-nginx.rb +45 -0
- data/generators/vulcanize/templates/nginx/config/rubber/role/nginx/crontab +9 -0
- data/generators/vulcanize/templates/nginx/config/rubber/role/nginx/monit-nginx.conf +8 -0
- data/generators/vulcanize/templates/nginx/config/rubber/role/nginx/nginx.conf +42 -0
- data/generators/vulcanize/templates/nginx/config/rubber/role/web_tools/nginx-tools.conf +55 -0
- data/generators/vulcanize/templates/nginx/config/rubber/role/web_tools/tools-index.html +30 -0
- data/generators/vulcanize/templates/nginx/config/rubber/role/web_tools/tools-nginx.auth +7 -0
- data/generators/vulcanize/templates/nginx/config/rubber/rubber-nginx.yml +10 -0
- data/generators/vulcanize/templates/nginx/templates.yml +1 -0
- data/generators/vulcanize/templates/node/INSTALL_NOTES +20 -0
- data/generators/vulcanize/templates/node/config/rubber/deploy-node.rb +33 -0
- data/generators/vulcanize/templates/node/config/rubber/rubber-node.yml +1 -0
- data/generators/vulcanize/templates/passenger/config/rubber/deploy-passenger.rb +45 -0
- data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger-memory.conf +34 -0
- data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger-sudoers.conf +8 -0
- data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger.conf +47 -0
- data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf +48 -0
- data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger.conf +41 -0
- data/generators/vulcanize/templates/passenger/config/rubber/rubber-passenger.yml +15 -0
- data/generators/vulcanize/templates/passenger/templates.yml +3 -0
- data/generators/vulcanize/templates/postgresql/config/rubber/common/database.yml +12 -0
- data/generators/vulcanize/templates/postgresql/config/rubber/deploy-postgresql.rb +158 -0
- data/generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab +14 -0
- data/generators/vulcanize/templates/postgresql/config/rubber/role/db/monit-postgresql.conf +10 -0
- data/generators/vulcanize/templates/postgresql/config/rubber/role/db/munin-postgresql.conf +7 -0
- data/generators/vulcanize/templates/postgresql/config/rubber/role/db/pg_hba.conf +89 -0
- data/generators/vulcanize/templates/postgresql/config/rubber/role/db/postgresql-sysctl.conf +6 -0
- data/generators/vulcanize/templates/postgresql/config/rubber/role/db/postgresql.conf +531 -0
- data/generators/vulcanize/templates/postgresql/config/rubber/rubber-postgresql.yml +45 -0
- data/generators/vulcanize/templates/postgresql/templates.yml +1 -0
- data/generators/vulcanize/templates/redis/config/rubber/deploy-redis.rb +76 -0
- data/generators/vulcanize/templates/redis/config/rubber/role/redis/crontab +8 -0
- data/generators/vulcanize/templates/redis/config/rubber/role/redis/monit-redis.conf +9 -0
- data/generators/vulcanize/templates/redis/config/rubber/role/redis/redis.conf +320 -0
- data/generators/vulcanize/templates/redis/config/rubber/rubber-redis.yml +9 -0
- data/generators/vulcanize/templates/redis/templates.yml +1 -0
- data/generators/vulcanize/templates/resque/config/initializers/resque.rb +15 -0
- data/generators/vulcanize/templates/resque/config/rubber/common/resque.yml +5 -0
- data/generators/vulcanize/templates/resque/config/rubber/deploy-resque.rb +58 -0
- data/generators/vulcanize/templates/resque/config/rubber/role/resque_web/monit-resque_web.conf +14 -0
- data/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf +19 -0
- data/generators/vulcanize/templates/resque/config/rubber/rubber-resque.yml +18 -0
- data/generators/vulcanize/templates/resque/script/resque_worker_management.rb +144 -0
- data/generators/vulcanize/templates/resque/templates.rb +1 -0
- data/generators/vulcanize/templates/resque/templates.yml +3 -0
- data/generators/vulcanize/templates/sphinx/config/rubber/common/sphinx.yml +46 -0
- data/generators/vulcanize/templates/sphinx/config/rubber/deploy-sphinx.rb +112 -0
- data/generators/vulcanize/templates/sphinx/config/rubber/role/sphinx/crontab +11 -0
- data/generators/vulcanize/templates/sphinx/config/rubber/role/sphinx/monit-sphinx.conf +13 -0
- data/generators/vulcanize/templates/sphinx/config/rubber/rubber-sphinx.yml +6 -0
- data/generators/vulcanize/templates/sphinx/templates.yml +1 -0
- data/generators/vulcanize/vulcanize_generator.rb +184 -0
- data/lib/capistrano/hostcmd.rb +12 -0
- data/lib/generators/vulcanize/USAGE +6 -0
- data/lib/generators/vulcanize/templates/apache/config/rubber/deploy-apache.rb +51 -0
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/deflate.conf +10 -0
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/expires.conf +9 -0
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/headers.conf +6 -0
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/monit-apache.conf +8 -0
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/ports.conf +8 -0
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/setenvif.conf +52 -0
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-apache-vhost.conf +79 -0
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-apache.auth +7 -0
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-index.html +34 -0
- data/lib/generators/vulcanize/templates/apache/config/rubber/rubber-apache.yml +6 -0
- data/lib/generators/vulcanize/templates/apache/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/base/Capfile +14 -0
- data/lib/generators/vulcanize/templates/base/Rakefile +23 -0
- data/lib/generators/vulcanize/templates/base/config/deploy.rb +56 -0
- data/lib/generators/vulcanize/templates/base/config/rubber/common/crontab +22 -0
- data/lib/generators/vulcanize/templates/base/config/rubber/common/monit-postfix.conf +8 -0
- data/lib/generators/vulcanize/templates/base/config/rubber/common/rubber.profile +13 -0
- data/lib/generators/vulcanize/templates/base/config/rubber/deploy-setup.rb +92 -0
- data/lib/generators/vulcanize/templates/base/config/rubber/deploy-util.rb +97 -0
- data/lib/generators/vulcanize/templates/base/config/rubber/rubber-dns.yml +78 -0
- data/lib/generators/vulcanize/templates/base/config/rubber/rubber-rvm.yml +33 -0
- data/lib/generators/vulcanize/templates/base/config/rubber/rubber.yml +241 -0
- data/lib/generators/vulcanize/templates/base/lib/tasks/rubber.rake +15 -0
- data/lib/generators/vulcanize/templates/base/script/cron-rake +18 -0
- data/lib/generators/vulcanize/templates/base/script/cron-runner +18 -0
- data/lib/generators/vulcanize/templates/base/script/cron-sh +67 -0
- data/lib/generators/vulcanize/templates/base/templates.rb +11 -0
- data/lib/generators/vulcanize/templates/base/templates.yml +6 -0
- data/lib/generators/vulcanize/templates/cassandra/config/rubber/deploy-cassandra.rb +88 -0
- data/lib/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/cassandra.in.sh +60 -0
- data/lib/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/cassandra.yaml +210 -0
- data/lib/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/log4j-server.properties +45 -0
- data/lib/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/monit-cassandra.conf +8 -0
- data/lib/generators/vulcanize/templates/cassandra/config/rubber/rubber-cassandra.yml +18 -0
- data/lib/generators/vulcanize/templates/cassandra/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/complete_mongrel_mysql/config/rubber/role/haproxy/haproxy-mongrel.conf +23 -0
- data/lib/generators/vulcanize/templates/complete_mongrel_mysql/config/rubber/role/nginx/nginx-mongrel.conf +113 -0
- data/lib/generators/vulcanize/templates/complete_mongrel_mysql/config/rubber/rubber-complete.yml +41 -0
- data/lib/generators/vulcanize/templates/complete_mongrel_mysql/templates.yml +6 -0
- data/lib/generators/vulcanize/templates/complete_passenger/config/rubber/role/haproxy/haproxy-passenger.conf +21 -0
- data/lib/generators/vulcanize/templates/complete_passenger/config/rubber/rubber-complete.yml +40 -0
- data/lib/generators/vulcanize/templates/complete_passenger/templates.rb +9 -0
- data/lib/generators/vulcanize/templates/complete_passenger/templates.yml +9 -0
- data/lib/generators/vulcanize/templates/complete_passenger_mysql/templates.yml +4 -0
- data/lib/generators/vulcanize/templates/complete_passenger_postgresql/templates.yml +4 -0
- data/lib/generators/vulcanize/templates/cruise/config/rubber/deploy-cruise.rb +72 -0
- data/lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise +40 -0
- data/lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/my.cnf +165 -0
- data/lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/production.rb +8 -0
- data/lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/site_config.rb +76 -0
- data/lib/generators/vulcanize/templates/cruise/config/rubber/role/web_tools/cruise-nginx.conf +11 -0
- data/lib/generators/vulcanize/templates/cruise/config/rubber/rubber-cruise.yml +18 -0
- data/lib/generators/vulcanize/templates/cruise/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/deploy-haproxy.rb +45 -0
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/haproxy-base.conf +26 -0
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/haproxy-default.conf +8 -0
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/monit-haproxy.conf +9 -0
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/syslog-haproxy.conf +11 -0
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/syslogd-default.conf +21 -0
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/web_tools/haproxy-nginx.conf +10 -0
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/rubber-haproxy.yml +7 -0
- data/lib/generators/vulcanize/templates/haproxy/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/jetty/config/rubber/deploy-jetty.rb +59 -0
- data/lib/generators/vulcanize/templates/jetty/config/rubber/role/jetty/jetty.sh +589 -0
- data/lib/generators/vulcanize/templates/jetty/config/rubber/role/jetty/jetty.xml +199 -0
- data/lib/generators/vulcanize/templates/jetty/config/rubber/role/jetty/monit-jetty.conf +9 -0
- data/lib/generators/vulcanize/templates/jetty/config/rubber/rubber-jetty.yml +10 -0
- data/lib/generators/vulcanize/templates/jetty/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/memcached/config/memcached.yml +28 -0
- data/lib/generators/vulcanize/templates/memcached/config/rubber/common/memcached.yml +14 -0
- data/lib/generators/vulcanize/templates/memcached/config/rubber/role/memcached/memcached.conf +52 -0
- data/lib/generators/vulcanize/templates/memcached/config/rubber/role/memcached/memcached_munin_plugin +249 -0
- data/lib/generators/vulcanize/templates/memcached/config/rubber/rubber-memcached.yml +7 -0
- data/lib/generators/vulcanize/templates/memcached/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/minimal_mysql/templates.yml +7 -0
- data/lib/generators/vulcanize/templates/minimal_nodb/templates.yml +6 -0
- data/lib/generators/vulcanize/templates/mongrel/config/rubber/deploy-mongrel.rb +75 -0
- data/lib/generators/vulcanize/templates/mongrel/config/rubber/role/mongrel/mongrel_cluster.yml +12 -0
- data/lib/generators/vulcanize/templates/mongrel/config/rubber/role/mongrel/monit-mongrel.conf +20 -0
- data/lib/generators/vulcanize/templates/mongrel/config/rubber/rubber-mongrel.yml +9 -0
- data/lib/generators/vulcanize/templates/mongrel/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/monit/config/rubber/common/monit-default.conf +15 -0
- data/lib/generators/vulcanize/templates/monit/config/rubber/common/monit.conf +252 -0
- data/lib/generators/vulcanize/templates/monit/config/rubber/deploy-monit.rb +33 -0
- data/lib/generators/vulcanize/templates/monit/config/rubber/role/web_tools/monit-admin-nginx.conf +10 -0
- data/lib/generators/vulcanize/templates/monit/config/rubber/rubber-monit.yml +6 -0
- data/lib/generators/vulcanize/templates/monit/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/munin/config/rubber/common/monit-munin.conf +8 -0
- data/lib/generators/vulcanize/templates/munin/config/rubber/common/munin-node.conf +48 -0
- data/lib/generators/vulcanize/templates/munin/config/rubber/common/munin-plugins.conf +11 -0
- data/lib/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb +46 -0
- data/lib/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin-nginx.conf +8 -0
- data/lib/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin-plugins.conf +31 -0
- data/lib/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin.conf +115 -0
- data/lib/generators/vulcanize/templates/munin/config/rubber/rubber-munin.yml +8 -0
- data/lib/generators/vulcanize/templates/munin/script/munin/example_mysql_query.rb +55 -0
- data/lib/generators/vulcanize/templates/munin/script/munin/example_simple.rb +24 -0
- data/lib/generators/vulcanize/templates/munin/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/mysql/config/rubber/common/database.yml +12 -0
- data/lib/generators/vulcanize/templates/mysql/config/rubber/deploy-mysql.rb +169 -0
- data/lib/generators/vulcanize/templates/mysql/config/rubber/role/db/apparmor-mysql.conf +46 -0
- data/lib/generators/vulcanize/templates/mysql/config/rubber/role/db/crontab +14 -0
- data/lib/generators/vulcanize/templates/mysql/config/rubber/role/db/monit-mysql.cnf +10 -0
- data/lib/generators/vulcanize/templates/mysql/config/rubber/role/db/my.cnf +163 -0
- data/lib/generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin +51 -0
- data/lib/generators/vulcanize/templates/mysql/config/rubber/rubber-mysql.yml +47 -0
- data/lib/generators/vulcanize/templates/mysql/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/common/mysql_cluster_migrations.rb +13 -0
- data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/deploy-mysql_cluster.rb +177 -0
- data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_data/my.cnf +15 -0
- data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_mgm/ndb_mgmd.cnf +39 -0
- data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_sql/monit-mysql_cluster_sql.cnf +10 -0
- data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_sql/my.cnf +23 -0
- data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/rubber-mysql_cluster.yml +32 -0
- data/lib/generators/vulcanize/templates/mysql_cluster/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/database.yml +16 -0
- data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/monit-mysql_proxy.cnf +10 -0
- data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy +153 -0
- data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy.conf +10 -0
- data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy.lua +5 -0
- data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/deploy-mysql_proxy.rb +52 -0
- data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/rubber-mysql_proxy.yml +11 -0
- data/lib/generators/vulcanize/templates/mysql_proxy/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/nginx/config/rubber/deploy-nginx.rb +45 -0
- data/lib/generators/vulcanize/templates/nginx/config/rubber/role/nginx/crontab +9 -0
- data/lib/generators/vulcanize/templates/nginx/config/rubber/role/nginx/monit-nginx.conf +8 -0
- data/lib/generators/vulcanize/templates/nginx/config/rubber/role/nginx/nginx.conf +42 -0
- data/lib/generators/vulcanize/templates/nginx/config/rubber/role/web_tools/nginx-tools.conf +55 -0
- data/lib/generators/vulcanize/templates/nginx/config/rubber/role/web_tools/tools-index.html +30 -0
- data/lib/generators/vulcanize/templates/nginx/config/rubber/role/web_tools/tools-nginx.auth +7 -0
- data/lib/generators/vulcanize/templates/nginx/config/rubber/rubber-nginx.yml +10 -0
- data/lib/generators/vulcanize/templates/nginx/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/passenger/config/rubber/deploy-passenger.rb +45 -0
- data/lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger-memory.conf +34 -0
- data/lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger-sudoers.conf +8 -0
- data/lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger.conf +47 -0
- data/lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf +48 -0
- data/lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger.conf +41 -0
- data/lib/generators/vulcanize/templates/passenger/config/rubber/rubber-passenger.yml +15 -0
- data/lib/generators/vulcanize/templates/passenger/templates.yml +3 -0
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/common/database.yml +12 -0
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/deploy-postgresql.rb +158 -0
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab +14 -0
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/monit-postgresql.conf +10 -0
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/munin-postgresql.conf +7 -0
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/pg_hba.conf +89 -0
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/postgresql-sysctl.conf +6 -0
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/postgresql.conf +531 -0
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/rubber-postgresql.yml +45 -0
- data/lib/generators/vulcanize/templates/postgresql/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/redis/config/rubber/deploy-redis.rb +76 -0
- data/lib/generators/vulcanize/templates/redis/config/rubber/role/redis/crontab +8 -0
- data/lib/generators/vulcanize/templates/redis/config/rubber/role/redis/monit-redis.conf +9 -0
- data/lib/generators/vulcanize/templates/redis/config/rubber/role/redis/redis.conf +320 -0
- data/lib/generators/vulcanize/templates/redis/config/rubber/rubber-redis.yml +9 -0
- data/lib/generators/vulcanize/templates/redis/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/resque/config/initializers/resque.rb +15 -0
- data/lib/generators/vulcanize/templates/resque/config/rubber/common/resque.yml +5 -0
- data/lib/generators/vulcanize/templates/resque/config/rubber/deploy-resque.rb +58 -0
- data/lib/generators/vulcanize/templates/resque/config/rubber/role/resque_web/monit-resque_web.conf +14 -0
- data/lib/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf +19 -0
- data/lib/generators/vulcanize/templates/resque/config/rubber/rubber-resque.yml +18 -0
- data/lib/generators/vulcanize/templates/resque/script/resque_worker_management.rb +144 -0
- data/lib/generators/vulcanize/templates/resque/templates.rb +1 -0
- data/lib/generators/vulcanize/templates/resque/templates.yml +3 -0
- data/lib/generators/vulcanize/templates/sphinx/config/rubber/common/sphinx.yml +46 -0
- data/lib/generators/vulcanize/templates/sphinx/config/rubber/deploy-sphinx.rb +112 -0
- data/lib/generators/vulcanize/templates/sphinx/config/rubber/role/sphinx/crontab +11 -0
- data/lib/generators/vulcanize/templates/sphinx/config/rubber/role/sphinx/monit-sphinx.conf +13 -0
- data/lib/generators/vulcanize/templates/sphinx/config/rubber/rubber-sphinx.yml +6 -0
- data/lib/generators/vulcanize/templates/sphinx/templates.yml +1 -0
- data/lib/generators/vulcanize/vulcanize_generator.rb +184 -0
- data/lib/rubber.rb +76 -0
- data/lib/rubber/capistrano.rb +1 -0
- data/lib/rubber/cloud.rb +13 -0
- data/lib/rubber/cloud/aws.rb +362 -0
- data/lib/rubber/cloud/base.rb +16 -0
- data/lib/rubber/configuration.rb +47 -0
- data/lib/rubber/dns.rb +13 -0
- data/lib/rubber/dns/base.rb +84 -0
- data/lib/rubber/dns/dyndns.rb +77 -0
- data/lib/rubber/dns/nettica.rb +117 -0
- data/lib/rubber/dns/zerigo.rb +115 -0
- data/lib/rubber/environment.rb +177 -0
- data/lib/rubber/generator.rb +209 -0
- data/lib/rubber/instance.rb +176 -0
- data/lib/rubber/railtie.rb +14 -0
- data/lib/rubber/recipes/rubber.rb +96 -0
- data/lib/rubber/recipes/rubber/bundles.rb +30 -0
- data/lib/rubber/recipes/rubber/deploy.rb +90 -0
- data/lib/rubber/recipes/rubber/instances.rb +453 -0
- data/lib/rubber/recipes/rubber/load_balancers.rb +44 -0
- data/lib/rubber/recipes/rubber/security_groups.rb +189 -0
- data/lib/rubber/recipes/rubber/setup.rb +534 -0
- data/lib/rubber/recipes/rubber/spot_requests.rb +23 -0
- data/lib/rubber/recipes/rubber/static_ips.rb +190 -0
- data/lib/rubber/recipes/rubber/tags.rb +12 -0
- data/lib/rubber/recipes/rubber/utils.rb +226 -0
- data/lib/rubber/recipes/rubber/volumes.rb +265 -0
- data/lib/rubber/tag.rb +16 -0
- data/lib/rubber/tasks/rubber.rb +279 -0
- data/lib/rubber/util.rb +72 -0
- data/rails/init.rb +6 -0
- data/test/environment_test.rb +144 -0
- data/test/generator_test.rb +370 -0
- data/test/instance_test.rb +96 -0
- data/test/test_helper.rb +14 -0
- data/test/util_test.rb +19 -0
- data/test/zerigo_test.rb +88 -0
- 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
|