rubber 1.14.1 → 1.15.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +36 -0
- data/VERSION +1 -1
- data/generators/vulcanize/templates/base/config/rubber/common/crontab +5 -6
- data/generators/vulcanize/templates/base/config/rubber/common/rsyslog.conf +71 -0
- data/generators/vulcanize/templates/base/config/rubber/deploy-setup.rb +7 -2
- data/generators/vulcanize/templates/base/config/rubber/rubber.yml +4 -12
- data/generators/vulcanize/templates/base/script/cron-rake +2 -2
- data/generators/vulcanize/templates/complete_passenger_nginx/config/rubber/role/haproxy/haproxy-passenger.conf +21 -0
- data/generators/vulcanize/templates/complete_passenger_nginx/config/rubber/rubber-complete.yml +38 -0
- data/generators/vulcanize/templates/complete_passenger_nginx/templates.rb +8 -0
- data/generators/vulcanize/templates/complete_passenger_nginx/templates.yml +8 -0
- data/generators/vulcanize/templates/complete_passenger_nginx_mysql/templates.yml +4 -0
- data/generators/vulcanize/templates/complete_passenger_nginx_postgresql/templates.yml +4 -0
- data/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/monit-haproxy.conf +1 -1
- data/generators/vulcanize/templates/minimal_passenger_nginx/config/rubber/rubber-complete.yml +37 -0
- data/generators/vulcanize/templates/minimal_passenger_nginx/templates.yml +4 -0
- data/generators/vulcanize/templates/mongodb/config/rubber/deploy-mongodb.rb +6 -2
- data/generators/vulcanize/templates/monit/config/rubber/role/web_tools/monit-admin-nginx.conf +1 -0
- data/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin.conf +2 -1
- data/generators/vulcanize/templates/munin/script/munin/example_mysql_query.rb +0 -0
- data/generators/vulcanize/templates/munin/script/munin/example_simple.rb +0 -0
- data/generators/vulcanize/templates/mysql/config/rubber/rubber-mysql.yml +1 -1
- data/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy +1 -0
- data/generators/vulcanize/templates/passenger/config/rubber/deploy-passenger.rb +1 -1
- data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger-memory.conf +1 -1
- data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger.conf +1 -1
- data/generators/vulcanize/templates/passenger/config/rubber/rubber-passenger.yml +1 -1
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/deploy-passenger_nginx.rb +86 -0
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/application.conf +30 -0
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/crontab +8 -0
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/monit-nginx.conf +7 -0
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/munin-passenger-memory.conf +34 -0
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/munin-passenger-sudoers.conf +8 -0
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/munin-passenger.conf +47 -0
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/nginx +101 -0
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/nginx.conf +65 -0
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/passenger_nginx.conf +30 -0
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/role/web_tools/nginx-tools.conf +55 -0
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/role/web_tools/tools-index.html +34 -0
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/role/web_tools/tools-nginx.auth +7 -0
- data/generators/vulcanize/templates/passenger_nginx/config/rubber/rubber-passenger_nginx.yml +20 -0
- data/generators/vulcanize/templates/passenger_nginx/templates.yml +1 -0
- data/generators/vulcanize/templates/postgresql/config/rubber/deploy-postgresql.rb +51 -49
- data/generators/vulcanize/templates/postgresql/config/rubber/role/db/pg_hba.conf +1 -0
- data/generators/vulcanize/templates/postgresql/config/rubber/role/db/postgresql.conf +20 -7
- data/generators/vulcanize/templates/postgresql/config/rubber/role/postgresql_slave/recovery.conf +120 -0
- data/generators/vulcanize/templates/postgresql/config/rubber/rubber-postgresql.yml +5 -5
- data/generators/vulcanize/templates/redis/config/rubber/deploy-redis.rb +6 -1
- data/generators/vulcanize/templates/redis/config/rubber/rubber-redis.yml +1 -1
- data/generators/vulcanize/templates/resque/config/rubber/deploy-resque.rb +15 -2
- data/generators/vulcanize/templates/resque/config/rubber/role/resque_web/monit-resque_web.conf +1 -1
- data/generators/vulcanize/templates/resque/config/rubber/rubber-resque.yml +2 -2
- data/lib/generators/vulcanize/templates/base/config/rubber/common/crontab +5 -6
- data/lib/generators/vulcanize/templates/base/config/rubber/common/rsyslog.conf +71 -0
- data/lib/generators/vulcanize/templates/base/config/rubber/deploy-setup.rb +7 -2
- data/lib/generators/vulcanize/templates/base/config/rubber/rubber.yml +4 -12
- data/lib/generators/vulcanize/templates/base/script/cron-rake +2 -2
- data/lib/generators/vulcanize/templates/complete_passenger_nginx/config/rubber/role/haproxy/haproxy-passenger.conf +21 -0
- data/lib/generators/vulcanize/templates/complete_passenger_nginx/config/rubber/rubber-complete.yml +38 -0
- data/lib/generators/vulcanize/templates/complete_passenger_nginx/templates.rb +8 -0
- data/lib/generators/vulcanize/templates/complete_passenger_nginx/templates.yml +8 -0
- data/lib/generators/vulcanize/templates/complete_passenger_nginx_mysql/templates.yml +4 -0
- data/lib/generators/vulcanize/templates/complete_passenger_nginx_postgresql/templates.yml +4 -0
- data/lib/generators/vulcanize/templates/haproxy/config/rubber/role/haproxy/monit-haproxy.conf +1 -1
- data/lib/generators/vulcanize/templates/minimal_passenger_nginx/config/rubber/rubber-complete.yml +37 -0
- data/lib/generators/vulcanize/templates/minimal_passenger_nginx/templates.yml +4 -0
- data/lib/generators/vulcanize/templates/mongodb/config/rubber/deploy-mongodb.rb +6 -2
- data/lib/generators/vulcanize/templates/monit/config/rubber/role/web_tools/monit-admin-nginx.conf +1 -0
- data/lib/generators/vulcanize/templates/munin/config/rubber/role/web_tools/munin.conf +2 -1
- data/lib/generators/vulcanize/templates/munin/script/munin/example_mysql_query.rb +0 -0
- data/lib/generators/vulcanize/templates/munin/script/munin/example_simple.rb +0 -0
- data/lib/generators/vulcanize/templates/mysql/config/rubber/rubber-mysql.yml +1 -1
- data/lib/generators/vulcanize/templates/mysql_proxy/config/rubber/common/mysql-proxy +1 -0
- data/lib/generators/vulcanize/templates/passenger/config/rubber/deploy-passenger.rb +1 -1
- data/lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger-memory.conf +1 -1
- data/lib/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger.conf +1 -1
- data/lib/generators/vulcanize/templates/passenger/config/rubber/rubber-passenger.yml +1 -1
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/deploy-passenger_nginx.rb +86 -0
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/application.conf +30 -0
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/crontab +8 -0
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/monit-nginx.conf +7 -0
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/munin-passenger-memory.conf +34 -0
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/munin-passenger-sudoers.conf +8 -0
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/munin-passenger.conf +47 -0
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/nginx +101 -0
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/nginx.conf +65 -0
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/passenger_nginx/passenger_nginx.conf +30 -0
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/web_tools/nginx-tools.conf +55 -0
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/web_tools/tools-index.html +34 -0
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/role/web_tools/tools-nginx.auth +7 -0
- data/lib/generators/vulcanize/templates/passenger_nginx/config/rubber/rubber-passenger_nginx.yml +20 -0
- data/lib/generators/vulcanize/templates/passenger_nginx/templates.yml +1 -0
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/deploy-postgresql.rb +51 -49
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/pg_hba.conf +1 -0
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/db/postgresql.conf +20 -7
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/role/postgresql_slave/recovery.conf +120 -0
- data/lib/generators/vulcanize/templates/postgresql/config/rubber/rubber-postgresql.yml +5 -5
- data/lib/generators/vulcanize/templates/redis/config/rubber/deploy-redis.rb +6 -1
- data/lib/generators/vulcanize/templates/redis/config/rubber/rubber-redis.yml +1 -1
- data/lib/generators/vulcanize/templates/resque/config/rubber/deploy-resque.rb +15 -2
- data/lib/generators/vulcanize/templates/resque/config/rubber/role/resque_web/monit-resque_web.conf +1 -1
- data/lib/generators/vulcanize/templates/resque/config/rubber/rubber-resque.yml +2 -2
- data/lib/rubber/dns/zerigo.rb +1 -1
- data/lib/rubber/recipes/rubber/setup.rb +1 -1
- data/lib/rubber/recipes/rubber/volumes.rb +3 -3
- metadata +55 -5
data/CHANGELOG
CHANGED
@@ -1,3 +1,38 @@
|
|
1
|
+
1.15.0 (09/13/2011)
|
2
|
+
|
3
|
+
New Features:
|
4
|
+
============
|
5
|
+
|
6
|
+
Added PostgreSQL streaming replication configuration (thanks Kevin Menard)
|
7
|
+
Added the ability to specify mount options for volumes (thanks Alex Kremer)
|
8
|
+
Added a minimal Passenger nginx configuration (thanks Will Koehler)
|
9
|
+
Added SSL support for nginx-passenger (thanks Michael Glass)
|
10
|
+
Added staging environment support fon nginx-passenger (thanks Michael Glass)
|
11
|
+
|
12
|
+
Improvements:
|
13
|
+
============
|
14
|
+
|
15
|
+
Resque-web now runs as an unpriviliged user (thanks Scott Carleton)
|
16
|
+
Better error message when having issues loading the Zerigo gem (thanks Rupert Meese)
|
17
|
+
Upgraded Passenger to 3.0.9 (thanks Kevin Menard)
|
18
|
+
Upgraded Redis to 2.2.13 (thanks Kevin Menard)
|
19
|
+
Better .gemrc file setup (thanks Kevin Menard)
|
20
|
+
|
21
|
+
Bug Fixes:
|
22
|
+
==========
|
23
|
+
|
24
|
+
Fixed an issue with setting up redis on Ubuntu 11.04 (thanks Kevin Menard)
|
25
|
+
Fixed an issue with mysql-proxy not being added to the correct run level (thanks Alex Kremer)
|
26
|
+
Fixed a typo in the passenger_nginx module name (thanks Alex Kremer)
|
27
|
+
Fixed an issue with the munin generated Web site location (thanks Will Koehler)
|
28
|
+
Fixed the open4 require issue (thanks Will Koehler)w
|
29
|
+
Fixed a bunch of nginx-related issues (thanks Will Koehler)
|
30
|
+
Fixed an environmental issue running ntpdate (thanks Will Koehler)
|
31
|
+
Fixed compatibility issues with the Psych parser used in Ruby 1.9.2 (thanks Kevin Menard)
|
32
|
+
Fixed timing issue with multiple resque workers starting (thanks Matt Conway)
|
33
|
+
Fixed an issue with hostnames that happen to be monit commands (thanks Michael Glass)
|
34
|
+
|
35
|
+
|
1
36
|
1.14.1 (06/02/2011)
|
2
37
|
-----
|
3
38
|
|
@@ -12,6 +47,7 @@ Added ability to lockdown the version of rake that RVM will install (vulcanize b
|
|
12
47
|
Added the image type and ID for each instance to the instance file
|
13
48
|
Fixed an issue with LVM groups keeping physical volumes in /etc/fstab
|
14
49
|
Fixed an issue using the mysql2 adapter with the stock MySQL config
|
50
|
+
Disable ri and rdoc generation on new hosts
|
15
51
|
|
16
52
|
1.13.2
|
17
53
|
-----
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.15.0
|
@@ -3,11 +3,10 @@
|
|
3
3
|
@write_cmd = 'crontab -'
|
4
4
|
%>
|
5
5
|
|
6
|
-
# cron clears out enviroment variables
|
7
|
-
#
|
8
|
-
|
9
|
-
<%=
|
10
|
-
<%- end -%>
|
6
|
+
# cron clears out enviroment variables. We need to put our path back in so we can find RVM.
|
7
|
+
# 'rvm exec' and 'bundle exec' in cron-rake will take care of setting up the rest of the
|
8
|
+
# environment needed by Ruby / Rails
|
9
|
+
PATH='<%= ENV['PATH'] %>'
|
11
10
|
|
12
11
|
MAILTO=<%= rubber_env.admin_email %>
|
13
12
|
# don't need to set RUBBER_ENV for each script since we set it for all cron here
|
@@ -19,4 +18,4 @@ RUBYOPT=rubygems
|
|
19
18
|
0 0 * * * LOG_DIR=<%= RUBBER_ROOT %>/log <%= RUBBER_ROOT %>/script/cron-rake rubber:rotate_logs
|
20
19
|
|
21
20
|
# Automatically set the clock for all machines
|
22
|
-
<%= rand(60) %> 4 * * * <%= RUBBER_ROOT %>/script/cron-sh -- ntpdate pool.ntp.org
|
21
|
+
<%= rand(60) %> 4 * * * rvm exec <%= RUBBER_ROOT %>/script/cron-sh -- ntpdate pool.ntp.org
|
@@ -0,0 +1,71 @@
|
|
1
|
+
<%
|
2
|
+
log_dir = "/var/log/#{rubber_env.app_name}"
|
3
|
+
log_spool_dir = "/var/spool/rsyslog"
|
4
|
+
|
5
|
+
@path = "/etc/rsyslog.conf"
|
6
|
+
@post = <<-ENDSCRIPT
|
7
|
+
mkdir -p #{log_dir} #{log_spool_dir}
|
8
|
+
chown syslog:adm #{log_dir} #{log_spool_dir}
|
9
|
+
/usr/sbin/service rsyslog restart
|
10
|
+
ENDSCRIPT
|
11
|
+
%>
|
12
|
+
|
13
|
+
# /etc/rsyslog.conf Configuration file for rsyslog.
|
14
|
+
#
|
15
|
+
# For more information see
|
16
|
+
# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
|
17
|
+
#
|
18
|
+
# Default logging rules can be found in /etc/rsyslog.d/50-default.conf
|
19
|
+
|
20
|
+
|
21
|
+
#################
|
22
|
+
#### MODULES ####
|
23
|
+
#################
|
24
|
+
|
25
|
+
$ModLoad imuxsock # provides support for local system logging
|
26
|
+
$ModLoad imklog # provides kernel logging support (previously done by rklogd)
|
27
|
+
#$ModLoad immark # provides --MARK-- message capability
|
28
|
+
|
29
|
+
$KLogPath /proc/kmsg
|
30
|
+
|
31
|
+
# provides UDP syslog reception
|
32
|
+
$ModLoad imudp
|
33
|
+
$UDPServerRun 514
|
34
|
+
|
35
|
+
# provides TCP syslog reception
|
36
|
+
#$ModLoad imtcp
|
37
|
+
#$InputTCPServerRun 514
|
38
|
+
|
39
|
+
$WorkDirectory <%= log_spool_dir %>
|
40
|
+
$template LogCollectorDynFile,"<%= log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%programname%.log"
|
41
|
+
|
42
|
+
###########################
|
43
|
+
#### GLOBAL DIRECTIVES ####
|
44
|
+
###########################
|
45
|
+
|
46
|
+
#
|
47
|
+
# Use traditional timestamp format.
|
48
|
+
# To enable high precision timestamps, comment out the following line.
|
49
|
+
#
|
50
|
+
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
51
|
+
|
52
|
+
# Don't filter duplicated messages
|
53
|
+
$RepeatedMsgReduction off
|
54
|
+
|
55
|
+
#
|
56
|
+
# Set the default permissions for all log files.
|
57
|
+
#
|
58
|
+
$FileOwner syslog
|
59
|
+
$FileGroup adm
|
60
|
+
$FileCreateMode 0640
|
61
|
+
$DirCreateMode 0755
|
62
|
+
$Umask 0022
|
63
|
+
$PrivDropToUser syslog
|
64
|
+
$PrivDropToGroup adm
|
65
|
+
# https://bugs.launchpad.net/ubuntu/+source/rsyslog/+bug/484336
|
66
|
+
|
67
|
+
#
|
68
|
+
# Include all config files in /etc/rsyslog.d/
|
69
|
+
#
|
70
|
+
$IncludeConfig /etc/rsyslog.d/*.conf
|
71
|
+
|
@@ -21,8 +21,13 @@ namespace :rubber do
|
|
21
21
|
sed -i 's/rake.*/rake -v#{rubber_env.rake_version}/' #{rubber_env.rvm_prefix}/gemsets/global.gems
|
22
22
|
|
23
23
|
# Set up the .gemrc file
|
24
|
-
|
25
|
-
|
24
|
+
if [[ ! -f ~/.gemrc ]]; then
|
25
|
+
echo "--- " >> ~/.gemrc
|
26
|
+
fi
|
27
|
+
|
28
|
+
if ! grep -q 'gem: ' ~/.gemrc; then
|
29
|
+
echo "gem: --no-ri --no-rdoc" >> ~/.gemrc
|
30
|
+
fi
|
26
31
|
fi
|
27
32
|
ENDSCRIPT
|
28
33
|
end
|
@@ -1,15 +1,3 @@
|
|
1
|
-
# All variables can also be overridden on the role and/or host level by creating
|
2
|
-
# a sub level to the config under roles and hosts
|
3
|
-
# e.g. to install mysql only on db role, and awstats only on web01:
|
4
|
-
#
|
5
|
-
# packages: [ruby]
|
6
|
-
# roles:
|
7
|
-
# db:
|
8
|
-
# packages: [mysql]
|
9
|
-
# hosts:
|
10
|
-
# web01:
|
11
|
-
# packages: [awstats]
|
12
|
-
|
13
1
|
# REQUIRED: The name of your application
|
14
2
|
app_name: your_app_name
|
15
3
|
|
@@ -258,6 +246,10 @@ staging_roles: "web,app,db:primary=true"
|
|
258
246
|
#
|
259
247
|
# var_name: var_value
|
260
248
|
|
249
|
+
# All variables can also be overridden on the role and/or host level by creating
|
250
|
+
# a sub level to the config under roles and hosts
|
251
|
+
# e.g. to install mysql only on db role, and awstats only on web01:
|
252
|
+
|
261
253
|
# OPTIONAL: Role specific overrides
|
262
254
|
# roles:
|
263
255
|
# somerole:
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<%
|
2
|
+
@path = "/etc/haproxy/haproxy.cfg"
|
3
|
+
@additive = ["# start haproxy passenger", "# end haproxy passenger"]
|
4
|
+
%>
|
5
|
+
|
6
|
+
<%
|
7
|
+
backend_hosts = rubber_instances.for_role('app').collect { |i| i.name }
|
8
|
+
%>
|
9
|
+
|
10
|
+
listen passenger_proxy 0.0.0.0:<%= rubber_env.web_port %>
|
11
|
+
option forwardfor
|
12
|
+
<% backend_hosts.each do |server| %>
|
13
|
+
server <%= server %> <%= server %>:<%= rubber_env.passenger_listen_port %> maxconn <%= rubber_env.max_app_connections %> check
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
listen passenger_proxy_ssl 0.0.0.0:<%= rubber_env.web_ssl_port %>
|
17
|
+
mode tcp
|
18
|
+
option forwardfor
|
19
|
+
<% backend_hosts.each do |server| %>
|
20
|
+
server <%= server %> <%= server %>:<%= rubber_env.passenger_listen_ssl_port %> maxconn <%= rubber_env.max_app_connections %> check
|
21
|
+
<% end %>
|
data/generators/vulcanize/templates/complete_passenger_nginx/config/rubber/rubber-complete.yml
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
role_dependencies:
|
2
|
+
web: [haproxy]
|
3
|
+
app: [passenger_nginx]
|
4
|
+
|
5
|
+
web_port: 80
|
6
|
+
web_ssl_port: 443
|
7
|
+
web_tools_port: 8080
|
8
|
+
web_tools_ssl_port: 8443
|
9
|
+
|
10
|
+
security_groups:
|
11
|
+
web:
|
12
|
+
description: "To open up port #{web_port}/#{web_ssl_port} for http server on web role"
|
13
|
+
rules:
|
14
|
+
- protocol: tcp
|
15
|
+
from_port: "#{web_port}"
|
16
|
+
to_port: "#{web_port}"
|
17
|
+
source_ips: [0.0.0.0/0]
|
18
|
+
- protocol: tcp
|
19
|
+
from_port: "#{web_ssl_port}"
|
20
|
+
to_port: "#{web_ssl_port}"
|
21
|
+
source_ips: [0.0.0.0/0]
|
22
|
+
web_tools:
|
23
|
+
description: "To open up port #{web_tools_port}/#{web_tools_ssl_port} for internal/tools http server"
|
24
|
+
rules:
|
25
|
+
- protocol: tcp
|
26
|
+
from_port: "#{web_tools_port}"
|
27
|
+
to_port: "#{web_tools_port}"
|
28
|
+
source_ips: [0.0.0.0/0]
|
29
|
+
- protocol: tcp
|
30
|
+
from_port: "#{web_tools_ssl_port}"
|
31
|
+
to_port: "#{web_tools_ssl_port}"
|
32
|
+
source_ips: [0.0.0.0/0]
|
33
|
+
|
34
|
+
roles:
|
35
|
+
web:
|
36
|
+
assigned_security_groups: [web]
|
37
|
+
web_tools:
|
38
|
+
assigned_security_groups: [web_tools]
|
@@ -0,0 +1,8 @@
|
|
1
|
+
database_engines = ['mysql', 'postgresql']
|
2
|
+
if ! database_engines.any? {|d| @template_dependencies.include?(d)}
|
3
|
+
db = Rubber::Util::prompt("DATABASE",
|
4
|
+
"The database engine to use (#{database_engines.join(', ')})",
|
5
|
+
true,
|
6
|
+
'mysql')
|
7
|
+
template_dependencies << db
|
8
|
+
end
|
@@ -5,4 +5,4 @@ check process haproxy with pidfile /var/run/haproxy.pid
|
|
5
5
|
group haproxy-<%= RUBBER_ENV %>
|
6
6
|
start program = "/usr/bin/env service haproxy start"
|
7
7
|
stop program = "/usr/bin/env service haproxy stop"
|
8
|
-
if failed host <%= rubber_env.host %> port <%= rubber_env.haproxy_monitor_port %> with timeout 10 seconds for 10 cycles then restart
|
8
|
+
if failed host "<%= rubber_env.host %>" port <%= rubber_env.haproxy_monitor_port %> with timeout 10 seconds for 10 cycles then restart
|
@@ -0,0 +1,37 @@
|
|
1
|
+
role_dependencies:
|
2
|
+
app: [passenger_nginx]
|
3
|
+
|
4
|
+
web_port: 80
|
5
|
+
web_ssl_port: 443
|
6
|
+
web_tools_port: 8080
|
7
|
+
web_tools_ssl_port: 8443
|
8
|
+
|
9
|
+
security_groups:
|
10
|
+
web:
|
11
|
+
description: "To open up port #{web_port}/#{web_ssl_port} for http server on web role"
|
12
|
+
rules:
|
13
|
+
- protocol: tcp
|
14
|
+
from_port: "#{web_port}"
|
15
|
+
to_port: "#{web_port}"
|
16
|
+
source_ips: [0.0.0.0/0]
|
17
|
+
- protocol: tcp
|
18
|
+
from_port: "#{web_ssl_port}"
|
19
|
+
to_port: "#{web_ssl_port}"
|
20
|
+
source_ips: [0.0.0.0/0]
|
21
|
+
web_tools:
|
22
|
+
description: "To open up port #{web_tools_port}/#{web_tools_ssl_port} for internal/tools http server"
|
23
|
+
rules:
|
24
|
+
- protocol: tcp
|
25
|
+
from_port: "#{web_tools_port}"
|
26
|
+
to_port: "#{web_tools_port}"
|
27
|
+
source_ips: [0.0.0.0/0]
|
28
|
+
- protocol: tcp
|
29
|
+
from_port: "#{web_tools_ssl_port}"
|
30
|
+
to_port: "#{web_tools_ssl_port}"
|
31
|
+
source_ips: [0.0.0.0/0]
|
32
|
+
|
33
|
+
roles:
|
34
|
+
web:
|
35
|
+
assigned_security_groups: [web]
|
36
|
+
web_tools:
|
37
|
+
assigned_security_groups: [web_tools]
|
@@ -19,8 +19,12 @@ namespace :rubber do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
task :setup_paths, :roles => :mongodb do
|
22
|
-
|
23
|
-
|
22
|
+
rubber.sudo_script 'setup_mongodb_paths', <<-ENDSCRIPT
|
23
|
+
if [[ ! -d "#{rubber_env.mongodb_data_dir}" ]]; then
|
24
|
+
mkdir -p #{rubber_env.mongodb_data_dir}
|
25
|
+
chown -R mongodb:mongodb #{rubber_env.mongodb_data_dir}
|
26
|
+
fi
|
27
|
+
ENDSCRIPT
|
24
28
|
end
|
25
29
|
|
26
30
|
desc <<-DESC
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<%
|
2
2
|
@path = '/etc/munin/munin.conf'
|
3
|
+
@post = 'mkdir -p /var/www/munin; chown munin:munin /var/www/munin'
|
3
4
|
%>
|
4
5
|
|
5
6
|
# Example configuration file for Munin, generated by 'make build'
|
@@ -10,7 +11,7 @@
|
|
10
11
|
# defaulted to the values you see here.
|
11
12
|
#
|
12
13
|
dbdir /var/lib/munin
|
13
|
-
htmldir /var/
|
14
|
+
htmldir /var/www/munin
|
14
15
|
logdir /var/log/munin
|
15
16
|
rundir /var/run/munin
|
16
17
|
|
File without changes
|
File without changes
|
@@ -26,7 +26,7 @@ db_log_dir: "#{db_root_dir}/log"
|
|
26
26
|
# Capistrano needs db:primary role for migrate to work,
|
27
27
|
# so we might as well just make consistent across the board
|
28
28
|
role_dependencies:
|
29
|
-
mysql_master: [db:primary=true]
|
29
|
+
mysql_master: ["db:primary=true"]
|
30
30
|
mysql_slave: [db]
|
31
31
|
db:primary=true: [mysql_master]
|
32
32
|
db: [mysql_slave]
|
@@ -13,7 +13,7 @@ namespace :rubber do
|
|
13
13
|
# when variable interpolation of rvm_gem_home is run remotely, and since we
|
14
14
|
# are in cap, we run the interpolation locally
|
15
15
|
#
|
16
|
-
passenger_lib=$(find /usr/local/rvm -path "*/passenger-#{rubber_env.passenger_version}/*/mod_passenger.so" 2> /dev/null)
|
16
|
+
passenger_lib=$(find /usr/local/rvm/gems/`rvm current` -path "*/passenger-#{rubber_env.passenger_version}/*/mod_passenger.so" 2> /dev/null)
|
17
17
|
if [[ -z $passenger_lib ]]; then
|
18
18
|
echo -en "\n\n\n\n" | passenger-install-apache2-module
|
19
19
|
rvm #{rubber_env.rvm_ruby} --passenger
|
@@ -18,7 +18,7 @@ END
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def output_values
|
21
|
-
status = `sudo <%= rubber_env.rvm_gem_home %>/bin/passenger-memory-stats | tail -1`
|
21
|
+
status = `rvm exec sudo <%= rubber_env.rvm_gem_home %>/bin/passenger-memory-stats | tail -1`
|
22
22
|
unless $?.success?
|
23
23
|
$stderr.puts "failed executing passenger-memory-stats"
|
24
24
|
exit 1
|
data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger.conf
CHANGED
@@ -21,7 +21,7 @@ END
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def output_values
|
24
|
-
status = `sudo <%= rubber_env.rvm_gem_home %>/bin/passenger-status`
|
24
|
+
status = `rvm exec sudo <%= rubber_env.rvm_gem_home %>/bin/passenger-status`
|
25
25
|
unless $?.success?
|
26
26
|
$stderr.puts "failed executing passenger-status"
|
27
27
|
exit 1
|
@@ -1,4 +1,4 @@
|
|
1
|
-
passenger_version: 3.0.
|
1
|
+
passenger_version: 3.0.9
|
2
2
|
passenger_root: "#{rvm_gem_home}/gems/passenger-#{passenger_version}"
|
3
3
|
passenger_ruby: "#{rvm_prefix}/wrappers/#{`bash -l -c 'rvm strings #{rvm_ruby}'`.strip}/ruby"
|
4
4
|
passenger_lib: "#{passenger_root}/ext/apache2/mod_passenger.so"
|