rubber 1.15.0 → 2.0.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +10 -0
- data/CHANGELOG +68 -1
- data/Gemfile +4 -0
- data/{COPYING → LICENSE} +0 -0
- data/Rakefile +89 -0
- data/bin/rubber +17 -0
- data/lib/rubber.rb +12 -6
- data/lib/rubber/cli.rb +30 -0
- data/lib/rubber/cloud.rb +2 -1
- data/lib/rubber/cloud/aws.rb +58 -298
- data/lib/rubber/cloud/aws_table_store.rb +127 -0
- data/lib/rubber/cloud/fog.rb +313 -0
- data/lib/rubber/cloud/fog_storage.rb +143 -0
- data/lib/rubber/commands/config.rb +70 -0
- data/lib/rubber/commands/cron.rb +127 -0
- data/lib/rubber/commands/util.rb +308 -0
- data/lib/rubber/commands/vulcanize.rb +197 -0
- data/lib/rubber/configuration.rb +20 -9
- data/lib/rubber/dns.rb +2 -1
- data/lib/rubber/dns/base.rb +6 -8
- data/lib/rubber/dns/fog.rb +117 -0
- data/lib/rubber/dns/nettica.rb +6 -1
- data/lib/rubber/dns/zerigo.rb +8 -103
- data/lib/rubber/environment.rb +25 -6
- data/lib/rubber/generator.rb +2 -0
- data/lib/rubber/instance.rb +121 -19
- data/lib/rubber/recipes/rubber.rb +3 -4
- data/lib/rubber/recipes/rubber/deploy.rb +12 -12
- data/lib/rubber/recipes/rubber/instances.rb +30 -31
- data/lib/rubber/recipes/rubber/security_groups.rb +2 -2
- data/lib/rubber/recipes/rubber/setup.rb +139 -42
- data/lib/rubber/recipes/rubber/utils.rb +12 -7
- data/lib/rubber/recipes/rubber/volumes.rb +2 -2
- data/lib/rubber/tag.rb +3 -8
- data/lib/rubber/util.rb +43 -22
- data/lib/rubber/version.rb +4 -0
- data/rubber.gemspec +44 -0
- data/{generators/vulcanize/templates → templates}/apache/config/rubber/deploy-apache.rb +2 -2
- data/{generators/vulcanize/templates → templates}/apache/config/rubber/role/apache/deflate.conf +0 -0
- data/{generators/vulcanize/templates → templates}/apache/config/rubber/role/apache/expires.conf +0 -0
- data/{generators/vulcanize/templates → templates}/apache/config/rubber/role/apache/headers.conf +0 -0
- data/{generators/vulcanize/templates → templates}/apache/config/rubber/role/apache/ports.conf +0 -0
- data/{generators/vulcanize/templates → templates}/apache/config/rubber/role/apache/setenvif.conf +0 -0
- data/{generators/vulcanize/templates → templates}/apache/config/rubber/role/web_tools/tools-apache-vhost.conf +51 -23
- data/{lib/generators/vulcanize/templates → templates}/apache/config/rubber/role/web_tools/tools-apache.auth +1 -1
- data/templates/apache/config/rubber/role/web_tools/tools-index.html +38 -0
- data/{generators/vulcanize/templates → templates}/apache/config/rubber/rubber-apache.yml +0 -0
- data/{generators/vulcanize/templates → templates}/apache/templates.yml +0 -0
- data/{lib/generators/vulcanize/templates → templates}/base/Capfile +6 -0
- data/{lib/generators/vulcanize/templates → templates}/base/config/deploy.rb +13 -3
- data/templates/base/config/rubber/common/crontab +21 -0
- data/{generators/vulcanize/templates → templates}/base/config/rubber/common/rsyslog.conf +0 -0
- data/{generators/vulcanize/templates → templates}/base/config/rubber/common/rubber.profile +4 -4
- data/{lib/generators/vulcanize/templates → templates}/base/config/rubber/deploy-setup.rb +1 -1
- data/{lib/generators/vulcanize/templates → templates}/base/config/rubber/deploy-util.rb +17 -23
- data/{lib/generators/vulcanize/templates → templates}/base/config/rubber/rubber-dns.yml +7 -0
- data/{lib/generators/vulcanize/templates → templates}/base/config/rubber/rubber-rvm.yml +6 -6
- data/{lib/generators/vulcanize/templates → templates}/base/config/rubber/rubber.yml +54 -20
- data/templates/base/script/rubber +8 -0
- data/templates/base/templates.rb +7 -0
- data/templates/base/templates.yml +1 -0
- data/{lib/generators/vulcanize/templates → templates}/cassandra/config/rubber/deploy-cassandra.rb +1 -1
- data/{generators/vulcanize/templates → templates}/cassandra/config/rubber/role/cassandra/cassandra.in.sh +0 -0
- data/{generators/vulcanize/templates → templates}/cassandra/config/rubber/role/cassandra/cassandra.yaml +0 -0
- data/{generators/vulcanize/templates → templates}/cassandra/config/rubber/role/cassandra/log4j-server.properties +0 -0
- data/{generators/vulcanize/templates → templates}/cassandra/config/rubber/rubber-cassandra.yml +0 -0
- data/{generators/vulcanize/templates → templates}/cassandra/templates.yml +0 -0
- data/templates/collectd/config/rubber/deploy-collectd.rb +48 -0
- data/templates/collectd/config/rubber/role/collectd/collectd.conf +69 -0
- data/templates/collectd/config/rubber/role/collectd/filters.conf +35 -0
- data/templates/collectd/config/rubber/role/collectd/thresholds.conf +76 -0
- data/templates/collectd/config/rubber/role/collectd/types.db +5 -0
- data/templates/collectd/config/rubber/role/passenger/collectd-passenger.conf +7 -0
- data/templates/collectd/config/rubber/role/passenger/collectd-passenger.rb.conf +77 -0
- data/{lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger-sudoers.conf → templates/collectd/config/rubber/role/passenger/passenger-status-sudoers.conf} +1 -1
- data/templates/collectd/config/rubber/role/postgresql/collectd-postgresql.conf +22 -0
- data/templates/collectd/config/rubber/role/postgresql_slave/collectd-postgresql-threshold.conf +23 -0
- data/templates/collectd/config/rubber/rubber-collectd.yml +8 -0
- data/templates/collectd/script/collectd/collectd-runner.rb +107 -0
- data/templates/collectd/script/collectd/role/examples/example_db_query.rb +19 -0
- data/templates/collectd/script/collectd/role/examples/example_simple.rb +1 -0
- data/templates/collectd/script/collectd/role/postgresql_slave/replication_status.rb +31 -0
- data/templates/collectd/script/collectd/role/redis/redis_info.rb +28 -0
- data/templates/collectd/script/collectd/role/resque_worker/global_worker_stats.rb +12 -0
- data/templates/collectd/script/collectd/role/resque_worker/host_worker_stats.rb +70 -0
- data/templates/collectd/script/collectd/role/resque_worker/resque_jobs_processed.rb +8 -0
- data/templates/collectd/templates.yml +2 -0
- data/{generators/vulcanize/templates → templates}/complete_mongrel_mysql/config/rubber/role/haproxy/haproxy-mongrel.conf +0 -0
- data/{generators/vulcanize/templates → templates}/complete_mongrel_mysql/config/rubber/role/nginx/nginx-mongrel.conf +5 -5
- data/{lib/generators/vulcanize/templates → templates}/complete_mongrel_mysql/config/rubber/rubber-complete.yml +1 -1
- data/{lib/generators/vulcanize/templates → templates}/complete_mongrel_mysql/templates.yml +2 -2
- data/{generators/vulcanize/templates → templates}/complete_passenger/config/rubber/role/haproxy/haproxy-passenger.conf +0 -0
- data/{lib/generators/vulcanize/templates → templates}/complete_passenger/config/rubber/rubber-complete.yml +1 -1
- data/{generators/vulcanize/templates → templates}/complete_passenger/templates.rb +0 -0
- data/{generators/vulcanize/templates → templates}/complete_passenger/templates.yml +4 -2
- data/{generators/vulcanize/templates → templates}/complete_passenger_mysql/templates.yml +0 -0
- data/{generators/vulcanize/templates → templates}/complete_passenger_nginx/config/rubber/role/haproxy/haproxy-passenger.conf +0 -0
- data/{generators/vulcanize/templates → templates}/complete_passenger_nginx/config/rubber/rubber-complete.yml +0 -0
- data/{generators/vulcanize/templates → templates}/complete_passenger_nginx/templates.rb +0 -0
- data/{generators/vulcanize/templates → templates}/complete_passenger_nginx/templates.yml +2 -2
- data/{generators/vulcanize/templates → templates}/complete_passenger_nginx_mysql/templates.yml +0 -0
- data/{generators/vulcanize/templates → templates}/complete_passenger_nginx_postgresql/templates.yml +0 -0
- data/{generators/vulcanize/templates → templates}/complete_passenger_postgresql/templates.yml +0 -0
- data/{generators/vulcanize/templates → templates}/cruise/config/rubber/deploy-cruise.rb +0 -0
- data/{generators/vulcanize/templates → templates}/cruise/config/rubber/role/cruise/cruise +0 -0
- data/{generators/vulcanize/templates → templates}/cruise/config/rubber/role/cruise/my.cnf +0 -0
- data/{generators/vulcanize/templates → templates}/cruise/config/rubber/role/cruise/production.rb +0 -0
- data/{generators/vulcanize/templates → templates}/cruise/config/rubber/role/cruise/site_config.rb +1 -1
- data/{generators/vulcanize/templates → templates}/cruise/config/rubber/role/web_tools/cruise-nginx.conf +0 -0
- data/{generators/vulcanize/templates → templates}/cruise/config/rubber/rubber-cruise.yml +6 -0
- data/{generators/vulcanize/templates → templates}/cruise/templates.yml +0 -0
- data/templates/elasticsearch/config/rubber/deploy-elasticsearch.rb +47 -0
- data/templates/elasticsearch/config/rubber/role/elasticsearch/elasticsearch-upstart.conf +23 -0
- data/templates/elasticsearch/config/rubber/role/elasticsearch/elasticsearch.yml +348 -0
- data/templates/elasticsearch/config/rubber/role/elasticsearch/logging.yml +48 -0
- data/templates/elasticsearch/config/rubber/rubber-elasticsearch.yml +12 -0
- data/templates/elasticsearch/templates.yml +2 -0
- data/templates/graphite/config/rubber/deploy-graphite.rb +255 -0
- data/templates/graphite/config/rubber/role/collectd/graphite-collectd.conf +19 -0
- data/templates/graphite/config/rubber/role/graphite_server/carbon.conf +232 -0
- data/templates/graphite/config/rubber/role/graphite_server/graphite-collectd-ping.conf +11 -0
- data/templates/graphite/config/rubber/role/graphite_server/graphite_server-upstart.conf +16 -0
- data/templates/graphite/config/rubber/role/graphite_server/storage-schemas.conf +19 -0
- data/templates/graphite/config/rubber/role/graphite_web/crontab +8 -0
- data/templates/graphite/config/rubber/role/graphite_web/dashboard.conf +60 -0
- data/templates/graphite/config/rubber/role/graphite_web/graphite-vhost.conf +62 -0
- data/templates/graphite/config/rubber/role/graphite_web/graphite.wsgi +10 -0
- data/templates/graphite/config/rubber/role/graphite_web/local_settings.py +98 -0
- data/templates/graphite/config/rubber/rubber-graphite.yml +20 -0
- data/templates/graphite/templates.yml +1 -0
- data/templates/graylog/config/initializers/graylog.rb +53 -0
- data/templates/graylog/config/rubber/deploy-graylog.rb +118 -0
- data/templates/graylog/config/rubber/role/common/graylog-rsyslog.conf +32 -0
- data/templates/graylog/config/rubber/role/graylog_server/graylog2.conf +67 -0
- data/templates/graylog/config/rubber/role/graylog_server/graylog_server-upstart.conf +22 -0
- data/templates/graylog/config/rubber/role/graylog_web/crontab +9 -0
- data/templates/graylog/config/rubber/role/graylog_web/email.yml +16 -0
- data/templates/graylog/config/rubber/role/graylog_web/general.yml +27 -0
- data/templates/graylog/config/rubber/role/graylog_web/graylog_web-upstart.conf +21 -0
- data/templates/graylog/config/rubber/role/graylog_web/mongoid.yml +28 -0
- data/templates/graylog/config/rubber/rubber-graylog.yml +42 -0
- data/templates/graylog/templates.rb +5 -0
- data/templates/graylog/templates.yml +5 -0
- data/{lib/generators/vulcanize/templates → templates}/haproxy/config/rubber/deploy-haproxy.rb +2 -2
- data/{generators/vulcanize/templates → templates}/haproxy/config/rubber/role/haproxy/haproxy-base.conf +0 -0
- data/{generators/vulcanize/templates → templates}/haproxy/config/rubber/role/haproxy/haproxy-default.conf +0 -0
- data/{generators/vulcanize/templates → templates}/haproxy/config/rubber/role/haproxy/syslog-haproxy.conf +0 -0
- data/{generators/vulcanize/templates → templates}/haproxy/config/rubber/role/haproxy/syslogd-default.conf +0 -0
- data/{generators/vulcanize/templates → templates}/haproxy/config/rubber/role/web_tools/haproxy-nginx.conf +0 -0
- data/templates/haproxy/config/rubber/role/web_tools/rubber-web-tools-haproxy.html +18 -0
- data/{generators/vulcanize/templates → templates}/haproxy/config/rubber/rubber-haproxy.yml +0 -0
- data/{generators/vulcanize/templates → templates}/haproxy/templates.yml +0 -0
- data/{generators/vulcanize/templates → templates}/jetty/config/rubber/deploy-jetty.rb +0 -0
- data/{generators/vulcanize/templates → templates}/jetty/config/rubber/role/jetty/jetty.sh +0 -0
- data/{generators/vulcanize/templates → templates}/jetty/config/rubber/role/jetty/jetty.xml +0 -0
- data/{generators/vulcanize/templates → templates}/jetty/config/rubber/rubber-jetty.yml +0 -0
- data/{generators/vulcanize/templates → templates}/jetty/templates.yml +0 -0
- data/{generators/vulcanize/templates → templates}/memcached/config/memcached.yml +0 -0
- data/{generators/vulcanize/templates → templates}/memcached/config/rubber/common/memcached.yml +2 -2
- data/{generators/vulcanize/templates → templates}/memcached/config/rubber/role/memcached/memcached.conf +0 -0
- data/{generators/vulcanize/templates → templates}/memcached/config/rubber/rubber-memcached.yml +0 -0
- data/{generators/vulcanize/templates → templates}/memcached/templates.yml +0 -0
- data/{generators/vulcanize/templates → templates}/minimal_mysql/templates.yml +0 -0
- data/{generators/vulcanize/templates → templates}/minimal_nodb/templates.yml +0 -0
- data/{generators/vulcanize/templates → templates}/minimal_passenger_nginx/config/rubber/rubber-complete.yml +0 -0
- data/{generators/vulcanize/templates → templates}/minimal_passenger_nginx/templates.yml +0 -0
- data/{lib/generators/vulcanize/templates → templates}/mongodb/config/rubber/deploy-mongodb.rb +17 -14
- data/templates/mongodb/config/rubber/role/mongodb/mongodb-defaults.conf +5 -0
- data/{lib/generators/vulcanize/templates → templates}/mongodb/config/rubber/role/mongodb/mongodb.conf +4 -1
- data/{generators/vulcanize/templates → templates}/mongodb/config/rubber/rubber-mongodb.yml +0 -0
- data/templates/mongodb/templates.yml +1 -0
- data/{generators/vulcanize/templates → templates}/mongrel/config/rubber/deploy-mongrel.rb +1 -1
- data/{generators/vulcanize/templates → templates}/mongrel/config/rubber/role/mongrel/mongrel_cluster.yml +3 -3
- data/{lib/generators/vulcanize/templates → templates}/mongrel/config/rubber/rubber-mongrel.yml +1 -1
- data/{generators/vulcanize/templates → templates}/mongrel/templates.yml +0 -0
- data/{lib/generators/vulcanize/templates → templates}/monit/config/rubber/deploy-monit.rb +4 -4
- data/{lib/generators/vulcanize/templates/apache → templates/monit}/config/rubber/role/apache/monit-apache.conf +1 -1
- data/{generators/vulcanize/templates/cassandra → templates/monit}/config/rubber/role/cassandra/monit-cassandra.conf +1 -1
- data/templates/monit/config/rubber/role/elasticsearch/monit-elasticsearch.conf +8 -0
- data/templates/monit/config/rubber/role/graphite_server/monit-graphite_server.conf +8 -0
- data/templates/monit/config/rubber/role/graylog_server/monit-graylog_server.conf +8 -0
- data/templates/monit/config/rubber/role/graylog_web/monit-graylog_web.conf +8 -0
- data/{generators/vulcanize/templates/haproxy → templates/monit}/config/rubber/role/haproxy/monit-haproxy.conf +1 -1
- data/{generators/vulcanize/templates/jetty → templates/monit}/config/rubber/role/jetty/monit-jetty.conf +1 -1
- data/{lib/generators/vulcanize/templates/mongodb/config/rubber/role/mongodb/monit-mongodb.cnf → templates/monit/config/rubber/role/mongodb/monit-mongodb.conf} +2 -2
- data/{generators/vulcanize/templates/mongrel → templates/monit}/config/rubber/role/mongrel/monit-mongrel.conf +4 -4
- data/{generators/vulcanize/templates/monit/config/rubber/common → templates/monit/config/rubber/role/monit}/monit-default.conf +0 -0
- data/{generators/vulcanize/templates/base/config/rubber/common → templates/monit/config/rubber/role/monit}/monit-postfix.conf +0 -0
- data/{generators/vulcanize/templates/monit/config/rubber/common → templates/monit/config/rubber/role/monit}/monit.conf +0 -0
- data/{generators/vulcanize/templates/munin/config/rubber/common → templates/monit/config/rubber/role/munin}/monit-munin.conf +0 -0
- data/{lib/generators/vulcanize/templates/mysql/config/rubber/role/db/monit-mysql.cnf → templates/monit/config/rubber/role/mysql/monit-mysql.conf} +1 -1
- data/{lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/monit-mysql_proxy.cnf → templates/monit/config/rubber/role/mysql_proxy/monit-mysql_proxy.conf} +1 -1
- data/{generators/vulcanize/templates/nginx → templates/monit}/config/rubber/role/nginx/monit-nginx.conf +1 -1
- data/{generators/vulcanize/templates/passenger_nginx → templates/monit}/config/rubber/role/passenger_nginx/monit-nginx.conf +1 -1
- data/{lib/generators/vulcanize/templates/postgresql/config/rubber/role/db → templates/monit/config/rubber/role/postgresql}/monit-postgresql.conf +1 -1
- data/templates/monit/config/rubber/role/redis/monit-redis.conf +8 -0
- data/templates/monit/config/rubber/role/resque_web/monit-resque_web.conf +10 -0
- data/templates/monit/config/rubber/role/resque_worker/monit-resque_pool.conf +8 -0
- data/{generators/vulcanize/templates/sphinx → templates/monit}/config/rubber/role/sphinx/monit-sphinx.conf +4 -4
- data/{generators/vulcanize/templates → templates}/monit/config/rubber/role/web_tools/monit-admin-nginx.conf +0 -0
- data/templates/monit/config/rubber/role/web_tools/rubber-web-tools-monit.html +19 -0
- data/templates/monit/config/rubber/rubber-monit.yml +11 -0
- data/{generators/vulcanize/templates → templates}/monit/templates.yml +1 -0
- data/templates/munin/config/rubber/deploy-munin.rb +81 -0
- data/{generators/vulcanize/templates/memcached → templates/munin}/config/rubber/role/memcached/memcached_munin_plugin +0 -0
- data/{generators/vulcanize/templates/munin/config/rubber/common → templates/munin/config/rubber/role/munin}/munin-node.conf +0 -0
- data/{generators/vulcanize/templates/munin/config/rubber/common → templates/munin/config/rubber/role/munin}/munin-plugins.conf +0 -0
- data/{generators/vulcanize/templates/mysql → templates/munin}/config/rubber/role/mysql_slave/mysql_slave_munin_plugin +0 -0
- data/{generators/vulcanize/templates/passenger → templates/munin}/config/rubber/role/passenger/munin-passenger-memory.conf +0 -0
- data/{generators/vulcanize/templates/passenger → templates/munin}/config/rubber/role/passenger/munin-passenger-sudoers.conf +0 -0
- data/{generators/vulcanize/templates/passenger → templates/munin}/config/rubber/role/passenger/munin-passenger.conf +0 -0
- data/{generators/vulcanize/templates/passenger_nginx → templates/munin}/config/rubber/role/passenger_nginx/munin-passenger-memory.conf +0 -0
- data/{generators/vulcanize/templates/passenger_nginx → templates/munin}/config/rubber/role/passenger_nginx/munin-passenger-sudoers.conf +0 -0
- data/{generators/vulcanize/templates/passenger_nginx → templates/munin}/config/rubber/role/passenger_nginx/munin-passenger.conf +0 -0
- data/{generators/vulcanize/templates/postgresql/config/rubber/role/db → templates/munin/config/rubber/role/postgresql}/munin-postgresql.conf +0 -0
- data/{generators/vulcanize/templates → templates}/munin/config/rubber/role/web_tools/munin-nginx.conf +0 -0
- data/{lib/generators/vulcanize/templates → templates}/munin/config/rubber/role/web_tools/munin-plugins.conf +3 -3
- data/{generators/vulcanize/templates → templates}/munin/config/rubber/role/web_tools/munin.conf +0 -0
- data/templates/munin/config/rubber/role/web_tools/rubber-web-tools-munin.html +16 -0
- data/templates/munin/config/rubber/rubber-munin.yml +12 -0
- data/{lib/generators/vulcanize/templates → templates}/munin/script/munin/example_mysql_query.rb +1 -1
- data/{lib/generators/vulcanize/templates → templates}/munin/script/munin/example_simple.rb +1 -1
- data/{generators/vulcanize/templates → templates}/munin/templates.yml +1 -0
- data/{generators/vulcanize/templates → templates}/mysql/config/rubber/common/database.yml +3 -3
- data/{lib/generators/vulcanize/templates → templates}/mysql/config/rubber/deploy-mysql.rb +1 -15
- data/{generators/vulcanize/templates → templates}/mysql/config/rubber/role/db/apparmor-mysql.conf +0 -0
- data/{lib/generators/vulcanize/templates → templates}/mysql/config/rubber/role/db/crontab +3 -1
- data/{generators/vulcanize/templates → templates}/mysql/config/rubber/role/db/my.cnf +0 -0
- data/{generators/vulcanize/templates → templates}/mysql/config/rubber/rubber-mysql.yml +9 -10
- data/{generators/vulcanize/templates → templates}/mysql/templates.yml +0 -0
- data/{lib/generators/vulcanize/templates → templates}/mysql_cluster/config/rubber/common/mysql_cluster_migrations.rb +1 -1
- data/{generators/vulcanize/templates → templates}/mysql_cluster/config/rubber/deploy-mysql_cluster.rb +3 -3
- data/{generators/vulcanize/templates → templates}/mysql_cluster/config/rubber/role/mysql_data/my.cnf +0 -0
- data/{generators/vulcanize/templates → templates}/mysql_cluster/config/rubber/role/mysql_mgm/ndb_mgmd.cnf +0 -0
- data/{generators/vulcanize/templates → templates}/mysql_cluster/config/rubber/role/mysql_sql/my.cnf +0 -0
- data/{lib/generators/vulcanize/templates → templates}/mysql_cluster/config/rubber/rubber-mysql_cluster.yml +6 -3
- data/{generators/vulcanize/templates → templates}/mysql_cluster/templates.yml +0 -0
- data/{generators/vulcanize/templates → templates}/mysql_proxy/config/rubber/deploy-mysql_proxy.rb +0 -0
- data/{lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common → templates/mysql_proxy/config/rubber/mysql_proxy}/database.yml +3 -3
- data/{generators/vulcanize/templates/mysql_proxy/config/rubber/common → templates/mysql_proxy/config/rubber/mysql_proxy}/mysql-proxy +0 -0
- data/{generators/vulcanize/templates/mysql_proxy/config/rubber/common → templates/mysql_proxy/config/rubber/mysql_proxy}/mysql-proxy.conf +0 -0
- data/{generators/vulcanize/templates/mysql_proxy/config/rubber/common → templates/mysql_proxy/config/rubber/mysql_proxy}/mysql-proxy.lua +0 -0
- data/{generators/vulcanize/templates → templates}/mysql_proxy/config/rubber/rubber-mysql_proxy.yml +3 -0
- data/{generators/vulcanize/templates → templates}/mysql_proxy/templates.yml +0 -0
- data/{generators/vulcanize/templates → templates}/nginx/config/rubber/deploy-nginx.rb +0 -0
- data/{generators/vulcanize/templates → templates}/nginx/config/rubber/role/nginx/crontab +1 -1
- data/{generators/vulcanize/templates → templates}/nginx/config/rubber/role/nginx/nginx.conf +0 -0
- data/{lib/generators/vulcanize/templates → templates}/nginx/config/rubber/role/web_tools/nginx-tools.conf +8 -5
- data/{generators/vulcanize/templates → templates}/nginx/config/rubber/role/web_tools/tools-index.html +7 -1
- data/{generators/vulcanize/templates → templates}/nginx/config/rubber/role/web_tools/tools-nginx.auth +1 -1
- data/{generators/vulcanize/templates → templates}/nginx/config/rubber/rubber-nginx.yml +0 -0
- data/{generators/vulcanize/templates → templates}/nginx/templates.yml +0 -0
- data/{generators/vulcanize/templates → templates}/passenger/config/rubber/deploy-passenger.rb +0 -0
- data/{generators/vulcanize/templates → templates}/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf +5 -5
- data/{lib/generators/vulcanize/templates → templates}/passenger/config/rubber/role/passenger/passenger.conf +2 -2
- data/{lib/generators/vulcanize/templates → templates}/passenger/config/rubber/rubber-passenger.yml +2 -1
- data/{generators/vulcanize/templates → templates}/passenger/templates.yml +0 -0
- data/{lib/generators/vulcanize/templates → templates}/passenger_nginx/config/rubber/deploy-passenger_nginx.rb +1 -2
- data/{lib/generators/vulcanize/templates → templates}/passenger_nginx/config/rubber/role/passenger_nginx/application.conf +3 -3
- data/{generators/vulcanize/templates → templates}/passenger_nginx/config/rubber/role/passenger_nginx/crontab +1 -1
- data/{generators/vulcanize/templates → templates}/passenger_nginx/config/rubber/role/passenger_nginx/nginx +0 -0
- data/{lib/generators/vulcanize/templates → templates}/passenger_nginx/config/rubber/role/passenger_nginx/nginx.conf +2 -2
- data/{generators/vulcanize/templates → templates}/passenger_nginx/config/rubber/role/passenger_nginx/passenger_nginx.conf +2 -2
- data/{generators/vulcanize/templates → templates}/passenger_nginx/config/rubber/role/web_tools/nginx-tools.conf +8 -5
- data/{lib/generators/vulcanize/templates → templates}/passenger_nginx/config/rubber/role/web_tools/tools-index.html +7 -1
- data/{generators/vulcanize/templates → templates}/passenger_nginx/config/rubber/role/web_tools/tools-nginx.auth +1 -1
- data/{lib/generators/vulcanize/templates → templates}/passenger_nginx/config/rubber/rubber-passenger_nginx.yml +1 -1
- data/{generators/vulcanize/templates → templates}/passenger_nginx/templates.yml +0 -0
- data/{lib/generators/vulcanize/templates → templates}/postgresql/config/rubber/common/database.yml +2 -2
- data/{lib/generators/vulcanize/templates → templates}/postgresql/config/rubber/deploy-postgresql.rb +27 -47
- data/{generators/vulcanize/templates → templates}/postgresql/config/rubber/role/db/crontab +3 -1
- data/templates/postgresql/config/rubber/role/db/pg_hba.conf +98 -0
- data/{generators/vulcanize/templates → templates}/postgresql/config/rubber/role/db/postgresql-sysctl.conf +0 -0
- data/{lib/generators/vulcanize/templates → templates}/postgresql/config/rubber/role/db/postgresql.conf +50 -20
- data/{lib/generators/vulcanize/templates → templates}/postgresql/config/rubber/role/postgresql_slave/recovery.conf +34 -19
- data/{generators/vulcanize/templates → templates}/postgresql/config/rubber/rubber-postgresql.yml +13 -13
- data/{generators/vulcanize/templates → templates}/postgresql/templates.yml +0 -0
- data/templates/redis/config/rubber/deploy-redis.rb +79 -0
- data/{lib/generators/vulcanize/templates → templates}/redis/config/rubber/role/redis/crontab +3 -1
- data/{generators/vulcanize/templates → templates}/redis/config/rubber/role/redis/redis-sysctl.conf +0 -0
- data/templates/redis/config/rubber/role/redis/redis-upstart.conf +23 -0
- data/{generators/vulcanize/templates → templates}/redis/config/rubber/role/redis/redis.conf +62 -9
- data/templates/redis/config/rubber/rubber-redis.yml +17 -0
- data/{generators/vulcanize/templates → templates}/redis/templates.yml +0 -0
- data/{generators/vulcanize/templates → templates}/resque/config/initializers/resque.rb +0 -0
- data/templates/resque/config/resque-pool.yml +4 -0
- data/templates/resque/config/rubber/common/resque.yml +5 -0
- data/templates/resque/config/rubber/deploy-resque.rb +190 -0
- data/templates/resque/config/rubber/role/resque_web/resque-web-upstart.conf +20 -0
- data/templates/resque/config/rubber/role/resque_worker/resque-pool-upstart.conf +50 -0
- data/templates/resque/config/rubber/role/resque_worker/resque-pool.yml +6 -0
- data/{generators/vulcanize/templates → templates}/resque/config/rubber/rubber-resque.yml +11 -1
- data/templates/resque/lib/tasks/resque.rake +18 -0
- data/templates/resque/templates.rb +2 -0
- data/{generators/vulcanize/templates → templates}/resque/templates.yml +0 -0
- data/{lib/generators/vulcanize/templates → templates}/sphinx/config/rubber/common/sphinx.yml +9 -9
- data/{generators/vulcanize/templates → templates}/sphinx/config/rubber/deploy-sphinx.rb +1 -1
- data/templates/sphinx/config/rubber/role/sphinx/crontab +11 -0
- data/{generators/vulcanize/templates → templates}/sphinx/config/rubber/rubber-sphinx.yml +0 -0
- data/{generators/vulcanize/templates → templates}/sphinx/templates.yml +0 -0
- data/templates/unicorn/config/rubber/deploy-unicorn.rb +35 -0
- data/templates/unicorn/config/rubber/role/nginx/unicorn_nginx.conf +56 -0
- data/templates/unicorn/config/rubber/role/unicorn/unicorn.rb +79 -0
- data/templates/unicorn/config/rubber/rubber-unicorn.yml +5 -0
- data/templates/unicorn/templates.yml +3 -0
- data/test/cloud/aws_table_store_test.rb +172 -0
- data/test/cloud/aws_test.rb +33 -0
- data/test/cloud/fog_storage_test.rb +183 -0
- data/test/cloud/fog_test.rb +34 -0
- data/test/command_test.rb +85 -0
- data/test/dns/fog_test.rb +131 -0
- data/test/environment_test.rb +135 -0
- data/test/fixtures/basic/common/bar.conf +4 -0
- data/test/fixtures/basic/common/foo.conf +4 -0
- data/test/fixtures/basic/host/host1/foo.conf +4 -0
- data/test/fixtures/basic/host/host2/foo.conf +4 -0
- data/test/fixtures/basic/role/role1/foo.conf +4 -0
- data/test/fixtures/basic/role/role2/foo.conf +4 -0
- data/test/fixtures/basic/rubber-extra.yml +1 -0
- data/test/fixtures/basic/rubber.yml +26 -0
- data/test/fixtures/expansion/rubber.yml +34 -0
- data/test/fixtures/generator_order/common/a_first.conf +5 -0
- data/test/fixtures/generator_order/common/z_last.conf +5 -0
- data/test/fixtures/generator_order/host/host1/a_first.conf +5 -0
- data/test/fixtures/generator_order/host/host1/z_last.conf +5 -0
- data/test/fixtures/generator_order/role/role1/a_first.conf +5 -0
- data/test/fixtures/generator_order/role/role1/z_last.conf +5 -0
- data/test/fixtures/generator_order/role/role2/a_first.conf +5 -0
- data/test/fixtures/generator_order/role/role2/z_last.conf +5 -0
- data/test/fixtures/instance_expansion/instance-test.yml +20 -0
- data/test/fixtures/instance_expansion/rubber.yml +1 -0
- data/test/fixtures/nested/rubber.yml +9 -0
- data/test/fixtures/secret/rubber.yml +2 -0
- data/test/fixtures/secret/secret.yml +2 -0
- data/test/generator_test.rb +365 -0
- data/test/instance_test.rb +293 -0
- data/test/test-rails-template.rb +35 -0
- data/test/test_helper.rb +19 -0
- data/test/util_test.rb +79 -0
- metadata +490 -508
- data/VERSION +0 -1
- data/bin/vulcanize +0 -25
- data/generators/vulcanize/USAGE +0 -6
- data/generators/vulcanize/templates/apache/config/rubber/role/apache/monit-apache.conf +0 -7
- data/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-apache.auth +0 -7
- data/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-index.html +0 -34
- data/generators/vulcanize/templates/base/Capfile +0 -14
- data/generators/vulcanize/templates/base/Rakefile +0 -27
- data/generators/vulcanize/templates/base/config/deploy.rb +0 -56
- data/generators/vulcanize/templates/base/config/rubber/common/crontab +0 -21
- data/generators/vulcanize/templates/base/config/rubber/deploy-setup.rb +0 -96
- data/generators/vulcanize/templates/base/config/rubber/deploy-util.rb +0 -97
- data/generators/vulcanize/templates/base/config/rubber/rubber-dns.yml +0 -78
- data/generators/vulcanize/templates/base/config/rubber/rubber-rvm.yml +0 -39
- data/generators/vulcanize/templates/base/config/rubber/rubber.yml +0 -263
- data/generators/vulcanize/templates/base/lib/tasks/rubber.rake +0 -15
- data/generators/vulcanize/templates/base/script/cron-rake +0 -18
- data/generators/vulcanize/templates/base/script/cron-runner +0 -18
- data/generators/vulcanize/templates/base/script/cron-sh +0 -67
- data/generators/vulcanize/templates/base/templates.rb +0 -11
- data/generators/vulcanize/templates/base/templates.yml +0 -6
- data/generators/vulcanize/templates/cassandra/config/rubber/deploy-cassandra.rb +0 -88
- data/generators/vulcanize/templates/complete_mongrel_mysql/config/rubber/rubber-complete.yml +0 -41
- data/generators/vulcanize/templates/complete_mongrel_mysql/templates.yml +0 -6
- data/generators/vulcanize/templates/complete_passenger/config/rubber/rubber-complete.yml +0 -40
- data/generators/vulcanize/templates/haproxy/config/rubber/deploy-haproxy.rb +0 -45
- data/generators/vulcanize/templates/mongodb/config/rubber/deploy-mongodb.rb +0 -53
- data/generators/vulcanize/templates/mongodb/config/rubber/role/mongodb/mongodb.conf +0 -89
- data/generators/vulcanize/templates/mongodb/config/rubber/role/mongodb/monit-mongodb.cnf +0 -10
- data/generators/vulcanize/templates/mongodb/templates.yml +0 -3
- data/generators/vulcanize/templates/mongrel/config/rubber/rubber-mongrel.yml +0 -9
- data/generators/vulcanize/templates/monit/config/rubber/deploy-monit.rb +0 -33
- data/generators/vulcanize/templates/monit/config/rubber/rubber-monit.yml +0 -6
- data/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb +0 -46
- data/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin-plugins.conf +0 -31
- data/generators/vulcanize/templates/munin/config/rubber/rubber-munin.yml +0 -8
- data/generators/vulcanize/templates/munin/script/munin/example_mysql_query.rb +0 -55
- data/generators/vulcanize/templates/munin/script/munin/example_simple.rb +0 -24
- data/generators/vulcanize/templates/mysql/config/rubber/deploy-mysql.rb +0 -169
- data/generators/vulcanize/templates/mysql/config/rubber/role/db/crontab +0 -14
- data/generators/vulcanize/templates/mysql/config/rubber/role/db/monit-mysql.cnf +0 -10
- data/generators/vulcanize/templates/mysql_cluster/config/rubber/common/mysql_cluster_migrations.rb +0 -13
- data/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_sql/monit-mysql_cluster_sql.cnf +0 -10
- data/generators/vulcanize/templates/mysql_cluster/config/rubber/rubber-mysql_cluster.yml +0 -32
- data/generators/vulcanize/templates/mysql_proxy/config/rubber/common/database.yml +0 -16
- data/generators/vulcanize/templates/mysql_proxy/config/rubber/common/monit-mysql_proxy.cnf +0 -10
- data/generators/vulcanize/templates/nginx/config/rubber/role/web_tools/nginx-tools.conf +0 -55
- data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger.conf +0 -41
- data/generators/vulcanize/templates/passenger/config/rubber/rubber-passenger.yml +0 -15
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/deploy-passenger_nginx.rb +0 -86
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/application.conf +0 -30
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/nginx.conf +0 -65
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/role/web_tools/tools-index.html +0 -34
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/rubber-passenger_nginx.yml +0 -20
- data/generators/vulcanize/templates/postgresql/config/rubber/common/database.yml +0 -12
- data/generators/vulcanize/templates/postgresql/config/rubber/deploy-postgresql.rb +0 -160
- data/generators/vulcanize/templates/postgresql/config/rubber/role/db/monit-postgresql.conf +0 -10
- data/generators/vulcanize/templates/postgresql/config/rubber/role/db/pg_hba.conf +0 -90
- data/generators/vulcanize/templates/postgresql/config/rubber/role/db/postgresql.conf +0 -544
- data/generators/vulcanize/templates/postgresql/config/rubber/role/postgresql_slave/recovery.conf +0 -120
- data/generators/vulcanize/templates/redis/config/rubber/deploy-redis.rb +0 -88
- data/generators/vulcanize/templates/redis/config/rubber/role/redis/crontab +0 -15
- data/generators/vulcanize/templates/redis/config/rubber/role/redis/monit-redis.conf +0 -8
- data/generators/vulcanize/templates/redis/config/rubber/rubber-redis.yml +0 -13
- data/generators/vulcanize/templates/resque/config/rubber/common/resque.yml +0 -5
- data/generators/vulcanize/templates/resque/config/rubber/deploy-resque.rb +0 -71
- data/generators/vulcanize/templates/resque/config/rubber/role/resque_web/monit-resque_web.conf +0 -14
- data/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf +0 -19
- data/generators/vulcanize/templates/resque/script/resque_worker_management.rb +0 -144
- data/generators/vulcanize/templates/resque/templates.rb +0 -1
- data/generators/vulcanize/templates/sphinx/config/rubber/common/sphinx.yml +0 -46
- data/generators/vulcanize/templates/sphinx/config/rubber/role/sphinx/crontab +0 -11
- data/generators/vulcanize/vulcanize_generator.rb +0 -184
- data/lib/generators/vulcanize/USAGE +0 -6
- data/lib/generators/vulcanize/templates/apache/config/rubber/deploy-apache.rb +0 -51
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/deflate.conf +0 -10
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/expires.conf +0 -9
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/headers.conf +0 -6
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/ports.conf +0 -8
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/setenvif.conf +0 -52
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-apache-vhost.conf +0 -79
- data/lib/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-index.html +0 -34
- data/lib/generators/vulcanize/templates/apache/config/rubber/rubber-apache.yml +0 -6
- data/lib/generators/vulcanize/templates/apache/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/base/Rakefile +0 -27
- data/lib/generators/vulcanize/templates/base/config/rubber/common/crontab +0 -21
- data/lib/generators/vulcanize/templates/base/config/rubber/common/monit-postfix.conf +0 -8
- data/lib/generators/vulcanize/templates/base/config/rubber/common/rsyslog.conf +0 -71
- data/lib/generators/vulcanize/templates/base/config/rubber/common/rubber.profile +0 -13
- data/lib/generators/vulcanize/templates/base/lib/tasks/rubber.rake +0 -15
- data/lib/generators/vulcanize/templates/base/script/cron-rake +0 -18
- data/lib/generators/vulcanize/templates/base/script/cron-runner +0 -18
- data/lib/generators/vulcanize/templates/base/script/cron-sh +0 -67
- data/lib/generators/vulcanize/templates/base/templates.rb +0 -11
- data/lib/generators/vulcanize/templates/base/templates.yml +0 -6
- data/lib/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/cassandra.in.sh +0 -60
- data/lib/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/cassandra.yaml +0 -210
- data/lib/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/log4j-server.properties +0 -45
- data/lib/generators/vulcanize/templates/cassandra/config/rubber/role/cassandra/monit-cassandra.conf +0 -8
- data/lib/generators/vulcanize/templates/cassandra/config/rubber/rubber-cassandra.yml +0 -18
- data/lib/generators/vulcanize/templates/cassandra/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/complete_mongrel_mysql/config/rubber/role/haproxy/haproxy-mongrel.conf +0 -23
- data/lib/generators/vulcanize/templates/complete_mongrel_mysql/config/rubber/role/nginx/nginx-mongrel.conf +0 -113
- data/lib/generators/vulcanize/templates/complete_passenger/config/rubber/role/haproxy/haproxy-passenger.conf +0 -21
- data/lib/generators/vulcanize/templates/complete_passenger/templates.rb +0 -9
- data/lib/generators/vulcanize/templates/complete_passenger/templates.yml +0 -9
- data/lib/generators/vulcanize/templates/complete_passenger_mysql/templates.yml +0 -4
- data/lib/generators/vulcanize/templates/complete_passenger_nginx/config/rubber/role/haproxy/haproxy-passenger.conf +0 -21
- data/lib/generators/vulcanize/templates/complete_passenger_nginx/config/rubber/rubber-complete.yml +0 -38
- data/lib/generators/vulcanize/templates/complete_passenger_nginx/templates.rb +0 -8
- data/lib/generators/vulcanize/templates/complete_passenger_nginx/templates.yml +0 -8
- data/lib/generators/vulcanize/templates/complete_passenger_nginx_mysql/templates.yml +0 -4
- data/lib/generators/vulcanize/templates/complete_passenger_nginx_postgresql/templates.yml +0 -4
- data/lib/generators/vulcanize/templates/complete_passenger_postgresql/templates.yml +0 -4
- data/lib/generators/vulcanize/templates/cruise/config/rubber/deploy-cruise.rb +0 -72
- data/lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/cruise +0 -40
- data/lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/my.cnf +0 -165
- data/lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/production.rb +0 -8
- data/lib/generators/vulcanize/templates/cruise/config/rubber/role/cruise/site_config.rb +0 -76
- data/lib/generators/vulcanize/templates/cruise/config/rubber/role/web_tools/cruise-nginx.conf +0 -11
- data/lib/generators/vulcanize/templates/cruise/config/rubber/rubber-cruise.yml +0 -18
- data/lib/generators/vulcanize/templates/cruise/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/haproxy-base.conf +0 -26
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/haproxy-default.conf +0 -8
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/monit-haproxy.conf +0 -8
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/syslog-haproxy.conf +0 -11
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/syslogd-default.conf +0 -21
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/web_tools/haproxy-nginx.conf +0 -10
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/rubber-haproxy.yml +0 -7
- data/lib/generators/vulcanize/templates/haproxy/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/jetty/config/rubber/deploy-jetty.rb +0 -59
- data/lib/generators/vulcanize/templates/jetty/config/rubber/role/jetty/jetty.sh +0 -589
- data/lib/generators/vulcanize/templates/jetty/config/rubber/role/jetty/jetty.xml +0 -199
- data/lib/generators/vulcanize/templates/jetty/config/rubber/role/jetty/monit-jetty.conf +0 -8
- data/lib/generators/vulcanize/templates/jetty/config/rubber/rubber-jetty.yml +0 -10
- data/lib/generators/vulcanize/templates/jetty/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/memcached/config/memcached.yml +0 -28
- data/lib/generators/vulcanize/templates/memcached/config/rubber/common/memcached.yml +0 -14
- data/lib/generators/vulcanize/templates/memcached/config/rubber/role/memcached/memcached.conf +0 -52
- data/lib/generators/vulcanize/templates/memcached/config/rubber/role/memcached/memcached_munin_plugin +0 -249
- data/lib/generators/vulcanize/templates/memcached/config/rubber/rubber-memcached.yml +0 -7
- data/lib/generators/vulcanize/templates/memcached/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/minimal_mysql/templates.yml +0 -7
- data/lib/generators/vulcanize/templates/minimal_nodb/templates.yml +0 -6
- data/lib/generators/vulcanize/templates/minimal_passenger_nginx/config/rubber/rubber-complete.yml +0 -37
- data/lib/generators/vulcanize/templates/minimal_passenger_nginx/templates.yml +0 -4
- data/lib/generators/vulcanize/templates/mongodb/config/rubber/rubber-mongodb.yml +0 -8
- data/lib/generators/vulcanize/templates/mongodb/templates.yml +0 -3
- data/lib/generators/vulcanize/templates/mongrel/config/rubber/deploy-mongrel.rb +0 -75
- data/lib/generators/vulcanize/templates/mongrel/config/rubber/role/mongrel/mongrel_cluster.yml +0 -12
- data/lib/generators/vulcanize/templates/mongrel/config/rubber/role/mongrel/monit-mongrel.conf +0 -20
- data/lib/generators/vulcanize/templates/mongrel/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/monit/config/rubber/common/monit-default.conf +0 -15
- data/lib/generators/vulcanize/templates/monit/config/rubber/common/monit.conf +0 -252
- data/lib/generators/vulcanize/templates/monit/config/rubber/role/web_tools/monit-admin-nginx.conf +0 -11
- data/lib/generators/vulcanize/templates/monit/config/rubber/rubber-monit.yml +0 -6
- data/lib/generators/vulcanize/templates/monit/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/munin/config/rubber/common/monit-munin.conf +0 -8
- data/lib/generators/vulcanize/templates/munin/config/rubber/common/munin-node.conf +0 -48
- data/lib/generators/vulcanize/templates/munin/config/rubber/common/munin-plugins.conf +0 -11
- data/lib/generators/vulcanize/templates/munin/config/rubber/deploy-munin.rb +0 -46
- data/lib/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin-nginx.conf +0 -8
- data/lib/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin.conf +0 -116
- data/lib/generators/vulcanize/templates/munin/config/rubber/rubber-munin.yml +0 -8
- data/lib/generators/vulcanize/templates/munin/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/mysql/config/rubber/common/database.yml +0 -12
- data/lib/generators/vulcanize/templates/mysql/config/rubber/role/db/apparmor-mysql.conf +0 -46
- data/lib/generators/vulcanize/templates/mysql/config/rubber/role/db/my.cnf +0 -163
- data/lib/generators/vulcanize/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin +0 -51
- data/lib/generators/vulcanize/templates/mysql/config/rubber/rubber-mysql.yml +0 -47
- data/lib/generators/vulcanize/templates/mysql/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/deploy-mysql_cluster.rb +0 -177
- data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_data/my.cnf +0 -15
- data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_mgm/ndb_mgmd.cnf +0 -39
- data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_sql/monit-mysql_cluster_sql.cnf +0 -10
- data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_sql/my.cnf +0 -23
- data/lib/generators/vulcanize/templates/mysql_cluster/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy +0 -154
- data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy.conf +0 -10
- data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy.lua +0 -5
- data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/deploy-mysql_proxy.rb +0 -52
- data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/rubber-mysql_proxy.yml +0 -11
- data/lib/generators/vulcanize/templates/mysql_proxy/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/nginx/config/rubber/deploy-nginx.rb +0 -45
- data/lib/generators/vulcanize/templates/nginx/config/rubber/role/nginx/crontab +0 -9
- data/lib/generators/vulcanize/templates/nginx/config/rubber/role/nginx/monit-nginx.conf +0 -7
- data/lib/generators/vulcanize/templates/nginx/config/rubber/role/nginx/nginx.conf +0 -42
- data/lib/generators/vulcanize/templates/nginx/config/rubber/role/web_tools/tools-index.html +0 -30
- data/lib/generators/vulcanize/templates/nginx/config/rubber/role/web_tools/tools-nginx.auth +0 -7
- data/lib/generators/vulcanize/templates/nginx/config/rubber/rubber-nginx.yml +0 -10
- data/lib/generators/vulcanize/templates/nginx/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/passenger/config/rubber/deploy-passenger.rb +0 -51
- data/lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger-memory.conf +0 -34
- data/lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger.conf +0 -47
- data/lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf +0 -48
- data/lib/generators/vulcanize/templates/passenger/templates.yml +0 -3
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/crontab +0 -8
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/monit-nginx.conf +0 -7
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/munin-passenger-memory.conf +0 -34
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/munin-passenger-sudoers.conf +0 -8
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/munin-passenger.conf +0 -47
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/nginx +0 -101
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/passenger_nginx.conf +0 -30
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/web_tools/nginx-tools.conf +0 -55
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/web_tools/tools-nginx.auth +0 -7
- data/lib/generators/vulcanize/templates/passenger_nginx/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/crontab +0 -14
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/munin-postgresql.conf +0 -7
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/pg_hba.conf +0 -90
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/postgresql-sysctl.conf +0 -6
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/rubber-postgresql.yml +0 -45
- data/lib/generators/vulcanize/templates/postgresql/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/redis/config/rubber/deploy-redis.rb +0 -88
- data/lib/generators/vulcanize/templates/redis/config/rubber/role/redis/monit-redis.conf +0 -8
- data/lib/generators/vulcanize/templates/redis/config/rubber/role/redis/redis-sysctl.conf +0 -7
- data/lib/generators/vulcanize/templates/redis/config/rubber/role/redis/redis.conf +0 -434
- data/lib/generators/vulcanize/templates/redis/config/rubber/rubber-redis.yml +0 -13
- data/lib/generators/vulcanize/templates/redis/templates.yml +0 -1
- data/lib/generators/vulcanize/templates/resque/config/initializers/resque.rb +0 -15
- data/lib/generators/vulcanize/templates/resque/config/rubber/common/resque.yml +0 -5
- data/lib/generators/vulcanize/templates/resque/config/rubber/deploy-resque.rb +0 -71
- data/lib/generators/vulcanize/templates/resque/config/rubber/role/resque_web/monit-resque_web.conf +0 -14
- data/lib/generators/vulcanize/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf +0 -19
- data/lib/generators/vulcanize/templates/resque/config/rubber/rubber-resque.yml +0 -18
- data/lib/generators/vulcanize/templates/resque/script/resque_worker_management.rb +0 -144
- data/lib/generators/vulcanize/templates/resque/templates.rb +0 -1
- data/lib/generators/vulcanize/templates/resque/templates.yml +0 -3
- data/lib/generators/vulcanize/templates/sphinx/config/rubber/deploy-sphinx.rb +0 -112
- data/lib/generators/vulcanize/templates/sphinx/config/rubber/role/sphinx/crontab +0 -11
- data/lib/generators/vulcanize/templates/sphinx/config/rubber/role/sphinx/monit-sphinx.conf +0 -13
- data/lib/generators/vulcanize/templates/sphinx/config/rubber/rubber-sphinx.yml +0 -6
- data/lib/generators/vulcanize/templates/sphinx/templates.yml +0 -1
- data/lib/generators/vulcanize/vulcanize_generator.rb +0 -184
- data/lib/rubber/tasks/rubber.rb +0 -281
@@ -67,7 +67,7 @@ namespace :rubber do
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def isolate_prefix
|
70
|
-
return "#{rubber_env.app_name}_#{
|
70
|
+
return "#{rubber_env.app_name}_#{Rubber.env}_"
|
71
71
|
end
|
72
72
|
|
73
73
|
def isolate_group_name(group_name)
|
@@ -117,7 +117,7 @@ namespace :rubber do
|
|
117
117
|
# so we need to do this up frnot and remove duplicates before checking against the local rubber rules)
|
118
118
|
cloud_group[:permissions].each do |rule|
|
119
119
|
if rule[:source_groups]
|
120
|
-
rule
|
120
|
+
rule[:source_groups].each do |source_group|
|
121
121
|
rule_map = {:source_group_name => source_group[:name], :source_group_account => source_group[:account]}
|
122
122
|
rule_map = Rubber::Util::stringify(rule_map)
|
123
123
|
rule_maps << rule_map unless rule_maps.include?(rule_map)
|
@@ -72,13 +72,24 @@ namespace :rubber do
|
|
72
72
|
hosts_file = '/etc/hosts'
|
73
73
|
|
74
74
|
# Generate /etc/hosts contents for the local machine from instance config
|
75
|
-
delim = "## rubber config #{rubber_env.domain} #{
|
75
|
+
delim = "## rubber config #{rubber_env.domain} #{Rubber.env}"
|
76
76
|
local_hosts = delim + "\n"
|
77
77
|
rubber_instances.each do |ic|
|
78
78
|
# don't add unqualified hostname in local hosts file since user may be
|
79
79
|
# managing multiple domains with same aliases
|
80
|
-
hosts_data = [ic.full_name, ic.external_host, ic.internal_host]
|
81
|
-
|
80
|
+
hosts_data = [ic.full_name, ic.external_host, ic.internal_host]
|
81
|
+
|
82
|
+
# add the ip aliases for web tools hosts so we can map internal tools
|
83
|
+
# to their own vhost to make proxying easier (rewriting url paths for
|
84
|
+
# proxy is a real pain, e.g. '/graphite/' externally to '/' on the
|
85
|
+
# graphite web app)
|
86
|
+
if ic.role_names.include?('web_tools')
|
87
|
+
Array(rubber_env.web_tools_proxies).each do |name, settings|
|
88
|
+
hosts_data << "#{name}.#{ic.full_name}"
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
local_hosts << ic.external_ip << ' ' << hosts_data.join(' ') << "\n"
|
82
93
|
end
|
83
94
|
local_hosts << delim << "\n"
|
84
95
|
|
@@ -91,6 +102,56 @@ namespace :rubber do
|
|
91
102
|
end
|
92
103
|
end
|
93
104
|
|
105
|
+
|
106
|
+
desc <<-DESC
|
107
|
+
Sets up aliases for instance hostnames based on contents of instance.yml.
|
108
|
+
Generates /etc/hosts for remote machines and sets hostname on remote instances
|
109
|
+
DESC
|
110
|
+
task :setup_remote_aliases do
|
111
|
+
hosts_file = '/etc/hosts'
|
112
|
+
|
113
|
+
# Generate /etc/hosts contents for the remote instance from instance config
|
114
|
+
delim = "## rubber config #{Rubber.env}"
|
115
|
+
remote_hosts = []
|
116
|
+
|
117
|
+
rubber_instances.each do |ic|
|
118
|
+
hosts_data = [ic.internal_ip, ic.full_name, ic.name, ic.external_host, ic.internal_host]
|
119
|
+
|
120
|
+
# add the ip aliases for web tools hosts so we can map internal tools
|
121
|
+
# to their own vhost to make proxying easier (rewriting url paths for
|
122
|
+
# proxy is a real pain, e.g. '/graphite/' externally to '/' on the
|
123
|
+
# graphite web app)
|
124
|
+
if ic.role_names.include?('web_tools')
|
125
|
+
Array(rubber_env.web_tools_proxies).each do |name, settings|
|
126
|
+
hosts_data << "#{name}.#{ic.full_name}"
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
remote_hosts << hosts_data.join(' ')
|
131
|
+
end
|
132
|
+
|
133
|
+
if rubber_instances.size > 0
|
134
|
+
|
135
|
+
replace="#{delim}\\n#{remote_hosts.join("\\n")}\\n#{delim}"
|
136
|
+
|
137
|
+
rubber.sudo_script 'setup_remote_aliases', <<-ENDSCRIPT
|
138
|
+
sed -i.bak '/#{delim}/,/#{delim}/c #{replace}' /etc/hosts
|
139
|
+
if ! grep -q "#{delim}" /etc/hosts; then
|
140
|
+
echo -e "#{replace}" >> /etc/hosts
|
141
|
+
fi
|
142
|
+
ENDSCRIPT
|
143
|
+
|
144
|
+
# Setup hostname on instance so shell, etcs have nice display
|
145
|
+
rsudo "echo $CAPISTRANO:HOST$ > /etc/hostname && hostname $CAPISTRANO:HOST$"
|
146
|
+
# Newer ubuntus ec2-init script always resets hostname, so prevent it
|
147
|
+
rsudo "mkdir -p /etc/ec2-init && echo compat=0 > /etc/ec2-init/is-compat-env"
|
148
|
+
end
|
149
|
+
|
150
|
+
# TODO
|
151
|
+
# /etc/resolv.conf to add search domain
|
152
|
+
# ~/.ssh/options to setup user/host/key aliases
|
153
|
+
end
|
154
|
+
|
94
155
|
desc <<-DESC
|
95
156
|
Sets up aliases in dynamic dns provider for instance hostnames based on contents of instance.yml.
|
96
157
|
DESC
|
@@ -177,42 +238,6 @@ namespace :rubber do
|
|
177
238
|
end
|
178
239
|
end
|
179
240
|
|
180
|
-
desc <<-DESC
|
181
|
-
Sets up aliases for instance hostnames based on contents of instance.yml.
|
182
|
-
Generates /etc/hosts for remote machines and sets hostname on remote instances
|
183
|
-
DESC
|
184
|
-
task :setup_remote_aliases do
|
185
|
-
hosts_file = '/etc/hosts'
|
186
|
-
|
187
|
-
# Generate /etc/hosts contents for the remote instance from instance config
|
188
|
-
delim = "## rubber config"
|
189
|
-
delim = "#{delim} #{RUBBER_ENV}"
|
190
|
-
remote_hosts = delim + "\n"
|
191
|
-
rubber_instances.each do |ic|
|
192
|
-
hosts_data = [ic.full_name, ic.name, ic.external_host, ic.internal_host].join(' ')
|
193
|
-
remote_hosts << ic.internal_ip << ' ' << hosts_data << "\n"
|
194
|
-
end
|
195
|
-
remote_hosts << delim << "\n"
|
196
|
-
if rubber_instances.size > 0
|
197
|
-
# write out the hosts file for the remote instances
|
198
|
-
# NOTE that we use "capture" to get the existing hosts
|
199
|
-
# file, which only grabs the hosts file from the first host
|
200
|
-
filtered = (capture "cat #{hosts_file}").gsub(/^#{delim}.*^#{delim}\n?/m, '')
|
201
|
-
filtered = filtered + remote_hosts
|
202
|
-
# Put the generated hosts back on remote instance
|
203
|
-
put filtered, hosts_file
|
204
|
-
|
205
|
-
# Setup hostname on instance so shell, etcs have nice display
|
206
|
-
rsudo "echo $CAPISTRANO:HOST$ > /etc/hostname && hostname $CAPISTRANO:HOST$"
|
207
|
-
# Newer ubuntus ec2-init script always resets hostname, so prevent it
|
208
|
-
rsudo "mkdir -p /etc/ec2-init && echo compat=0 > /etc/ec2-init/is-compat-env"
|
209
|
-
end
|
210
|
-
|
211
|
-
# TODO
|
212
|
-
# /etc/resolv.conf to add search domain
|
213
|
-
# ~/.ssh/options to setup user/host/key aliases
|
214
|
-
end
|
215
|
-
|
216
241
|
desc <<-DESC
|
217
242
|
Update to the newest versions of all packages/gems.
|
218
243
|
DESC
|
@@ -262,16 +287,16 @@ namespace :rubber do
|
|
262
287
|
desc <<-DESC
|
263
288
|
Install ruby gems defined in the rails environment.rb
|
264
289
|
DESC
|
265
|
-
after "rubber:config", "rubber:install_rails_gems" if (Rubber::Util::
|
290
|
+
after "rubber:config", "rubber:install_rails_gems" if (Rubber::Util::is_rails? && !Rubber::Util.is_bundler?)
|
266
291
|
task :install_rails_gems do
|
267
|
-
rsudo "cd #{current_release} && RAILS_ENV=#{
|
292
|
+
rsudo "cd #{current_release} && RAILS_ENV=#{Rubber.env} #{fetch(:rake, 'rake')} gems:install"
|
268
293
|
end
|
269
294
|
|
270
295
|
desc <<-DESC
|
271
296
|
Convenience task for installing your defined set of ruby gems locally.
|
272
297
|
DESC
|
273
298
|
required_task :install_local_gems do
|
274
|
-
fatal("install_local_gems can only be run in development") if
|
299
|
+
fatal("install_local_gems can only be run in development") if Rubber.env != 'development'
|
275
300
|
env = rubber_cfg.environment.bind(rubber_cfg.environment.known_roles)
|
276
301
|
gems = env['gems']
|
277
302
|
expanded_gem_list = []
|
@@ -376,6 +401,16 @@ namespace :rubber do
|
|
376
401
|
if env.dns_provider
|
377
402
|
provider = Rubber::Dns::get_provider(env.dns_provider, env)
|
378
403
|
provider.update(instance_item.name, instance_item.external_ip)
|
404
|
+
|
405
|
+
# add the ip aliases for web tools hosts so we can map internal tools
|
406
|
+
# to their own vhost to make proxying easier (rewriting url paths for
|
407
|
+
# proxy is a real pain, e.g. '/graphite/' externally to '/' on the
|
408
|
+
# graphite web app)
|
409
|
+
if instance_item.role_names.include?('web_tools')
|
410
|
+
Array(rubber_env.web_tools_proxies).each do |name, settings|
|
411
|
+
provider.update("#{name}.#{ic.name}", instance_item.external_ip)
|
412
|
+
end
|
413
|
+
end
|
379
414
|
end
|
380
415
|
end
|
381
416
|
|
@@ -384,6 +419,16 @@ namespace :rubber do
|
|
384
419
|
if env.dns_provider
|
385
420
|
provider = Rubber::Dns::get_provider(env.dns_provider, env)
|
386
421
|
provider.destroy(instance_item.name)
|
422
|
+
|
423
|
+
# add the ip aliases for web tools hosts so we can map internal tools
|
424
|
+
# to their own vhost to make proxying easier (rewriting url paths for
|
425
|
+
# proxy is a real pain, e.g. '/graphite/' externally to '/' on the
|
426
|
+
# graphite web app)
|
427
|
+
if instance_item.role_names.include?('web_tools')
|
428
|
+
Array(rubber_env.web_tools_proxies).each do |name, settings|
|
429
|
+
provider.destroy("#{name}.#{ic.name}")
|
430
|
+
end
|
431
|
+
end
|
387
432
|
end
|
388
433
|
end
|
389
434
|
|
@@ -406,8 +451,60 @@ namespace :rubber do
|
|
406
451
|
else
|
407
452
|
rsudo "export DEBIAN_FRONTEND=noninteractive; apt-get -q -o Dpkg::Options::=--force-confold -y --force-yes install $CAPISTRANO:VAR$", opts
|
408
453
|
end
|
454
|
+
|
455
|
+
maybe_reboot
|
456
|
+
end
|
457
|
+
|
458
|
+
def multi_capture(cmd, opts={})
|
459
|
+
mutex = Mutex.new
|
460
|
+
host_data = {}
|
461
|
+
run(cmd, opts) do |channel, stream, data|
|
462
|
+
if data
|
463
|
+
host = channel.properties[:host]
|
464
|
+
mutex.synchronize do
|
465
|
+
host_data[host] ||= ""
|
466
|
+
host_data[host] << data
|
467
|
+
end
|
468
|
+
end
|
469
|
+
end
|
470
|
+
return host_data
|
409
471
|
end
|
472
|
+
|
473
|
+
def maybe_reboot
|
474
|
+
reboot_needed = multi_capture("echo $(ls /var/run/reboot-required 2> /dev/null)")
|
475
|
+
reboot_hosts = reboot_needed.collect {|k, v| v.strip.size > 0 ? k : nil}.compact
|
476
|
+
|
477
|
+
if reboot_hosts.size > 0
|
478
|
+
|
479
|
+
ENV['REBOOT'] = 'y' if ENV['FORCE'] =~ /^(t|y)/
|
480
|
+
reboot = get_env('REBOOT', "Updates require a reboot on hosts #{reboot_hosts.inspect}, reboot [y/N]?", false)
|
481
|
+
reboot = (reboot =~ /^y/)
|
482
|
+
|
483
|
+
if reboot
|
484
|
+
|
485
|
+
logger.info "Rebooting ..."
|
486
|
+
run("#{sudo} reboot", :hosts => reboot_hosts)
|
487
|
+
sleep 30
|
410
488
|
|
489
|
+
# since we rebooted, teardown the connections to force cap to reconnect
|
490
|
+
teardown_connections_to(sessions.keys)
|
491
|
+
|
492
|
+
reboot_hosts.each do |host|
|
493
|
+
direct_connection(host) do
|
494
|
+
run "echo"
|
495
|
+
end
|
496
|
+
logger.info "#{host} completed reboot"
|
497
|
+
end
|
498
|
+
|
499
|
+
end
|
500
|
+
|
501
|
+
# could take a while to reboot (or get answer from prompt), so
|
502
|
+
# we need to rebuild all capistrano connections in case they timed out
|
503
|
+
teardown_connections_to(sessions.keys)
|
504
|
+
|
505
|
+
end
|
506
|
+
end
|
507
|
+
|
411
508
|
def custom_package(url_base, name, ver, install_test)
|
412
509
|
rubber.sudo_script "install_#{name}", <<-ENDSCRIPT
|
413
510
|
if [[ #{install_test} ]]; then
|
@@ -4,21 +4,26 @@ namespace :rubber do
|
|
4
4
|
Convenience task for creating a staging instance for the given RUBBER_ENV/RAILS_ENV.
|
5
5
|
By default this task assigns all known roles when creating the instance,
|
6
6
|
but you can specify a different default in rubber.yml:staging_roles
|
7
|
-
At the end, the instance will be up and running
|
7
|
+
At the end, the instance will be up and running. If the staging instance
|
8
|
+
already exists, the user will be warned, and if they chose to proceed,
|
9
|
+
will skip the create and just bootstrap that instance.
|
8
10
|
e.g. RUBBER_ENV=matt cap create_staging
|
9
11
|
DESC
|
10
12
|
required_task :create_staging do
|
11
13
|
if rubber_instances.size > 0
|
12
|
-
value = Capistrano::CLI.ui.ask("The #{
|
14
|
+
value = Capistrano::CLI.ui.ask("The #{Rubber.env} environment already has instances, Are you SURE you want to create a staging instance that may interact with them [y/N]?: ")
|
13
15
|
fatal("Exiting", 0) if value !~ /^y/
|
14
16
|
end
|
15
|
-
instance_alias = ENV['ALIAS'] = rubber.get_env("ALIAS", "Hostname to use for staging instance", true,
|
16
|
-
default_roles = rubber_env.staging_roles || "*"
|
17
|
-
roles = ENV['ROLES'] = rubber.get_env("ROLES", "Roles to use for staging instance", true, default_roles)
|
17
|
+
instance_alias = ENV['ALIAS'] = rubber.get_env("ALIAS", "Hostname to use for staging instance", true, Rubber.env)
|
18
18
|
|
19
19
|
if rubber_instances[instance_alias]
|
20
20
|
logger.info "Instance already exists, skipping to bootstrap"
|
21
21
|
else
|
22
|
+
default_roles = rubber_env.staging_roles
|
23
|
+
# default staging roles to all roles minus slaves (db without primary=true is a slave)
|
24
|
+
default_roles ||= rubber_cfg.environment.known_roles.reject {|r| r =~ /slave/ || r =~ /^db$/ }.join(",")
|
25
|
+
roles = ENV['ROLES'] = rubber.get_env("ROLES", "Roles to use for staging instance", true, default_roles)
|
26
|
+
|
22
27
|
rubber.create
|
23
28
|
end
|
24
29
|
|
@@ -47,7 +52,7 @@ namespace :rubber do
|
|
47
52
|
Destroy the staging instance for the given RUBBER_ENV.
|
48
53
|
DESC
|
49
54
|
task :destroy_staging do
|
50
|
-
ENV['ALIAS'] = rubber.get_env("ALIAS", "Hostname of staging instance to be destroyed", true,
|
55
|
+
ENV['ALIAS'] = rubber.get_env("ALIAS", "Hostname of staging instance to be destroyed", true, Rubber.env)
|
51
56
|
rubber.destroy
|
52
57
|
end
|
53
58
|
|
@@ -57,7 +62,7 @@ namespace :rubber do
|
|
57
62
|
set FILE=/path/file.*.glob to tails a different set
|
58
63
|
DESC
|
59
64
|
task :tail_logs, :roles => :app do
|
60
|
-
log_file_glob = rubber.get_env("FILE", "Log files to tail", true, "#{current_path}/log/#{
|
65
|
+
log_file_glob = rubber.get_env("FILE", "Log files to tail", true, "#{current_path}/log/#{Rubber.env}*.log")
|
61
66
|
run "tail -qf #{log_file_glob}" do |channel, stream, data|
|
62
67
|
puts # for an extra line break before the host name
|
63
68
|
puts data
|
@@ -227,7 +227,7 @@ namespace :rubber do
|
|
227
227
|
fi
|
228
228
|
mv /etc/fstab /etc/fstab.bak
|
229
229
|
cat /etc/fstab.bak | grep -vE '#{raid_spec['device']}|#{raid_spec['mount']}' > /etc/fstab
|
230
|
-
echo '#{raid_spec['device']} #{raid_spec['mount']} #{raid_spec['filesystem']} #{
|
230
|
+
echo '#{raid_spec['device']} #{raid_spec['mount']} #{raid_spec['filesystem']} #{raid_spec['mount_opts'] ? raid_spec['mount_opts'] : 'noatime'} 0 0 # rubber raid volume' >> /etc/fstab
|
231
231
|
|
232
232
|
# seems to help devices initialize, otherwise mdadm fails because
|
233
233
|
# device not ready even though ec2 says the volume is attached
|
@@ -292,7 +292,7 @@ namespace :rubber do
|
|
292
292
|
|
293
293
|
mv /etc/fstab /etc/fstab.bak
|
294
294
|
cat /etc/fstab.bak | grep -v '#{volume['mount']}\\b' > /etc/fstab
|
295
|
-
echo '#{device_name} #{volume['mount']} #{volume['filesystem']} #{
|
295
|
+
echo '#{device_name} #{volume['mount']} #{volume['filesystem']} #{volume['mount_opts'] ? volume['mount_opts'] : 'noatime'} 0 0 # rubber LVM volume' >> /etc/fstab
|
296
296
|
fi
|
297
297
|
|
298
298
|
# Check if the logical volume exists or not.
|
data/lib/rubber/tag.rb
CHANGED
@@ -2,15 +2,10 @@ module Rubber
|
|
2
2
|
module Tag
|
3
3
|
# Updates the tags for the given ec2 instance
|
4
4
|
def self.update_instance_tags(instance_alias)
|
5
|
-
instance_item = Rubber
|
6
|
-
|
5
|
+
instance_item = Rubber.instances[instance_alias]
|
6
|
+
raise "Instance does not exist: #{instance_alias}" if ! instance_item
|
7
7
|
|
8
|
-
|
9
|
-
rubber_env = rubber_cfg.environment.bind()
|
10
|
-
|
11
|
-
cloud = Rubber::Cloud::get_provider(rubber_env.cloud_provider || "aws", Rubber::Configuration.rubber_env, self)
|
12
|
-
|
13
|
-
cloud.create_tags(instance_item.instance_id, :Name => instance_alias, :Environment => RUBBER_ENV)
|
8
|
+
Rubber.cloud.create_tags(instance_item.instance_id, :Name => instance_alias, :Environment => Rubber.env)
|
14
9
|
end
|
15
10
|
end
|
16
11
|
end
|
data/lib/rubber/util.rb
CHANGED
@@ -3,14 +3,14 @@
|
|
3
3
|
module Rubber
|
4
4
|
module Util
|
5
5
|
|
6
|
-
def
|
6
|
+
def symbolize_keys(map)
|
7
7
|
map.inject({}) do |options, (key, value)|
|
8
8
|
options[key.to_sym || key] = value
|
9
9
|
options
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
def
|
13
|
+
def stringify(val)
|
14
14
|
case val
|
15
15
|
when String
|
16
16
|
val
|
@@ -24,7 +24,7 @@ module Rubber
|
|
24
24
|
|
25
25
|
end
|
26
26
|
|
27
|
-
def
|
27
|
+
def parse_aliases(instance_aliases)
|
28
28
|
aliases = []
|
29
29
|
alias_patterns = instance_aliases.to_s.strip.split(/\s*,\s*/)
|
30
30
|
alias_patterns.each do |a|
|
@@ -41,31 +41,23 @@ module Rubber
|
|
41
41
|
end
|
42
42
|
|
43
43
|
# Opens the file for writing by root
|
44
|
-
def
|
44
|
+
def sudo_open(path, perms, &block)
|
45
45
|
open("|sudo tee #{path} > /dev/null", perms, &block)
|
46
46
|
end
|
47
47
|
|
48
|
-
def
|
49
|
-
File.exist?(File.join(
|
48
|
+
def is_rails?
|
49
|
+
File.exist?(File.join(Rubber.root, 'config', 'boot.rb'))
|
50
50
|
end
|
51
51
|
|
52
|
-
def
|
53
|
-
|
52
|
+
def is_bundler?
|
53
|
+
File.exist?(File.join(Rubber.root, 'Gemfile'))
|
54
54
|
end
|
55
55
|
|
56
|
-
def
|
57
|
-
|
56
|
+
def has_asset_pipeline?
|
57
|
+
is_rails? && Dir["#{Rubber.root}/*/assets"].size > 0
|
58
58
|
end
|
59
59
|
|
60
|
-
def
|
61
|
-
File.exist?(File.join(RUBBER_ROOT, 'Gemfile'))
|
62
|
-
end
|
63
|
-
|
64
|
-
def self.rubber_as_plugin?
|
65
|
-
File.exist?(File.join(RUBBER_ROOT, 'vendor/plugins/rubber'))
|
66
|
-
end
|
67
|
-
|
68
|
-
def self.prompt(name, desc, required=false, default=nil)
|
60
|
+
def prompt(name, desc, required=false, default=nil)
|
69
61
|
value = ENV.delete(name)
|
70
62
|
msg = "#{desc}"
|
71
63
|
msg << " [#{default}]" if default
|
@@ -75,14 +67,43 @@ module Rubber
|
|
75
67
|
value = gets
|
76
68
|
end
|
77
69
|
value = value.size == 0 ? default : value
|
78
|
-
|
70
|
+
fatal "#{name} is required, pass using environment or enter at prompt" if required && ! value
|
79
71
|
return value
|
80
72
|
end
|
81
73
|
|
82
|
-
def
|
74
|
+
def fatal(msg, code=1)
|
83
75
|
puts msg
|
84
76
|
exit code
|
85
77
|
end
|
86
|
-
|
78
|
+
|
79
|
+
# remove leading whitespace from "here" strings so they look good in code
|
80
|
+
# skips empty lines
|
81
|
+
def clean_indent(str)
|
82
|
+
counts = str.lines.collect {|l| l.scan(/^\s*/).first.size }
|
83
|
+
m = counts.reject {|x| x <= 1 }.min
|
84
|
+
str.lines.collect {|l| l.size < m ? l : l[m..-1] }.join("")
|
85
|
+
end
|
86
|
+
|
87
|
+
# execute the given block, retrying only when one of the given exceptions is raised
|
88
|
+
def retry_on_failure(*exception_list)
|
89
|
+
opts = exception_list.last.is_a?(Hash) ? exception_list.pop : {}
|
90
|
+
opts = {:retry_count => 3}.merge(opts)
|
91
|
+
retry_count = opts[:retry_count]
|
92
|
+
begin
|
93
|
+
yield
|
94
|
+
rescue *exception_list => e
|
95
|
+
if retry_count > 0
|
96
|
+
retry_count -= 1
|
97
|
+
Rubber.logger.info "Exception, trying again #{retry_count} more times"
|
98
|
+
sleep opts[:retry_sleep].to_i if opts[:retry_sleep]
|
99
|
+
retry
|
100
|
+
else
|
101
|
+
Rubber.logger.error "Too many exceptions...re-raising"
|
102
|
+
raise
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
extend self
|
87
108
|
end
|
88
109
|
end
|