rubber 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. data/CHANGELOG +5 -0
  2. data/VERSION +1 -1
  3. data/generators/vulcanize/templates/apache/config/rubber/role/apache/monit-apache.conf +2 -2
  4. data/generators/vulcanize/templates/base/config/rubber/common/monit-postfix.conf +2 -2
  5. data/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/monit-haproxy.conf +2 -2
  6. data/generators/vulcanize/templates/munin/config/rubber/common/monit-munin.conf +2 -2
  7. data/generators/vulcanize/templates/mysql/config/rubber/deploy-mysql.rb +1 -1
  8. data/generators/vulcanize/templates/mysql/config/rubber/role/db/monit-mysql.cnf +2 -2
  9. data/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_sql/monit-mysql_cluster_sql.cnf +2 -2
  10. data/generators/vulcanize/templates/mysql_proxy/config/rubber/common/monit-mysql_proxy.cnf +2 -2
  11. data/generators/vulcanize/templates/nginx/config/rubber/role/nginx/monit-nginx.conf +2 -2
  12. data/generators/vulcanize/templates/postgresql/config/rubber/rubber-postgresql.yml +1 -1
  13. data/generators/vulcanize/templates/resque/config/rubber/role/resque_web/monit-resque_web.conf +2 -2
  14. data/generators/vulcanize/vulcanize_generator.rb +3 -1
  15. data/lib/generators/vulcanize/templates/apache/config/rubber/role/apache/monit-apache.conf +2 -2
  16. data/lib/generators/vulcanize/templates/base/config/rubber/common/monit-postfix.conf +2 -2
  17. data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/monit-haproxy.conf +2 -2
  18. data/lib/generators/vulcanize/templates/munin/config/rubber/common/monit-munin.conf +2 -2
  19. data/lib/generators/vulcanize/templates/mysql/config/rubber/deploy-mysql.rb +1 -1
  20. data/lib/generators/vulcanize/templates/mysql/config/rubber/role/db/monit-mysql.cnf +2 -2
  21. data/lib/generators/vulcanize/templates/mysql_cluster/config/rubber/role/mysql_sql/monit-mysql_cluster_sql.cnf +2 -2
  22. data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/monit-mysql_proxy.cnf +2 -2
  23. data/lib/generators/vulcanize/templates/nginx/config/rubber/role/nginx/monit-nginx.conf +2 -2
  24. data/lib/generators/vulcanize/templates/postgresql/config/rubber/rubber-postgresql.yml +1 -1
  25. data/lib/generators/vulcanize/templates/resque/config/rubber/role/resque_web/monit-resque_web.conf +2 -2
  26. data/lib/generators/vulcanize/vulcanize_generator.rb +3 -1
  27. metadata +4 -4
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ 1.5.1
2
+ -----
3
+
4
+ Fixed a problem with installing gems listed in environment.rb. <aa2b516> [Kevin Menard]
5
+
1
6
  1.5.0
2
7
  -----
3
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.5.1
1
+ 1.5.2
@@ -4,5 +4,5 @@
4
4
  <% PIDFILE = "/var/run/apache2.pid" %>
5
5
  check process apache with pidfile <%= PIDFILE %>
6
6
  group apache-<%= RUBBER_ENV %>
7
- start program = "/usr/sbin/service apache2 start"
8
- stop program = "/usr/sbin/service apache2 stop"
7
+ start program = "/usr/bin/env service apache2 start"
8
+ stop program = "/usr/bin/env service apache2 stop"
@@ -3,6 +3,6 @@
3
3
  %>
4
4
 
5
5
  check process postfix with pidfile /var/spool/postfix/pid/master.pid
6
- start program "/usr/sbin/service postfix start"
7
- stop program "/usr/sbin/service postfix stop"
6
+ start program "/usr/bin/env service postfix start"
7
+ stop program "/usr/bin/env service postfix stop"
8
8
  if 5 restarts within 5 cycles then timeout
@@ -4,6 +4,6 @@
4
4
  <% PIDFILE = "/var/run/haproxy.pid" %>
5
5
  check process haproxy with pidfile <%= PIDFILE %>
6
6
  group haproxy-<%= RUBBER_ENV %>
7
- start program = "/usr/sbin/service haproxy start"
8
- stop program = "/usr/sbin/service haproxy stop"
7
+ start program = "/usr/bin/env service haproxy start"
8
+ stop program = "/usr/bin/env service haproxy stop"
9
9
  if failed host <%= rubber_env.host %> port <%= rubber_env.haproxy_monitor_port %> with timeout 10 seconds for 10 cycles then restart
