Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

partial, cli working

  • Loading branch information...
commit fd8ee16b82f0cf0d172924aebfe9891df5c44872 1 parent 042d19f
@wr0ngway authored
Showing with 472 additions and 175 deletions.
  1. +1 −0  lib/rubber.rb
  2. +54 −125 lib/rubber/cli.rb
  3. +69 −0 lib/rubber/commands/config.rb
  4. +211 −0 lib/rubber/commands/util.rb
  5. +122 −0 lib/rubber/commands/vulcanize.rb
  6. +6 −3 lib/rubber/environment.rb
  7. +9 −1 lib/rubber/util.rb
  8. +0 −27 lib/templates/base/Rakefile
  9. +0 −15 lib/templates/base/lib/tasks/rubber.rake
  10. 0  {lib → }/templates/apache/config/rubber/deploy-apache.rb
  11. 0  {lib → }/templates/apache/config/rubber/role/apache/deflate.conf
  12. 0  {lib → }/templates/apache/config/rubber/role/apache/expires.conf
  13. 0  {lib → }/templates/apache/config/rubber/role/apache/headers.conf
  14. 0  {lib → }/templates/apache/config/rubber/role/apache/monit-apache.conf
  15. 0  {lib → }/templates/apache/config/rubber/role/apache/ports.conf
  16. 0  {lib → }/templates/apache/config/rubber/role/apache/setenvif.conf
  17. 0  {lib → }/templates/apache/config/rubber/role/web_tools/tools-apache-vhost.conf
  18. 0  {lib → }/templates/apache/config/rubber/role/web_tools/tools-apache.auth
  19. 0  {lib → }/templates/apache/config/rubber/role/web_tools/tools-index.html
  20. 0  {lib → }/templates/apache/config/rubber/rubber-apache.yml
  21. 0  {lib → }/templates/apache/templates.yml
  22. 0  {lib → }/templates/base/Capfile
  23. 0  {lib → }/templates/base/config/deploy.rb
  24. 0  {lib → }/templates/base/config/rubber/common/crontab
  25. 0  {lib → }/templates/base/config/rubber/common/monit-postfix.conf
  26. 0  {lib → }/templates/base/config/rubber/common/rubber.profile
  27. 0  {lib → }/templates/base/config/rubber/deploy-setup.rb
  28. 0  {lib → }/templates/base/config/rubber/deploy-util.rb
  29. 0  {lib → }/templates/base/config/rubber/rubber-dns.yml
  30. 0  {lib → }/templates/base/config/rubber/rubber-rvm.yml
  31. 0  {lib → }/templates/base/config/rubber/rubber.yml
  32. 0  {lib → }/templates/base/script/cron-rake
  33. 0  {lib → }/templates/base/script/cron-runner
  34. 0  {lib → }/templates/base/script/cron-sh
  35. +0 −4 {lib → }/templates/base/templates.rb
  36. 0  {lib → }/templates/base/templates.yml
  37. 0  {lib → }/templates/cassandra/config/rubber/deploy-cassandra.rb
  38. 0  {lib → }/templates/cassandra/config/rubber/role/cassandra/cassandra.in.sh
  39. 0  {lib → }/templates/cassandra/config/rubber/role/cassandra/cassandra.yaml
  40. 0  {lib → }/templates/cassandra/config/rubber/role/cassandra/log4j-server.properties
  41. 0  {lib → }/templates/cassandra/config/rubber/role/cassandra/monit-cassandra.conf
  42. 0  {lib → }/templates/cassandra/config/rubber/rubber-cassandra.yml
  43. 0  {lib → }/templates/cassandra/templates.yml
  44. 0  {lib → }/templates/complete_mongrel_mysql/config/rubber/role/haproxy/haproxy-mongrel.conf
  45. 0  {lib → }/templates/complete_mongrel_mysql/config/rubber/role/nginx/nginx-mongrel.conf
  46. 0  {lib → }/templates/complete_mongrel_mysql/config/rubber/rubber-complete.yml
  47. 0  {lib → }/templates/complete_mongrel_mysql/templates.yml
  48. 0  {lib → }/templates/complete_passenger/config/rubber/role/haproxy/haproxy-passenger.conf
  49. 0  {lib → }/templates/complete_passenger/config/rubber/rubber-complete.yml
  50. 0  {lib → }/templates/complete_passenger/templates.rb
  51. 0  {lib → }/templates/complete_passenger/templates.yml
  52. 0  {lib → }/templates/complete_passenger_mysql/templates.yml
  53. 0  {lib → }/templates/complete_passenger_postgresql/templates.yml
  54. 0  {lib → }/templates/cruise/config/rubber/deploy-cruise.rb
  55. 0  {lib → }/templates/cruise/config/rubber/role/cruise/cruise
  56. 0  {lib → }/templates/cruise/config/rubber/role/cruise/my.cnf
  57. 0  {lib → }/templates/cruise/config/rubber/role/cruise/production.rb
  58. 0  {lib → }/templates/cruise/config/rubber/role/cruise/site_config.rb
  59. 0  {lib → }/templates/cruise/config/rubber/role/web_tools/cruise-nginx.conf
  60. 0  {lib → }/templates/cruise/config/rubber/rubber-cruise.yml
  61. 0  {lib → }/templates/cruise/templates.yml
  62. 0  {lib → }/templates/haproxy/config/rubber/deploy-haproxy.rb
  63. 0  {lib → }/templates/haproxy/config/rubber/role/haproxy/haproxy-base.conf
  64. 0  {lib → }/templates/haproxy/config/rubber/role/haproxy/haproxy-default.conf
  65. 0  {lib → }/templates/haproxy/config/rubber/role/haproxy/monit-haproxy.conf
  66. 0  {lib → }/templates/haproxy/config/rubber/role/haproxy/syslog-haproxy.conf
  67. 0  {lib → }/templates/haproxy/config/rubber/role/haproxy/syslogd-default.conf
  68. 0  {lib → }/templates/haproxy/config/rubber/role/web_tools/haproxy-nginx.conf
  69. 0  {lib → }/templates/haproxy/config/rubber/rubber-haproxy.yml
  70. 0  {lib → }/templates/haproxy/templates.yml
  71. 0  {lib → }/templates/jetty/config/rubber/deploy-jetty.rb
  72. 0  {lib → }/templates/jetty/config/rubber/role/jetty/jetty.sh
  73. 0  {lib → }/templates/jetty/config/rubber/role/jetty/jetty.xml
  74. 0  {lib → }/templates/jetty/config/rubber/role/jetty/monit-jetty.conf
  75. 0  {lib → }/templates/jetty/config/rubber/rubber-jetty.yml
  76. 0  {lib → }/templates/jetty/templates.yml
  77. 0  {lib → }/templates/memcached/config/memcached.yml
  78. 0  {lib → }/templates/memcached/config/rubber/common/memcached.yml
  79. 0  {lib → }/templates/memcached/config/rubber/role/memcached/memcached.conf
  80. 0  {lib → }/templates/memcached/config/rubber/role/memcached/memcached_munin_plugin
  81. 0  {lib → }/templates/memcached/config/rubber/rubber-memcached.yml
  82. 0  {lib → }/templates/memcached/templates.yml
  83. 0  {lib → }/templates/minimal_mysql/templates.yml
  84. 0  {lib → }/templates/minimal_nodb/templates.yml
  85. 0  {lib → }/templates/mongodb/config/rubber/deploy-mongodb.rb
  86. 0  {lib → }/templates/mongodb/config/rubber/role/mongodb/mongodb.conf
  87. 0  {lib → }/templates/mongodb/config/rubber/role/mongodb/monit-mongodb.cnf
  88. 0  {lib → }/templates/mongodb/config/rubber/rubber-mongodb.yml
  89. 0  {lib → }/templates/mongodb/templates.yml
  90. 0  {lib → }/templates/mongrel/config/rubber/deploy-mongrel.rb
  91. 0  {lib → }/templates/mongrel/config/rubber/role/mongrel/mongrel_cluster.yml
  92. 0  {lib → }/templates/mongrel/config/rubber/role/mongrel/monit-mongrel.conf
  93. 0  {lib → }/templates/mongrel/config/rubber/rubber-mongrel.yml
  94. 0  {lib → }/templates/mongrel/templates.yml
  95. 0  {lib → }/templates/monit/config/rubber/common/monit-default.conf
  96. 0  {lib → }/templates/monit/config/rubber/common/monit.conf
  97. 0  {lib → }/templates/monit/config/rubber/deploy-monit.rb
  98. 0  {lib → }/templates/monit/config/rubber/role/web_tools/monit-admin-nginx.conf
  99. 0  {lib → }/templates/monit/config/rubber/rubber-monit.yml
  100. 0  {lib → }/templates/monit/templates.yml
  101. 0  {lib → }/templates/munin/config/rubber/common/monit-munin.conf
  102. 0  {lib → }/templates/munin/config/rubber/common/munin-node.conf
  103. 0  {lib → }/templates/munin/config/rubber/common/munin-plugins.conf
  104. 0  {lib → }/templates/munin/config/rubber/deploy-munin.rb
  105. 0  {lib → }/templates/munin/config/rubber/role/web_tools/munin-nginx.conf
  106. 0  {lib → }/templates/munin/config/rubber/role/web_tools/munin-plugins.conf
  107. 0  {lib → }/templates/munin/config/rubber/role/web_tools/munin.conf
  108. 0  {lib → }/templates/munin/config/rubber/rubber-munin.yml
  109. 0  {lib → }/templates/munin/script/munin/example_mysql_query.rb
  110. 0  {lib → }/templates/munin/script/munin/example_simple.rb
  111. 0  {lib → }/templates/munin/templates.yml
  112. 0  {lib → }/templates/mysql/config/rubber/common/database.yml
  113. 0  {lib → }/templates/mysql/config/rubber/deploy-mysql.rb
  114. 0  {lib → }/templates/mysql/config/rubber/role/db/apparmor-mysql.conf
  115. 0  {lib → }/templates/mysql/config/rubber/role/db/crontab
  116. 0  {lib → }/templates/mysql/config/rubber/role/db/monit-mysql.cnf
  117. 0  {lib → }/templates/mysql/config/rubber/role/db/my.cnf
  118. 0  {lib → }/templates/mysql/config/rubber/role/mysql_slave/mysql_slave_munin_plugin
  119. 0  {lib → }/templates/mysql/config/rubber/rubber-mysql.yml
  120. 0  {lib → }/templates/mysql/templates.yml
  121. 0  {lib → }/templates/mysql_cluster/config/rubber/common/mysql_cluster_migrations.rb
  122. 0  {lib → }/templates/mysql_cluster/config/rubber/deploy-mysql_cluster.rb
  123. 0  {lib → }/templates/mysql_cluster/config/rubber/role/mysql_data/my.cnf
  124. 0  {lib → }/templates/mysql_cluster/config/rubber/role/mysql_mgm/ndb_mgmd.cnf
  125. 0  {lib → }/templates/mysql_cluster/config/rubber/role/mysql_sql/monit-mysql_cluster_sql.cnf
  126. 0  {lib → }/templates/mysql_cluster/config/rubber/role/mysql_sql/my.cnf
  127. 0  {lib → }/templates/mysql_cluster/config/rubber/rubber-mysql_cluster.yml
  128. 0  {lib → }/templates/mysql_cluster/templates.yml
  129. 0  {lib → }/templates/mysql_proxy/config/rubber/common/database.yml
  130. 0  {lib → }/templates/mysql_proxy/config/rubber/common/monit-mysql_proxy.cnf
  131. 0  {lib → }/templates/mysql_proxy/config/rubber/common/mysql-proxy
  132. 0  {lib → }/templates/mysql_proxy/config/rubber/common/mysql-proxy.conf
  133. 0  {lib → }/templates/mysql_proxy/config/rubber/common/mysql-proxy.lua
  134. 0  {lib → }/templates/mysql_proxy/config/rubber/deploy-mysql_proxy.rb
  135. 0  {lib → }/templates/mysql_proxy/config/rubber/rubber-mysql_proxy.yml
  136. 0  {lib → }/templates/mysql_proxy/templates.yml
  137. 0  {lib → }/templates/nginx/config/rubber/deploy-nginx.rb
  138. 0  {lib → }/templates/nginx/config/rubber/role/nginx/crontab
  139. 0  {lib → }/templates/nginx/config/rubber/role/nginx/monit-nginx.conf
  140. 0  {lib → }/templates/nginx/config/rubber/role/nginx/nginx.conf
  141. 0  {lib → }/templates/nginx/config/rubber/role/web_tools/nginx-tools.conf
  142. 0  {lib → }/templates/nginx/config/rubber/role/web_tools/tools-index.html
  143. 0  {lib → }/templates/nginx/config/rubber/role/web_tools/tools-nginx.auth
  144. 0  {lib → }/templates/nginx/config/rubber/rubber-nginx.yml
  145. 0  {lib → }/templates/nginx/templates.yml
  146. 0  {lib → }/templates/passenger/config/rubber/deploy-passenger.rb
  147. 0  {lib → }/templates/passenger/config/rubber/role/passenger/munin-passenger-memory.conf
  148. 0  {lib → }/templates/passenger/config/rubber/role/passenger/munin-passenger-sudoers.conf
  149. 0  {lib → }/templates/passenger/config/rubber/role/passenger/munin-passenger.conf
  150. 0  {lib → }/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf
  151. 0  {lib → }/templates/passenger/config/rubber/role/passenger/passenger.conf
  152. 0  {lib → }/templates/passenger/config/rubber/rubber-passenger.yml
  153. 0  {lib → }/templates/passenger/templates.yml
  154. 0  {lib → }/templates/postgresql/config/rubber/common/database.yml
  155. 0  {lib → }/templates/postgresql/config/rubber/deploy-postgresql.rb
  156. 0  {lib → }/templates/postgresql/config/rubber/role/db/crontab
  157. 0  {lib → }/templates/postgresql/config/rubber/role/db/monit-postgresql.conf
  158. 0  {lib → }/templates/postgresql/config/rubber/role/db/munin-postgresql.conf
  159. 0  {lib → }/templates/postgresql/config/rubber/role/db/pg_hba.conf
  160. 0  {lib → }/templates/postgresql/config/rubber/role/db/postgresql-sysctl.conf
  161. 0  {lib → }/templates/postgresql/config/rubber/role/db/postgresql.conf
  162. 0  {lib → }/templates/postgresql/config/rubber/rubber-postgresql.yml
  163. 0  {lib → }/templates/postgresql/templates.yml
  164. 0  {lib → }/templates/redis/config/rubber/deploy-redis.rb
  165. 0  {lib → }/templates/redis/config/rubber/role/redis/crontab
  166. 0  {lib → }/templates/redis/config/rubber/role/redis/monit-redis.conf
  167. 0  {lib → }/templates/redis/config/rubber/role/redis/redis-sysctl.conf
  168. 0  {lib → }/templates/redis/config/rubber/role/redis/redis.conf
  169. 0  {lib → }/templates/redis/config/rubber/rubber-redis.yml
  170. 0  {lib → }/templates/redis/templates.yml
  171. 0  {lib → }/templates/resque/config/initializers/resque.rb
  172. 0  {lib → }/templates/resque/config/rubber/common/resque.yml
  173. 0  {lib → }/templates/resque/config/rubber/deploy-resque.rb
  174. 0  {lib → }/templates/resque/config/rubber/role/resque_web/monit-resque_web.conf
  175. 0  {lib → }/templates/resque/config/rubber/role/resque_worker/monit-resque_worker.conf
  176. 0  {lib → }/templates/resque/config/rubber/rubber-resque.yml
  177. 0  {lib → }/templates/resque/script/resque_worker_management.rb
  178. 0  {lib → }/templates/resque/templates.rb
  179. 0  {lib → }/templates/resque/templates.yml
  180. 0  {lib → }/templates/sphinx/config/rubber/common/sphinx.yml
  181. 0  {lib → }/templates/sphinx/config/rubber/deploy-sphinx.rb
  182. 0  {lib → }/templates/sphinx/config/rubber/role/sphinx/crontab
  183. 0  {lib → }/templates/sphinx/config/rubber/role/sphinx/monit-sphinx.conf
  184. 0  {lib → }/templates/sphinx/config/rubber/rubber-sphinx.yml
  185. 0  {lib → }/templates/sphinx/templates.yml