@@ -3,6 +3,6 @@
3
3
  %>
4
4
 
5
5
  check process munin-node with pidfile /var/run/munin/munin-node.pid
6
- start program "/usr/sbin/service munin-node start"
7
- stop program "/usr/sbin/service munin-node stop"
6
+ start program "/usr/bin/env service munin-node start"
7
+ stop program "/usr/bin/env service munin-node stop"
8
8
  if 5 restarts within 5 cycles then timeout
@@ -80,7 +80,7 @@ namespace :rubber do
80
80
  logger.info "Creating slave from a dump of master #{source_host}"
81
81
  rubber.sudo_script "create_slave_db_from_master", <<-ENDSCRIPT
82
82
  mysql -u root -e "change master to master_host='#{master_host}', master_user='#{env.db_replicator_user}' #{master_pass}"
83
- mysqldump -u #{env.db_user} --password #{env.db_pass} -h #{source_host} --all-databases --master-data=1 | mysql -u root
83
+ mysqldump -u #{env.db_user} #{env.db_pass.nil? ? '' : '--password ' + env.db_pass} -h #{source_host} --all-databases --master-data=1 | mysql -u root
84
84
  ENDSCRIPT
85
85
  else
86
86
  logger.info "Creating slave from a dump of slave #{source_host}"
@@ -4,7 +4,7 @@
4
4
 
5
5
  check process mysql with pidfile /var/run/mysqld/mysqld.pid
6
6
  group mysql-<%= RUBBER_ENV %>
7
- start program = "/usr/sbin/service mysql restart"
8
- stop program = "/usr/sbin/service mysql stop"
7
+ start program = "/usr/bin/env service mysql restart"
8
+ stop program = "/usr/bin/env service mysql stop"
9
9
  if failed host 127.0.0.1 port 3306 protocol mysql then alert
10
10
  if 5 restarts within 5 cycles then timeout
@@ -4,7 +4,7 @@
4
4
 
5
5
  check process mysql_cluster_sql with pidfile /var/lib/mysql/<%= rubber_env.full_host %>.pid
6
6
  group mysql_cluster_sql-<%= RUBBER_ENV %>
7
- start program = "/usr/sbin/service mysql start"
8
- stop program = "/usr/sbin/service mysql stop"
7
+ start program = "/usr/bin/env service mysql start"
8
+ stop program = "/usr/bin/env service mysql stop"
9
9
  if failed host 127.0.0.1 port 3306 protocol mysql then alert
10
10
  if 5 restarts within 5 cycles then timeout
@@ -4,7 +4,7 @@
4
4
 
5
5
  check process mysql_proxy with pidfile /var/run/mysql-proxy.pid
6
6
  group mysql_proxy-<%= RUBBER_ENV %>
7
- start program = "/usr/sbin/service mysql-proxy start"
8
- stop program = "/usr/sbin/service mysql-proxy stop"
7
+ start program = "/usr/bin/env service mysql-proxy start"
8
+ stop program = "/usr/bin/env service mysql-proxy stop"
9
9
  if failed host 127.0.0.1 port 4040 protocol mysql then alert
10
10
  if 5 restarts within 5 cycles then timeout
@@ -4,5 +4,5 @@
4
4
  <% PIDFILE = "/var/run/nginx.pid" %>
5
5
  check process nginx with pidfile <%= PIDFILE %>
6
6
  group nginx-<%= RUBBER_ENV %>
7
- start program = "/usr/sbin/service nginx start"
8
- stop program = "/usr/sbin/service nginx stop"
7
+ start program = "/usr/bin/env service nginx start"
8
+ stop program = "/usr/bin/env service nginx stop"
@@ -23,7 +23,7 @@ postgresql_conf_dir: "/etc/postgresql/#{postgresql_ver}/main"
23
23
  postgresql_data_dir: /mnt/postgresql/data
24
24
  postgresql_archive_dir: /mnt/postgresql/archive
25
25
  postgresql_pid_file: "/var/run/postgresql/#{postgresql_ver}-main.pid"
26
- postgresql_ctl: "/usr/sbin/service postgresql-#{postgresql_ver}"
26
+ postgresql_ctl: "/usr/bin/env service postgresql-#{postgresql_ver}"
27
27
 
28
28
  # Capistrano needs db:primary role for migrate to work,
29
29
  # so we might as well just make consistent across the board
@@ -8,7 +8,7 @@
8
8
 
9
9
  check process resque_web with pidfile <%= PIDFILE %>
10
10
  group resque_web
11
- start program = "bash -l -c '<%= start_program %>'"
12
- stop program = "bash -l -c '<%= stop_program %>'"
11
+ start program = "/bin/bash -l -c '<%= start_program %>'"
12
+ stop program = "/bin/bash -l -c '<%= stop_program %>'"
13
13
 
14
14
  if totalmem > 350.0 MB for 15 cycles then restart
@@ -26,8 +26,11 @@ if Rubber::Util::is_rails2?
26
26
  raise Rails::Generator::UsageError.new("Invalid template #{name}, use one of #{valid_templates.join(', ')}")
27
27
  end
28
28
 
29
+ @template_dependencies ||= []
30
+
29
31
  templ_conf = load_template_config(sp)
30
32
  deps = templ_conf['dependent_templates'] || []
33
+ @template_dependencies.concat(deps)
31
34
  deps.each do |dep|
32
35
  apply_template(m, dep)
33
36
  end
@@ -55,7 +58,6 @@ if Rubber::Util::is_rails2?
55
58
  end
56
59
  end
57
60
 
58
- puts extra_generator_steps_file
59
61
  if File.exist? extra_generator_steps_file
60
62
  eval File.read(extra_generator_steps_file), binding, extra_generator_steps_file
61
63
  end
@@ -4,5 +4,5 @@
4
4
  <% PIDFILE = "/var/run/apache2.pid" %>
5
5
  check process apache with pidfile <%= PIDFILE %>
6
6
  group apache-<%= RUBBER_ENV %>
7
- start program = "/usr/sbin/service apache2 start"
8
- stop program = "/usr/sbin/service apache2 stop"
7
+ start program = "/usr/bin/env service apache2 start"
8
+ stop program = "/usr/bin/env service apache2 stop"
@@ -3,6 +3,6 @@
3
3
  %>
4
4
 
5
5
  check process postfix with pidfile /var/spool/postfix/pid/master.pid
6
- start program "/usr/sbin/service postfix start"
7
- stop program "/usr/sbin/service postfix stop"
6
+ start program "/usr/bin/env service postfix start"
7
+ stop program "/usr/bin/env service postfix stop"
8
8
  if 5 restarts within 5 cycles then timeout
@@ -4,6 +4,6 @@
4
4
  <% PIDFILE = "/var/run/haproxy.pid" %>
5
5
  check process haproxy with pidfile <%= PIDFILE %>
6
6
  group haproxy-<%= RUBBER_ENV %>
7
- start program = "/usr/sbin/service haproxy start"
8
- stop program = "/usr/sbin/service haproxy stop"
7
+ start program = "/usr/bin/env service haproxy start"
8
+ stop program = "/usr/bin/env service haproxy stop"
9
9
  if failed host <%= rubber_env.host %> port <%= rubber_env.haproxy_monitor_port %> with timeout 10 seconds for 10 cycles then restart
@@ -3,6 +3,6 @@
3
3
  %>
4
4
 
5
5
  check process munin-node with pidfile /var/run/munin/munin-node.pid
6
- start program "/usr/sbin/service munin-node start"
7
- stop program "/usr/sbin/service munin-node stop"
6
+ start program "/usr/bin/env service munin-node start"
7
+ stop program "/usr/bin/env service munin-node stop"
8
8
  if 5 restarts within 5 cycles then timeout
@@ -80,7 +80,7 @@ namespace :rubber do
80
80
  logger.info "Creating slave from a dump of master #{source_host}"
81
81
  rubber.sudo_script "create_slave_db_from_master", <<-ENDSCRIPT
82
82
  mysql -u root -e "change master to master_host='#{master_host}', master_user='#{env.db_replicator_user}' #{master_pass}"
83
- mysqldump -u #{env.db_user} --password #{env.db_pass} -h #{source_host} --all-databases --master-data=1 | mysql -u root
83
+ mysqldump -u #{env.db_user} #{env.db_pass.nil? ? '' : '--password ' + env.db_pass} -h #{source_host} --all-databases --master-data=1 | mysql -u root
84
84
  ENDSCRIPT
85
85
  else
86
86
  logger.info "Creating slave from a dump of slave #{source_host}"
@@ -4,7 +4,7 @@
4
4
 
5
5
  check process mysql with pidfile /var/run/mysqld/mysqld.pid
6
6
  group mysql-<%= RUBBER_ENV %>