View
1  lib/rubber.rb
@@ -59,6 +59,7 @@ def self.instances
end
+require 'rubber/version'
require 'rubber/thread_safe_proxy'
require 'rubber/configuration'
require 'rubber/environment'
View
179 lib/rubber/cli.rb
@@ -1,161 +1,90 @@
require "thor"
+require "thor/group"
+require "thor/runner"
module Rubber
class CLI < Thor
- include Thor::Actions
-
- def self.source_root
- File.expand_path(File.join(File.dirname(__FILE__), '..', 'templates'))
- end
-
- desc "config", "Generate system config files by transforming the files in the config/rubber tree"
- method_options :host => :string, :roles => :string, :file => :string,
- :no_post => :boolean, :force => :boolean
-
- def config
- cfg = Rubber::Configuration.get_configuration(Rubber.env)
- instance_alias = cfg.environment.current_host
- instance = cfg.instance[instance_alias]
- if instance
- roles = instance.role_names
- env = cfg.environment.bind(roles, instance_alias)
- gen = Rubber::Configuration::Generator.new("#{Rubber.root}/config/rubber", roles, instance_alias)
- elsif ['development', 'test'].include?(Rubber.env)
- instance_alias = options[:host] || instance_alias
- roles = options[:roles].split(',') if options[:roles]
- roles ||= cfg.environment.known_roles
- role_items = roles.collect do |r|
- Rubber::Configuration::RoleItem.new(r, r == "db" ? {'primary' => true} : {})
- end
- env = cfg.environment.bind(roles, instance_alias)
- domain = env.domain
- instance = Rubber::Configuration::InstanceItem.new(instance_alias, domain, role_items,
- 'dummyid', 'm1.small', 'ami-7000f019', ['dummygroup'])
- instance.external_host = instance.full_name
- instance.external_ip = "127.0.0.1"
- instance.internal_host = instance.full_name
- instance.internal_ip = "127.0.0.1"
- cfg.instance.add(instance)
- gen = Rubber::Configuration::Generator.new("#{Rubber.root}/config/rubber", roles, instance_alias)
- gen.fake_root ="#{Rubber.root}/tmp/rubber"
+ # Override Thor#help so it can give information about any class and any method.
+ #
+ def help(meth = nil)
+ initialize_thorfiles
+ if meth && !self.respond_to?(meth)
+ klass, task = find_class_and_task_by_namespace(meth)
+ klass.start(["-h", task].compact, :shell => self.shell)
else
- puts "Instance not found for host: #{instance_alias}"
- exit 1
+ display_klasses
end
+ end
- if options[:file]
- gen.file_pattern = options[:file]
- end
- gen.no_post = options[:no_post]
- gen.force = options[:force]
- gen.stop_on_error_cmd = env.stop_on_error_cmd
- gen.run
+ # If a task is not found on Thor::Runner, method missing is invoked and
+ # Thor::Runner is then responsable for finding the task in all classes.
+ #
+ def method_missing(meth, *args)
+ initialize_thorfiles
- end
+ klass, task = find_class_and_task_by_namespace(meth)
- def self.valid_templates()
- valid = Dir.entries(self.source_root).delete_if {|e| e =~ /(^\.)|svn|CVS/ }
+ args.unshift(task) if task
+ klass.start(args, :shell => self.shell)
end
- desc "vulcanize TEMPLATE", <<-EOS
- Prepares the rails application for deploying with rubber by installing
- a sample rubber configuration template.
+ private
- e.g. rubber vulcanize complete_passenger_postgresql
+ def find_class_and_task_by_namespace(meth)
+ meth = meth.to_s
- where TEMPLATE is one of:
- #{valid_templates.join(", ")}
- EOS
+ pieces = meth.split(":")
+ task = pieces.pop
+ namespace = pieces.join(":")
+ namespace = "default#{namespace}" if namespace.empty? || namespace =~ /^:/
- def vulcanize(template_name)
- @template_dependencies = find_dependencies(template_name)
- ([template_name] + @template_dependencies).each do |template|
- apply_template(template)
- end
+ klass = Thor::Base.subclasses.find { |k| k.namespace == namespace && k.tasks[task] }
+ return klass, task
end
- protected
-
- # helper to test for rails for optional templates
- def rails?
- Rubber::Util::is_rails?
+ def self.exit_on_failure?
+ true
end
- def find_dependencies(name)
- template_dir = File.join(self.class.source_root, name, '')
- unless File.directory?(template_dir)
- raise Thor::Error.new("Invalid template #{name}, use one of #{valid_templates.join(', ')}")
- end
-
- template_conf = load_template_config(template_dir)
- template_dependencies = template_conf['dependent_templates'] || []
-
- template_dependencies.clone.each do |dep|
- template_dependencies.concat(find_dependencies(dep))
+ def initialize_thorfiles
+ files = Dir[File.expand_path(File.join(File.dirname(__FILE__), 'commands/*.rb'))]
+ files.each do |f|
+ require f
end
-
- return template_dependencies.uniq
end
- def apply_template(name)
- template_dir = File.join(self.class.source_root, name, '')
- unless File.directory?(template_dir)
- raise Thor::Error.new("Invalid template #{name}, use one of #{valid_templates.join(', ')}")
- end
-
- template_conf = load_template_config(template_dir)
-
- extra_generator_steps_file = File.join(template_dir, 'templates.rb')
+ def display_klasses(show_internal=false, klasses=Thor::Base.subclasses)
+ klasses -= [Thor, Thor::Runner, Thor::Group] unless show_internal
- Find.find(template_dir) do |f|
- Find.prune if f == File.join(template_dir, 'templates.yml') # don't copy over templates.yml
- Find.prune if f == extra_generator_steps_file # don't copy over templates.rb
+ raise Error, "No Thor tasks available" if klasses.empty?
- template_rel = f.gsub(/#{template_dir}/, '')
- source_rel = f.gsub(/#{self.class.source_root}\//, '')
- dest_rel = source_rel.gsub(/^#{name}\//, '')
-
- # Only include optional files when their conditions eval to true
- optional = template_conf['optional'][template_rel] rescue nil
- Find.prune if optional && ! eval(optional)
-
- if File.directory?(f)
- empty_directory(dest_rel)
- else
- copy_file(source_rel, dest_rel)
- src_mode = File.stat(f).mode
- dest_mode = File.stat(File.join(destination_root, dest_rel)).mode
- chmod(dest_rel, src_mode) if src_mode != dest_mode
- end
- end
+ list = Hash.new { |h,k| h[k] = [] }
+ groups = klasses.select { |k| k.ancestors.include?(Thor::Group) }
- if File.exist? extra_generator_steps_file
- eval File.read(extra_generator_steps_file), binding, extra_generator_steps_file
- end
- end
+ # Get classes which inherit from Thor
+ (klasses - groups).each { |k| list[k.namespace.split(":").first] += k.printable_tasks(false) }
- def load_template_config(template_dir)
- YAML.load(File.read(File.join(template_dir, 'templates.yml'))) rescue {}
- end
+ # Get classes which inherit from Thor::Base
+ groups.map! { |k| k.printable_tasks(false).first }
+ list["root"] = groups
- def rubber_env()
- Rubber::Configuration.rubber_env
+ # Order namespaces with default coming first
+ list = list.sort{ |a,b| a[0].sub(/^default/, '') <=> b[0].sub(/^default/, '') }
+ list.each { |n, tasks| display_tasks(n, tasks) unless tasks.empty? }
end
- def rubber_instances()
- Rubber::Configuration.rubber_instances
- end
+ def display_tasks(namespace, list) #:nodoc:
+ list.sort!{ |a,b| a[0] <=> b[0] }
- def cloud_provider
- rubber_env.cloud_providers[rubber_env.cloud_provider]
- end
+ say shell.set_color(namespace, :blue, true)
+ say "-" * namespace.size
- def init_s3()
- AWS::S3::Base.establish_connection!(:access_key_id => cloud_provider.access_key, :secret_access_key => cloud_provider.secret_access_key)
+ print_table(list, :truncate => true)
+ say
end
end
-
+
end
View
69 lib/rubber/commands/config.rb
@@ -0,0 +1,69 @@
+
+module Rubber
+ module Commands
+
+ class Config < Thor
+
+ namespace :default
+
+ method_option :host, :type => :string, :aliases => "-h",
+ :desc => "Override the instance's host for generation"
+ method_option :roles, :type => :string, :aliases => "-r",
+ :desc => "Override the instance's roles for generation"
+ method_option :file, :type => :boolean, :aliases => "-p",
+ :desc => "Only generate files that match the given pattern"
+ method_option :no_post, :type => :boolean, :aliases => "-n",
+ :desc => "Skip running post commands for files that get generated"
+ method_option :force, :type => :boolean, :aliases => "-f",
+ :desc => "Overwrite files that already exist"
+
+ desc "config", Rubber::Util.clean_indent(<<-EOS
+ Generate system config files by transforming the files in the config/rubber tree
+ EOS
+ )
+
+ def config
+ cfg = Rubber::Configuration.get_configuration(Rubber.env)
+ instance_alias = cfg.environment.current_host
+ instance = cfg.instance[instance_alias]
+ if instance
+ roles = instance.role_names
+ env = cfg.environment.bind(roles, instance_alias)
+ gen = Rubber::Configuration::Generator.new("#{Rubber.root}/config/rubber", roles, instance_alias)
+ elsif ['development', 'test'].include?(Rubber.env)
+ instance_alias = options[:host] || instance_alias
+ roles = options[:roles].split(',') if options[:roles]
+ roles ||= cfg.environment.known_roles
+ role_items = roles.collect do |r|
+ Rubber::Configuration::RoleItem.new(r, r == "db" ? {'primary' => true} : {})
+ end
+ env = cfg.environment.bind(roles, instance_alias)
+ domain = env.domain
+ instance = Rubber::Configuration::InstanceItem.new(instance_alias, domain, role_items,
+ 'dummyid', 'm1.small', 'ami-7000f019', ['dummygroup'])
+ instance.external_host = instance.full_name
+ instance.external_ip = "127.0.0.1"
+ instance.internal_host = instance.full_name
+ instance.internal_ip = "127.0.0.1"
+ cfg.instance.add(instance)
+ gen = Rubber::Configuration::Generator.new("#{Rubber.root}/config/rubber", roles, instance_alias)
+ gen.fake_root ="#{Rubber.root}/tmp/rubber"
+ else
+ puts "Instance not found for host: #{instance_alias}"
+ exit 1
+ end
+
+ if options[:file]
+ gen.file_pattern = options[:file]
+ end
+ gen.no_post = options[:no_post]
+ gen.force = options[:force]
+ gen.stop_on_error_cmd = env.stop_on_error_cmd
+ gen.run
+
+ end
+
+ end
+
+ end
+end
View
211 lib/rubber/commands/util.rb
@@ -0,0 +1,211 @@
+
+module Rubber
+ module Commands
+
+ class Util < Thor
+
+ namespace :util
+
+ desc "rotate_logs", Rubber::Util.clean_indent( <<-EOS
+ Rotate rails app server logfiles. Should be run right after midnight.
+ EOS
+ )
+
+ method_option :directory,
+ :required => true,
+ :type => :string, :aliases => "-d",
+ :desc => "The directory containing log files to be rotated"
+ method_option :pattern,
+ :default => "*.log",
+ :type => :string, :aliases => "-p",
+ :desc => "The glob pattern for matching log files"
+ method_option :age,
+ :default => 7,
+ :type => :numeric, :aliases => "-a",
+ :desc => "The number of days rotated log files are kept around for"
+
+ def rotate_logs
+ log_src_dir = options.directory
+ log_file_glob = options.pattern
+ log_file_age = options.age.to_i
+
+ rotated_date = (Date.today - 1).strftime('%Y%m%d')
+ puts "Rotating logfiles located at: #{log_src_dir}/#{log_file_glob}"
+ Dir["#{log_src_dir}/#{log_file_glob}"].each do |logfile|
+ rotated_file = "#{logfile}.#{rotated_date}"
+ if File.exist?(rotated_file)
+ rotated_file += "_#{Time.now.to_i}"
+ end
+ FileUtils.cp(logfile, rotated_file)
+ File.truncate logfile, 0
+ end
+
+ tdate = Date.today - log_file_age
+ threshold = Time.local(tdate.year, tdate.month, tdate.day)
+ puts "Cleaning rotated log files older than #{log_file_age} days"
+ Dir["#{log_src_dir}/#{log_file_glob}.[0-9]*"].each do |logfile|
+ if File.mtime(logfile) < threshold
+ FileUtils.rm_f(logfile)
+ end
+ end
+ end
+
+ desc "backup", Rubber::Util.clean_indent(<<-EOS
+ Performs a cyclical backup by storing the results of COMMAND to the backup directory (and s3)
+ EOS
+ )
+
+ method_option :command,
+ :required => true,
+ :type => :string, :aliases => "-c",
+ :desc => "The command used to extract the data to be backed up"
+ method_option :directory,
+ :required => true,
+ :type => :string, :aliases => "-d",
+ :desc => "The directory to stage the backups into"
+ method_option :name,
+ :required => true,
+ :type => :string, :aliases => "-n",
+ :desc => "What to name the backup"
+ method_option :age,
+ :default => 3,
+ :type => :numeric, :aliases => "-a",
+ :desc => "The number of days rotated backups are kept around for"
+ def backup
+ dir = options.directory
+ name = options.name
+ cmd = options.command
+ age = options.age.to_i
+
+ time_stamp = Time.now.strftime("%Y-%m-%d_%H-%M")
+ FileUtils.mkdir_p(dir)
+
+ backup_cmd = cmd.gsub(/%([^%]+)%/, '#{\1}')
+ backup_cmd = eval('%Q{' + backup_cmd + '}')
+
+ puts "Backing up with command:"
+ sh backup_cmd
+ puts "Backup created"
+
+ s3_prefix = "#{name}/"
+ backup_bucket = cloud_provider.backup_bucket
+ if backup_bucket
+ init_s3
+ unless AWS::S3::Bucket.list.find { |b| b.name == backup_bucket }
+ AWS::S3::Bucket.create(backup_bucket)
+ end
+ newest = Dir.entries(dir).grep(/^[^.]/).sort_by {|f| File.mtime(File.join(dir,f))}.last
+ dest = "#{s3_prefix}#{newest}"
+ puts "Saving backup to S3: #{backup_bucket}:#{dest}"
+ AWS::S3::S3Object.store(dest, open(File.join(dir, newest)), backup_bucket)
+ end
+
+ tdate = Date.today - age
+ threshold = Time.local(tdate.year, tdate.month, tdate.day)
+ puts "Cleaning backups older than #{age} days"
+ Dir["#{dir}/*"].each do |file|
+ if File.mtime(file) < threshold
+ puts "Deleting #{file}"
+ FileUtils.rm_f(file)
+ end
+ end
+
+ if backup_bucket
+ puts "Cleaning S3 backups older than #{age} days from: #{backup_bucket}:#{s3_prefix}"
+ AWS::S3::Bucket.objects(backup_bucket, :prefix => s3_prefix).clone.each do |obj|
+ if Time.parse(obj.about["last-modified"]) < threshold
+ puts "Deleting #{obj.key}"
+ obj.delete
+ end
+ end
+ end
+ end
+
+ desc "backup_db", <<-DESC
+ Backup database to given backup directory
+ The following arguments affect behavior:
+ BACKUP_DIR (required): Directory where db backups will be stored
+ BACKUP_AGE (3): Delete rotated logs older than this many days in the past
+ DBUSER (required) User to connect to the db as
+ DBPASS (optional): Pass to connect to the db with
+ DBHOST (required): Host where the db is
+ DBNAME (required): Database name to backup
+ DESC
+ def backup_db
+ options[''] =
+ dir = get_env('BACKUP_DIR', true)
+ age = (get_env('BACKUP_AGE') || 3).to_i
+ time_stamp = Time.now.strftime("%Y-%m-%d_%H-%M")
+ backup_file = "#{dir}/#{RUBBER_ENV}_dump_#{time_stamp}.sql.gz"
+ FileUtils.mkdir_p(File.dirname(backup_file))
+
+ user = options.user
+ pass = options.password
+ host = options.host
+ name = options.db
+ options.command = db_backup_cmd
+ raise "No db_backup_cmd defined in rubber.yml, cannot backup!" unless rubber_env.db_backup_cmd
+ db_backup_cmd = rubber_env.db_backup_cmd.gsub(/%([^%]+)%/, '#{\1}')
+ db_backup_cmd = eval('%Q{' + db_backup_cmd + '}')
+
+ puts "Backing up database with command:"
+ sh db_backup_cmd
+ puts "Created backup: #{backup_file}"
+
+ s3_prefix = "db/"
+ backup_bucket = cloud_provider.backup_bucket
+ if backup_bucket
+ init_s3
+ unless AWS::S3::Bucket.list.find { |b| b.name == backup_bucket }
+ AWS::S3::Bucket.create(backup_bucket)
+ end
+ dest = "#{s3_prefix}#{File.basename(backup_file)}"
+ puts "Saving db backup to S3: #{backup_bucket}:#{dest}"
+ AWS::S3::S3Object.store(dest, open(backup_file), backup_bucket)
+ end
+
+ tdate = Date.today - age
+ threshold = Time.local(tdate.year, tdate.month, tdate.day)
+ puts "Cleaning backups older than #{age} days"
+ Dir["#{dir}/*"].each do |file|
+ if File.mtime(file) < threshold
+ puts "Deleting #{file}"
+ FileUtils.rm_f(file)
+ end
+ end
+
+ if backup_bucket
+ puts "Cleaning S3 backups older than #{age} days from: #{backup_bucket}:#{s3_prefix}"
+ AWS::S3::Bucket.objects(backup_bucket, :prefix => s3_prefix).clone.each do |obj|
+ if Time.parse(obj.about["last-modified"]) < threshold
+ puts "Deleting #{obj.key}"
+ obj.delete
+ end
+ end
+ end
+ end
+
+
+ protected
+
+
+ def rubber_env()
+ Rubber::Configuration.rubber_env
+ end
+
+ def rubber_instances()
+ Rubber::Configuration.rubber_instances
+ end
+
+ def cloud_provider
+ rubber_env.cloud_providers[rubber_env.cloud_provider]
+ end
+
+ def init_s3()
+ AWS::S3::Base.establish_connection!(:access_key_id => cloud_provider.access_key, :secret_access_key => cloud_provider.secret_access_key)
+ end
+
+ end
+
+ end
+end
View
122 lib/rubber/commands/vulcanize.rb
@@ -0,0 +1,122 @@
+
+module Rubber
+ module Commands
+
+ class Vulcanize < Thor
+
+ namespace :default
+
+ include Thor::Actions
+ add_runtime_options!
+
+ def self.source_root
+ File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'templates'))
+ end
+
+ def self.valid_templates()
+ valid = Dir.entries(self.source_root).delete_if {|e| e =~ /(^\.)|svn|CVS/ }
+ end
+
+ desc "vulcanize TEMPLATE", Rubber::Util.clean_indent(<<-EOS
+ Prepares the rails application for deploying with rubber by installing
+ a sample rubber configuration template.
+
+ e.g. rubber vulcanize complete_passenger_postgresql
+
+ where TEMPLATE is one of:
+ #{valid_templates.join(", ")}
+ EOS
+ )
+
+ def vulcanize(template_name)
+ (template_name)
+ @template_dependencies = find_dependencies(template_name)
+ ([template_name] + @template_dependencies).each do |template|
+ apply_template(template)
+ end
+ end
+
+ protected
+
+ # helper to test for rails for optional templates
+ def rails?
+ Rubber::Util::is_rails?
+ end
+
+ def find_dependencies(name)
+ template_dir = File.join(self.class.source_root, name, '')
+ unless File.directory?(template_dir)
+ raise Thor::Error.new("Invalid template #{name}, use one of #{self.class.valid_templates.join(', ')}")
+ end
+
+ template_conf = load_template_config(template_dir)
+ template_dependencies = template_conf['dependent_templates'] || []
+
+ template_dependencies.clone.each do |dep|
+ template_dependencies.concat(find_dependencies(dep))
+ end
+
+ return template_dependencies.uniq
+ end
+
+ def apply_template(name)
+ template_dir = File.join(self.class.source_root, name, '')
+ unless File.directory?(template_dir)
+ raise Thor::Error.new("Invalid template #{name}, use one of #{self.class.valid_templates.join(', ')}")
+ end
+
+ template_conf = load_template_config(template_dir)
+
+ extra_generator_steps_file = File.join(template_dir, 'templates.rb')
+
+ Find.find(template_dir) do |f|
+ Find.prune if f == File.join(template_dir, 'templates.yml') # don't copy over templates.yml
+ Find.prune if f == extra_generator_steps_file # don't copy over templates.rb
+
+ template_rel = f.gsub(/#{template_dir}/, '')
+ source_rel = f.gsub(/#{self.class.source_root}\//, '')
+ dest_rel = source_rel.gsub(/^#{name}\//, '')
+
+ # Only include optional files when their conditions eval to true
+ optional = template_conf['optional'][template_rel] rescue nil
+ Find.prune if optional && ! eval(optional)
+
+ if File.directory?(f)
+ empty_directory(dest_rel)
+ else
+ copy_file(source_rel, dest_rel)
+ src_mode = File.stat(f).mode
+ dest_mode = File.stat(File.join(destination_root, dest_rel)).mode
+ chmod(dest_rel, src_mode) if src_mode != dest_mode
+ end
+ end
+
+ if File.exist? extra_generator_steps_file
+ eval File.read(extra_generator_steps_file), binding, extra_generator_steps_file
+ end
+ end
+
+ def load_template_config(template_dir)
+ YAML.load(File.read(File.join(template_dir, 'templates.yml'))) rescue {}
+ end
+
+ def rubber_env()
+ Rubber::Configuration.rubber_env
+ end
+
+ def rubber_instances()
+ Rubber::Configuration.rubber_instances
+ end
+
+ def cloud_provider
+ rubber_env.cloud_providers[rubber_env.cloud_provider]
+ end
+
+ def init_s3()
+ AWS::S3::Base.establish_connection!(:access_key_id => cloud_provider.access_key, :secret_access_key => cloud_provider.secret_access_key)
+ end
+
+ end
+
+ end
+end
View
9 lib/rubber/environment.rb
@@ -43,9 +43,12 @@ def read_config(file)
def known_roles
roles_dir = File.join(@config_root, "role")
- roles = Dir.entries(roles_dir)
- roles.delete_if {|d| d =~ /(^\..*)/}
- roles += @items['roles'].keys
+ roles = []
+ if File.exist?(roles_dir)
+ roles = Dir.entries(roles_dir)
+ roles.delete_if {|d| d =~ /(^\..*)/}
+ roles += @items['roles'].keys
+ end
return roles.compact.uniq
end
View
10 lib/rubber/util.rb
@@ -83,6 +83,14 @@ def self.fatal(msg, code=1)
puts msg
exit code
end
-
+
+ # remove leading whitespace from "here" strings so they look good in code
+ # skips empty lines
+ def self.clean_indent(str)
+ counts = str.lines.collect {|l| l.scan(/^\s*/).first.size }
+ m = counts.reject {|x| x <= 1 }.min
+ str.lines.collect {|l| l.size < m ? l : l[m..-1] }.join("")
+ end
+
end
end
View
27 lib/templates/base/Rakefile
@@ -1,27 +0,0 @@
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-if ARGV.grep(/rubber:/).empty?
- RAILS_LOADER
-
- env = ENV['RUBBER_ENV'] ||= (ENV['RAILS_ENV'] || 'development')
- RAILS_ENV = ENV['RAILS_ENV'] = env
- root = File.dirname(__FILE__)
-
- require 'rubber'
-
- Rubber::initialize(root, env)
-
- require 'rubber/tasks/rubber'
-
- task :console do
- ARGV.clear
- require "irb"
- IRB.start
- end
-
- RAILS_TASKS
-else
- load File.join(File.dirname(__FILE__), 'lib/tasks/rubber.rake')
-end
View
15 lib/templates/base/lib/tasks/rubber.rake
@@ -1,15 +0,0 @@
-# rails tries to load this from generator dir, so skip it.
-if __FILE__ !~ /rubber\/generators\/vulcanize/
-
- env = ENV['RUBBER_ENV'] ||= (ENV['RAILS_ENV'] || 'development')
- root = File.dirname(__FILE__) + '/../..'
-
- # this tries first as a rails plugin then as a gem
- $:.unshift "#{root}/vendor/plugins/rubber/lib/"
- require 'rubber'
-
- Rubber::initialize(root, env)
-
- require 'rubber/tasks/rubber'
-
-end
View
0  lib/templates/apache/config/rubber/deploy-apache.rb → templates/apache/config/rubber/deploy-apache.rb
File renamed without changes
View
0  ...tes/apache/config/rubber/role/apache/deflate.conf → ...tes/apache/config/rubber/role/apache/deflate.conf
File renamed without changes
View
0  ...tes/apache/config/rubber/role/apache/expires.conf → ...tes/apache/config/rubber/role/apache/expires.conf
File renamed without changes
View
0  ...tes/apache/config/rubber/role/apache/headers.conf → ...tes/apache/config/rubber/role/apache/headers.conf
File renamed without changes
View
0  ...pache/config/rubber/role/apache/monit-apache.conf → ...pache/config/rubber/role/apache/monit-apache.conf
File renamed without changes
View
0  ...lates/apache/config/rubber/role/apache/ports.conf → ...lates/apache/config/rubber/role/apache/ports.conf
File renamed without changes
View
0  ...es/apache/config/rubber/role/apache/setenvif.conf → ...es/apache/config/rubber/role/apache/setenvif.conf
File renamed without changes
View
0  ...fig/rubber/role/web_tools/tools-apache-vhost.conf → ...fig/rubber/role/web_tools/tools-apache-vhost.conf
File renamed without changes
View
0  ...he/config/rubber/role/web_tools/tools-apache.auth → ...he/config/rubber/role/web_tools/tools-apache.auth
File renamed without changes
View
0  ...che/config/rubber/role/web_tools/tools-index.html → ...che/config/rubber/role/web_tools/tools-index.html
File renamed without changes
View
0  lib/templates/apache/config/rubber/rubber-apache.yml → templates/apache/config/rubber/rubber-apache.yml
File renamed without changes
View
0  lib/templates/apache/templates.yml → templates/apache/templates.yml
File renamed without changes
View
0  lib/templates/base/Capfile → templates/base/Capfile
File renamed without changes
View
0  lib/templates/base/config/deploy.rb → templates/base/config/deploy.rb
File renamed without changes
View
0  lib/templates/base/config/rubber/common/crontab → templates/base/config/rubber/common/crontab
File renamed without changes
View
0  ...ates/base/config/rubber/common/monit-postfix.conf → ...ates/base/config/rubber/common/monit-postfix.conf
File renamed without changes
View
0  ...emplates/base/config/rubber/common/rubber.profile → templates/base/config/rubber/common/rubber.profile
File renamed without changes
View
0  lib/templates/base/config/rubber/deploy-setup.rb → templates/base/config/rubber/deploy-setup.rb
File renamed without changes
View
0  lib/templates/base/config/rubber/deploy-util.rb → templates/base/config/rubber/deploy-util.rb
File renamed without changes
View
0  lib/templates/base/config/rubber/rubber-dns.yml → templates/base/config/rubber/rubber-dns.yml
File renamed without changes
View
0  lib/templates/base/config/rubber/rubber-rvm.yml → templates/base/config/rubber/rubber-rvm.yml
File renamed without changes
View
0  lib/templates/base/config/rubber/rubber.yml → templates/base/config/rubber/rubber.yml
File renamed without changes
View
0  lib/templates/base/script/cron-rake → templates/base/script/cron-rake
File renamed without changes
View
0  lib/templates/base/script/cron-runner → templates/base/script/cron-runner
File renamed without changes
View
0  lib/templates/base/script/cron-sh → templates/base/script/cron-sh
File renamed without changes
View
4 lib/templates/base/templates.rb → templates/base/templates.rb
@@ -2,10 +2,6 @@
if Rubber::Util::is_rails2?
m.gsub_file('script/cron-runner', /RAILS_RUNNER/, 'script/runner')
- m.gsub_file('Rakefile', /RAILS_LOADER/, "require(File.join(File.dirname(__FILE__), 'config', 'boot'))")
- m.gsub_file('Rakefile', /RAILS_TASKS/, "require 'tasks/rails'")
else
gsub_file('script/cron-runner', /RAILS_RUNNER/, 'rails runner')
- gsub_file('Rakefile', /RAILS_LOADER/, '')
- gsub_file('Rakefile', /RAILS_TASKS/, '')
end
View
0  lib/templates/base/templates.yml → templates/base/templates.yml
File renamed without changes
View
0  ...lates/cassandra/config/rubber/deploy-cassandra.rb → ...lates/cassandra/config/rubber/deploy-cassandra.rb
File renamed without changes
View
0  ...ndra/config/rubber/role/cassandra/cassandra.in.sh → ...ndra/config/rubber/role/cassandra/cassandra.in.sh
File renamed without changes
View
0  ...andra/config/rubber/role/cassandra/cassandra.yaml → ...andra/config/rubber/role/cassandra/cassandra.yaml
File renamed without changes
View
0  ...fig/rubber/role/cassandra/log4j-server.properties → ...fig/rubber/role/cassandra/log4j-server.properties
File renamed without changes
View
0  ...config/rubber/role/cassandra/monit-cassandra.conf → ...config/rubber/role/cassandra/monit-cassandra.conf
File renamed without changes
View
0  ...ates/cassandra/config/rubber/rubber-cassandra.yml → ...ates/cassandra/config/rubber/rubber-cassandra.yml
File renamed without changes
View
0  lib/templates/cassandra/templates.yml → templates/cassandra/templates.yml
File renamed without changes
View
0  ...l/config/rubber/role/haproxy/haproxy-mongrel.conf → ...l/config/rubber/role/haproxy/haproxy-mongrel.conf
File renamed without changes
View
0  ...mysql/config/rubber/role/nginx/nginx-mongrel.conf → ...mysql/config/rubber/role/nginx/nginx-mongrel.conf
File renamed without changes
View
0  ...e_mongrel_mysql/config/rubber/rubber-complete.yml → ...e_mongrel_mysql/config/rubber/rubber-complete.yml
File renamed without changes
View
0  lib/templates/complete_mongrel_mysql/templates.yml → templates/complete_mongrel_mysql/templates.yml
File renamed without changes
View
0  ...config/rubber/role/haproxy/haproxy-passenger.conf → ...config/rubber/role/haproxy/haproxy-passenger.conf
File renamed without changes
View
0  ...plete_passenger/config/rubber/rubber-complete.yml → ...plete_passenger/config/rubber/rubber-complete.yml
File renamed without changes
View
0  lib/templates/complete_passenger/templates.rb → templates/complete_passenger/templates.rb
File renamed without changes
View
0  lib/templates/complete_passenger/templates.yml → templates/complete_passenger/templates.yml
File renamed without changes
View
0  lib/templates/complete_passenger_mysql/templates.yml → templates/complete_passenger_mysql/templates.yml
File renamed without changes
View
0  ...lates/complete_passenger_postgresql/templates.yml → ...lates/complete_passenger_postgresql/templates.yml
File renamed without changes
View
0  lib/templates/cruise/config/rubber/deploy-cruise.rb → templates/cruise/config/rubber/deploy-cruise.rb
File renamed without changes
View
0  ...templates/cruise/config/rubber/role/cruise/cruise → templates/cruise/config/rubber/role/cruise/cruise
File renamed without changes
View
0  ...templates/cruise/config/rubber/role/cruise/my.cnf → templates/cruise/config/rubber/role/cruise/my.cnf
File renamed without changes
View
0  ...es/cruise/config/rubber/role/cruise/production.rb → ...es/cruise/config/rubber/role/cruise/production.rb
File renamed without changes
View
0  ...s/cruise/config/rubber/role/cruise/site_config.rb → ...s/cruise/config/rubber/role/cruise/site_config.rb
File renamed without changes
View
0  ...se/config/rubber/role/web_tools/cruise-nginx.conf → ...se/config/rubber/role/web_tools/cruise-nginx.conf
File renamed without changes
View
0  lib/templates/cruise/config/rubber/rubber-cruise.yml → templates/cruise/config/rubber/rubber-cruise.yml
File renamed without changes
View
0  lib/templates/cruise/templates.yml → templates/cruise/templates.yml
File renamed without changes
View
0  ...templates/haproxy/config/rubber/deploy-haproxy.rb → templates/haproxy/config/rubber/deploy-haproxy.rb
File renamed without changes
View
0  ...roxy/config/rubber/role/haproxy/haproxy-base.conf → ...roxy/config/rubber/role/haproxy/haproxy-base.conf
File renamed without changes
View
0  ...y/config/rubber/role/haproxy/haproxy-default.conf → ...y/config/rubber/role/haproxy/haproxy-default.conf
File renamed without changes
View
0  ...oxy/config/rubber/role/haproxy/monit-haproxy.conf → ...oxy/config/rubber/role/haproxy/monit-haproxy.conf
File renamed without changes
View
0  ...xy/config/rubber/role/haproxy/syslog-haproxy.conf → ...xy/config/rubber/role/haproxy/syslog-haproxy.conf
File renamed without changes
View
0  ...y/config/rubber/role/haproxy/syslogd-default.conf → ...y/config/rubber/role/haproxy/syslogd-default.conf
File renamed without changes
View
0  ...y/config/rubber/role/web_tools/haproxy-nginx.conf → ...y/config/rubber/role/web_tools/haproxy-nginx.conf
File renamed without changes
View
0  ...emplates/haproxy/config/rubber/rubber-haproxy.yml → templates/haproxy/config/rubber/rubber-haproxy.yml
File renamed without changes
View
0  lib/templates/haproxy/templates.yml → templates/haproxy/templates.yml
File renamed without changes
View
0  lib/templates/jetty/config/rubber/deploy-jetty.rb → templates/jetty/config/rubber/deploy-jetty.rb
File renamed without changes
View
0  ...templates/jetty/config/rubber/role/jetty/jetty.sh → templates/jetty/config/rubber/role/jetty/jetty.sh
File renamed without changes
View
0  ...emplates/jetty/config/rubber/role/jetty/jetty.xml → templates/jetty/config/rubber/role/jetty/jetty.xml
File renamed without changes
View
0  ...s/jetty/config/rubber/role/jetty/monit-jetty.conf → ...s/jetty/config/rubber/role/jetty/monit-jetty.conf
File renamed without changes
View
0  lib/templates/jetty/config/rubber/rubber-jetty.yml → templates/jetty/config/rubber/rubber-jetty.yml
File renamed without changes
View
0  lib/templates/jetty/templates.yml → templates/jetty/templates.yml
File renamed without changes
View
0  lib/templates/memcached/config/memcached.yml → templates/memcached/config/memcached.yml
File renamed without changes
View
0  ...ates/memcached/config/rubber/common/memcached.yml → ...ates/memcached/config/rubber/common/memcached.yml
File renamed without changes
View
0  ...ached/config/rubber/role/memcached/memcached.conf → ...ached/config/rubber/role/memcached/memcached.conf
File renamed without changes
View
0  ...nfig/rubber/role/memcached/memcached_munin_plugin → ...nfig/rubber/role/memcached/memcached_munin_plugin
File renamed without changes
View
0  ...ates/memcached/config/rubber/rubber-memcached.yml → ...ates/memcached/config/rubber/rubber-memcached.yml
File renamed without changes
View
0  lib/templates/memcached/templates.yml → templates/memcached/templates.yml
File renamed without changes
View
0  lib/templates/minimal_mysql/templates.yml → templates/minimal_mysql/templates.yml
File renamed without changes
View
0  lib/templates/minimal_nodb/templates.yml → templates/minimal_nodb/templates.yml
File renamed without changes
View
0  ...templates/mongodb/config/rubber/deploy-mongodb.rb → templates/mongodb/config/rubber/deploy-mongodb.rb
File renamed without changes
View
0  ...s/mongodb/config/rubber/role/mongodb/mongodb.conf → ...s/mongodb/config/rubber/role/mongodb/mongodb.conf
File renamed without changes
View
0  ...godb/config/rubber/role/mongodb/monit-mongodb.cnf → ...godb/config/rubber/role/mongodb/monit-mongodb.cnf
File renamed without changes
View
0  ...emplates/mongodb/config/rubber/rubber-mongodb.yml → templates/mongodb/config/rubber/rubber-mongodb.yml
File renamed without changes
View
0  lib/templates/mongodb/templates.yml → templates/mongodb/templates.yml
File renamed without changes
View
0  ...templates/mongrel/config/rubber/deploy-mongrel.rb → templates/mongrel/config/rubber/deploy-mongrel.rb
File renamed without changes
View
0  ...el/config/rubber/role/mongrel/mongrel_cluster.yml → ...el/config/rubber/role/mongrel/mongrel_cluster.yml
File renamed without changes
View
0  ...rel/config/rubber/role/mongrel/monit-mongrel.conf → ...rel/config/rubber/role/mongrel/monit-mongrel.conf
File renamed without changes
View
0  ...emplates/mongrel/config/rubber/rubber-mongrel.yml → templates/mongrel/config/rubber/rubber-mongrel.yml
File renamed without changes
View
0  lib/templates/mongrel/templates.yml → templates/mongrel/templates.yml
File renamed without changes
View
0  ...tes/monit/config/rubber/common/monit-default.conf → ...tes/monit/config/rubber/common/monit-default.conf
File renamed without changes
View
0  lib/templates/monit/config/rubber/common/monit.conf → templates/monit/config/rubber/common/monit.conf
File renamed without changes
View
0  lib/templates/monit/config/rubber/deploy-monit.rb → templates/monit/config/rubber/deploy-monit.rb
File renamed without changes
View
0  ...nfig/rubber/role/web_tools/monit-admin-nginx.conf → ...nfig/rubber/role/web_tools/monit-admin-nginx.conf
File renamed without changes
View
0  lib/templates/monit/config/rubber/rubber-monit.yml → templates/monit/config/rubber/rubber-monit.yml
File renamed without changes
View
0  lib/templates/monit/templates.yml → templates/monit/templates.yml
File renamed without changes
View
0  ...lates/munin/config/rubber/common/monit-munin.conf → ...lates/munin/config/rubber/common/monit-munin.conf
File renamed without changes
View
0  ...plates/munin/config/rubber/common/munin-node.conf → templates/munin/config/rubber/common/munin-node.conf
File renamed without changes
View
0  ...tes/munin/config/rubber/common/munin-plugins.conf → ...tes/munin/config/rubber/common/munin-plugins.conf
File renamed without changes
View
0  lib/templates/munin/config/rubber/deploy-munin.rb → templates/munin/config/rubber/deploy-munin.rb
File renamed without changes
View
0  ...nin/config/rubber/role/web_tools/munin-nginx.conf → ...nin/config/rubber/role/web_tools/munin-nginx.conf
File renamed without changes
View
0  ...n/config/rubber/role/web_tools/munin-plugins.conf → ...n/config/rubber/role/web_tools/munin-plugins.conf
File renamed without changes
View
0  ...tes/munin/config/rubber/role/web_tools/munin.conf → ...tes/munin/config/rubber/role/web_tools/munin.conf
File renamed without changes
View
0  lib/templates/munin/config/rubber/rubber-munin.yml → templates/munin/config/rubber/rubber-munin.yml
File renamed without changes
View
0  ...mplates/munin/script/munin/example_mysql_query.rb → templates/munin/script/munin/example_mysql_query.rb
File renamed without changes
View
0  lib/templates/munin/script/munin/example_simple.rb → templates/munin/script/munin/example_simple.rb
File renamed without changes
View
0  lib/templates/munin/templates.yml → templates/munin/templates.yml
File renamed without changes
View
0  ...templates/mysql/config/rubber/common/database.yml → templates/mysql/config/rubber/common/database.yml
File renamed without changes
View
0  lib/templates/mysql/config/rubber/deploy-mysql.rb → templates/mysql/config/rubber/deploy-mysql.rb
File renamed without changes
View
0  ...s/mysql/config/rubber/role/db/apparmor-mysql.conf → ...s/mysql/config/rubber/role/db/apparmor-mysql.conf
File renamed without changes
View
0  lib/templates/mysql/config/rubber/role/db/crontab → templates/mysql/config/rubber/role/db/crontab
File renamed without changes
View
0  ...lates/mysql/config/rubber/role/db/monit-mysql.cnf → ...lates/mysql/config/rubber/role/db/monit-mysql.cnf
File renamed without changes
View
0  lib/templates/mysql/config/rubber/role/db/my.cnf → templates/mysql/config/rubber/role/db/my.cnf
File renamed without changes
View
0  .../rubber/role/mysql_slave/mysql_slave_munin_plugin → .../rubber/role/mysql_slave/mysql_slave_munin_plugin
File renamed without changes
View
0  lib/templates/mysql/config/rubber/rubber-mysql.yml → templates/mysql/config/rubber/rubber-mysql.yml
File renamed without changes
View
0  lib/templates/mysql/templates.yml → templates/mysql/templates.yml
File renamed without changes
View
0  .../config/rubber/common/mysql_cluster_migrations.rb → .../config/rubber/common/mysql_cluster_migrations.rb
File renamed without changes
View
0  ...sql_cluster/config/rubber/deploy-mysql_cluster.rb → ...sql_cluster/config/rubber/deploy-mysql_cluster.rb
File renamed without changes
View
0  ...ysql_cluster/config/rubber/role/mysql_data/my.cnf → ...ysql_cluster/config/rubber/role/mysql_data/my.cnf
File renamed without changes
View
0  ...cluster/config/rubber/role/mysql_mgm/ndb_mgmd.cnf → ...cluster/config/rubber/role/mysql_mgm/ndb_mgmd.cnf
File renamed without changes
View
0  ...rubber/role/mysql_sql/monit-mysql_cluster_sql.cnf → ...rubber/role/mysql_sql/monit-mysql_cluster_sql.cnf
File renamed without changes
View
0  ...mysql_cluster/config/rubber/role/mysql_sql/my.cnf → ...mysql_cluster/config/rubber/role/mysql_sql/my.cnf
File renamed without changes
View
0  ...ql_cluster/config/rubber/rubber-mysql_cluster.yml → ...ql_cluster/config/rubber/rubber-mysql_cluster.yml
File renamed without changes
View
0  lib/templates/mysql_cluster/templates.yml → templates/mysql_cluster/templates.yml
File renamed without changes
View
0  ...tes/mysql_proxy/config/rubber/common/database.yml → ...tes/mysql_proxy/config/rubber/common/database.yml
File renamed without changes
View
0  ..._proxy/config/rubber/common/monit-mysql_proxy.cnf → ..._proxy/config/rubber/common/monit-mysql_proxy.cnf
File renamed without changes
View
0  ...ates/mysql_proxy/config/rubber/common/mysql-proxy → ...ates/mysql_proxy/config/rubber/common/mysql-proxy
File renamed without changes
View
0  ...mysql_proxy/config/rubber/common/mysql-proxy.conf → ...mysql_proxy/config/rubber/common/mysql-proxy.conf
File renamed without changes
View
0  .../mysql_proxy/config/rubber/common/mysql-proxy.lua → .../mysql_proxy/config/rubber/common/mysql-proxy.lua
File renamed without changes
View
0  ...s/mysql_proxy/config/rubber/deploy-mysql_proxy.rb → ...s/mysql_proxy/config/rubber/deploy-mysql_proxy.rb
File renamed without changes
View
0  .../mysql_proxy/config/rubber/rubber-mysql_proxy.yml → .../mysql_proxy/config/rubber/rubber-mysql_proxy.yml
File renamed without changes
View
0  lib/templates/mysql_proxy/templates.yml → templates/mysql_proxy/templates.yml
File renamed without changes
View
0  lib/templates/nginx/config/rubber/deploy-nginx.rb → templates/nginx/config/rubber/deploy-nginx.rb
File renamed without changes
View
0  lib/templates/nginx/config/rubber/role/nginx/crontab → templates/nginx/config/rubber/role/nginx/crontab
File renamed without changes
View
0  ...s/nginx/config/rubber/role/nginx/monit-nginx.conf → ...s/nginx/config/rubber/role/nginx/monit-nginx.conf
File renamed without changes
View
0  ...mplates/nginx/config/rubber/role/nginx/nginx.conf → templates/nginx/config/rubber/role/nginx/nginx.conf
File renamed without changes
View
0  ...inx/config/rubber/role/web_tools/nginx-tools.conf → ...inx/config/rubber/role/web_tools/nginx-tools.conf
File renamed without changes
View
0  ...inx/config/rubber/role/web_tools/tools-index.html → ...inx/config/rubber/role/web_tools/tools-index.html
File renamed without changes
View
0  ...inx/config/rubber/role/web_tools/tools-nginx.auth → ...inx/config/rubber/role/web_tools/tools-nginx.auth
File renamed without changes
View
0  lib/templates/nginx/config/rubber/rubber-nginx.yml → templates/nginx/config/rubber/rubber-nginx.yml
File renamed without changes
View
0  lib/templates/nginx/templates.yml → templates/nginx/templates.yml
File renamed without changes
View
0  ...lates/passenger/config/rubber/deploy-passenger.rb → ...lates/passenger/config/rubber/deploy-passenger.rb
File renamed without changes
View
0  ...rubber/role/passenger/munin-passenger-memory.conf → ...rubber/role/passenger/munin-passenger-memory.conf
File renamed without changes
View
0  ...ubber/role/passenger/munin-passenger-sudoers.conf → ...ubber/role/passenger/munin-passenger-sudoers.conf
File renamed without changes
View
0  ...config/rubber/role/passenger/munin-passenger.conf → ...config/rubber/role/passenger/munin-passenger.conf
File renamed without changes
View
0  ...rubber/role/passenger/passenger-apache-vhost.conf → ...rubber/role/passenger/passenger-apache-vhost.conf
File renamed without changes
View
0  ...enger/config/rubber/role/passenger/passenger.conf → ...enger/config/rubber/role/passenger/passenger.conf
File renamed without changes
View
0  ...ates/passenger/config/rubber/rubber-passenger.yml → ...ates/passenger/config/rubber/rubber-passenger.yml
File renamed without changes
View
0  lib/templates/passenger/templates.yml → templates/passenger/templates.yml
File renamed without changes
View
0  ...ates/postgresql/config/rubber/common/database.yml → ...ates/postgresql/config/rubber/common/database.yml
File renamed without changes
View
0  ...tes/postgresql/config/rubber/deploy-postgresql.rb → ...tes/postgresql/config/rubber/deploy-postgresql.rb
File renamed without changes
View
0  ...emplates/postgresql/config/rubber/role/db/crontab → templates/postgresql/config/rubber/role/db/crontab
File renamed without changes
View
0  ...resql/config/rubber/role/db/monit-postgresql.conf → ...resql/config/rubber/role/db/monit-postgresql.conf
File renamed without changes
View
0  ...resql/config/rubber/role/db/munin-postgresql.conf → ...resql/config/rubber/role/db/munin-postgresql.conf
File renamed without changes
View
0  ...ates/postgresql/config/rubber/role/db/pg_hba.conf → ...ates/postgresql/config/rubber/role/db/pg_hba.conf
File renamed without changes
View
0  ...esql/config/rubber/role/db/postgresql-sysctl.conf → ...esql/config/rubber/role/db/postgresql-sysctl.conf
File renamed without changes
View
0  .../postgresql/config/rubber/role/db/postgresql.conf → .../postgresql/config/rubber/role/db/postgresql.conf
File renamed without changes
View
0  ...es/postgresql/config/rubber/rubber-postgresql.yml → ...es/postgresql/config/rubber/rubber-postgresql.yml
File renamed without changes
View
0  lib/templates/postgresql/templates.yml → templates/postgresql/templates.yml
File renamed without changes
View
0  lib/templates/redis/config/rubber/deploy-redis.rb → templates/redis/config/rubber/deploy-redis.rb
File renamed without changes
View
0  lib/templates/redis/config/rubber/role/redis/crontab → templates/redis/config/rubber/role/redis/crontab
File renamed without changes
View
0  ...s/redis/config/rubber/role/redis/monit-redis.conf → ...s/redis/config/rubber/role/redis/monit-redis.conf
File renamed without changes
View
0  .../redis/config/rubber/role/redis/redis-sysctl.conf → .../redis/config/rubber/role/redis/redis-sysctl.conf
File renamed without changes
View
0  ...mplates/redis/config/rubber/role/redis/redis.conf → templates/redis/config/rubber/role/redis/redis.conf
File renamed without changes
View
0  lib/templates/redis/config/rubber/rubber-redis.yml → templates/redis/config/rubber/rubber-redis.yml
File renamed without changes
View
0  lib/templates/redis/templates.yml → templates/redis/templates.yml
File renamed without changes
View
0  lib/templates/resque/config/initializers/resque.rb → templates/resque/config/initializers/resque.rb
File renamed without changes
View
0  lib/templates/resque/config/rubber/common/resque.yml → templates/resque/config/rubber/common/resque.yml
File renamed without changes
View
0  lib/templates/resque/config/rubber/deploy-resque.rb → templates/resque/config/rubber/deploy-resque.rb
File renamed without changes
View
0  ...nfig/rubber/role/resque_web/monit-resque_web.conf → ...nfig/rubber/role/resque_web/monit-resque_web.conf
File renamed without changes
View
0  ...ubber/role/resque_worker/monit-resque_worker.conf → ...ubber/role/resque_worker/monit-resque_worker.conf
File renamed without changes
View
0  lib/templates/resque/config/rubber/rubber-resque.yml → templates/resque/config/rubber/rubber-resque.yml
File renamed without changes
View
0  ...mplates/resque/script/resque_worker_management.rb → templates/resque/script/resque_worker_management.rb
File renamed without changes
View
0  lib/templates/resque/templates.rb → templates/resque/templates.rb
File renamed without changes
View
0  lib/templates/resque/templates.yml → templates/resque/templates.yml
File renamed without changes
View
0  lib/templates/sphinx/config/rubber/common/sphinx.yml → templates/sphinx/config/rubber/common/sphinx.yml
File renamed without changes
View
0  lib/templates/sphinx/config/rubber/deploy-sphinx.rb → templates/sphinx/config/rubber/deploy-sphinx.rb
File renamed without changes
View
0  ...emplates/sphinx/config/rubber/role/sphinx/crontab → templates/sphinx/config/rubber/role/sphinx/crontab
File renamed without changes
View
0  ...phinx/config/rubber/role/sphinx/monit-sphinx.conf → ...phinx/config/rubber/role/sphinx/monit-sphinx.conf
File renamed without changes
View
0  lib/templates/sphinx/config/rubber/rubber-sphinx.yml → templates/sphinx/config/rubber/rubber-sphinx.yml
File renamed without changes
View
0  lib/templates/sphinx/templates.yml → templates/sphinx/templates.yml
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.