7
- start program = "/usr/sbin/service mysql restart"
8
- stop program = "/usr/sbin/service mysql stop"
7
+ start program = "/usr/bin/env service mysql restart"
8
+ stop program = "/usr/bin/env service mysql stop"
9
9
  if failed host 127.0.0.1 port 3306 protocol mysql then alert
10
10
  if 5 restarts within 5 cycles then timeout
@@ -4,7 +4,7 @@
4
4
 
5
5
  check process mysql_cluster_sql with pidfile /var/lib/mysql/<%= rubber_env.full_host %>.pid
6
6
  group mysql_cluster_sql-<%= RUBBER_ENV %>
7
- start program = "/usr/sbin/service mysql start"
8
- stop program = "/usr/sbin/service mysql stop"
7
+ start program = "/usr/bin/env service mysql start"
8
+ stop program = "/usr/bin/env service mysql stop"
9
9
  if failed host 127.0.0.1 port 3306 protocol mysql then alert
10
10
  if 5 restarts within 5 cycles then timeout
@@ -4,7 +4,7 @@
4
4
 
5
5
  check process mysql_proxy with pidfile /var/run/mysql-proxy.pid
6
6
  group mysql_proxy-<%= RUBBER_ENV %>
7
- start program = "/usr/sbin/service mysql-proxy start"
8
- stop program = "/usr/sbin/service mysql-proxy stop"
7
+ start program = "/usr/bin/env service mysql-proxy start"
8
+ stop program = "/usr/bin/env service mysql-proxy stop"
9
9
  if failed host 127.0.0.1 port 4040 protocol mysql then alert
10
10
  if 5 restarts within 5 cycles then timeout
@@ -4,5 +4,5 @@
4
4
  <% PIDFILE = "/var/run/nginx.pid" %>
5
5
  check process nginx with pidfile <%= PIDFILE %>
6
6
  group nginx-<%= RUBBER_ENV %>
7
- start program = "/usr/sbin/service nginx start"
8
- stop program = "/usr/sbin/service nginx stop"
7
+ start program = "/usr/bin/env service nginx start"
8
+ stop program = "/usr/bin/env service nginx stop"
@@ -23,7 +23,7 @@ postgresql_conf_dir: "/etc/postgresql/#{postgresql_ver}/main"
23
23
  postgresql_data_dir: /mnt/postgresql/data
24
24
  postgresql_archive_dir: /mnt/postgresql/archive
25
25
  postgresql_pid_file: "/var/run/postgresql/#{postgresql_ver}-main.pid"
26
- postgresql_ctl: "/usr/sbin/service postgresql-#{postgresql_ver}"
26
+ postgresql_ctl: "/usr/bin/env service postgresql-#{postgresql_ver}"
27
27
 
28
28
  # Capistrano needs db:primary role for migrate to work,
29
29
  # so we might as well just make consistent across the board
@@ -8,7 +8,7 @@
8
8
 
9
9
  check process resque_web with pidfile <%= PIDFILE %>
10
10
  group resque_web
11
- start program = "bash -l -c '<%= start_program %>'"
12
- stop program = "bash -l -c '<%= stop_program %>'"
11
+ start program = "/bin/bash -l -c '<%= start_program %>'"
12
+ stop program = "/bin/bash -l -c '<%= stop_program %>'"
13
13
 
14
14
  if totalmem > 350.0 MB for 15 cycles then restart
@@ -26,8 +26,11 @@ if Rubber::Util::is_rails2?
26
26
  raise Rails::Generator::UsageError.new("Invalid template #{name}, use one of #{valid_templates.join(', ')}")
27
27
  end
28
28
 
29
+ @template_dependencies ||= []
30
+
29
31
  templ_conf = load_template_config(sp)
30
32
  deps = templ_conf['dependent_templates'] || []
33
+ @template_dependencies.concat(deps)
31
34
  deps.each do |dep|
32
35
  apply_template(m, dep)
33
36
  end
@@ -55,7 +58,6 @@ if Rubber::Util::is_rails2?
55
58
  end
56
59
  end
57
60
 
58
- puts extra_generator_steps_file
59
61
  if File.exist? extra_generator_steps_file
60
62
  eval File.read(extra_generator_steps_file), binding, extra_generator_steps_file
61
63
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubber
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 5
9
- - 1
10
- version: 1.5.1
9
+ - 2
10
+ version: 1.5.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Conway
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-05-21 00:00:00 -04:00
18
+ date: 2010-05-23 00:00:00 -04:00
19
19
  default_executable: vulcanize
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency