rubber 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +53 -0
- data/VERSION +1 -1
- data/generators/vulcanize/templates/base/config/rubber/common/monit-postfix.conf +8 -0
- data/generators/vulcanize/templates/base/config/rubber/rubber.yml +3 -3
- data/generators/vulcanize/templates/passenger/config/rubber/deploy-passenger.rb +1 -1
- data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger.conf +3 -3
- data/generators/vulcanize/templates/passenger/config/rubber/rubber-passenger.yml +4 -0
- data/generators/vulcanize/templates/redis/config/rubber/deploy-redis.rb +36 -0
- data/generators/vulcanize/templates/redis/config/rubber/role/redis/crontab +8 -0
- data/generators/vulcanize/templates/redis/config/rubber/role/redis/monit-redis.conf +9 -0
- data/generators/vulcanize/templates/redis/config/rubber/role/redis/redis.conf +141 -0
- data/generators/vulcanize/templates/redis/config/rubber/rubber-redis.yml +4 -0
- data/generators/vulcanize/templates/redis/templates.yml +1 -0
- data/lib/rubber/recipes/rubber/instances.rb +5 -1
- metadata +10 -3
data/CHANGELOG
CHANGED
@@ -1,3 +1,56 @@
|
|
1
|
+
1.1.3
|
2
|
+
-----
|
3
|
+
|
4
|
+
use correct path for passenger when using enterprise ruby or not <20a8542> [Matt Conway]
|
5
|
+
add ability to grab default roles from rubber.yml at instance creation time <8817d78> [Matt Conway]
|
6
|
+
add gemcutter, simplify changelog <44d989b> [Matt Conway]
|
7
|
+
update to latest 9.04 ami <5043937> [Matt Conway]
|
8
|
+
initial redis module <bb3a6b2> [Matt Conway]
|
9
|
+
monitor postfix <6303745> [Matt Conway]
|
10
|
+
switch to gemcutter <aead58a> [Matt Conway]
|
11
|
+
add changelog generation <06475d9> [Matt Conway]
|
12
|
+
|
13
|
+
1.1.2
|
14
|
+
-----
|
15
|
+
|
16
|
+
fix ver <e32a665> [Matt Conway]
|
17
|
+
fix ver <f5c5172> [Matt Conway]
|
18
|
+
remove bad code <16306dc> [Matt Conway]
|
19
|
+
|
20
|
+
1.1.1
|
21
|
+
-----
|
22
|
+
|
23
|
+
prevent reading from env before it is created (infinite loop) <b3255cb> [Matt Conway]
|
24
|
+
fix gemcutter task <7372e7b> [Matt Conway]
|
25
|
+
ignore gems <a879638> [Matt Conway]
|
26
|
+
|
27
|
+
1.1.0
|
28
|
+
-----
|
29
|
+
|
30
|
+
add setup of arbitrary dns records via nettica or zerigo apis <61ca87e> [Matt Conway]
|
31
|
+
command for backing up arbitrary directories <d984451> [Matt Conway]
|
32
|
+
helper for installing rubber gems locally <51e926b> [Matt Conway]
|
33
|
+
add lib for rails initiliazer, fix bad char in description for gemcutter, add task for pushing to gemcutter <0ab8d80> [Matt Conway]
|
34
|
+
refactor dns classes to allow setting up other dns records from rubber.yml <937629c> [Matt Conway]
|
35
|
+
add rails/init.rb to gemspec, automate gemcutter gem creation <c9c3e52> [Matt Conway]
|
36
|
+
update REE to 1.8.7-20090928 <59888ec> [Matt Conway]
|
37
|
+
add gemcutter source <ae8aabb> [Matt Conway]
|
38
|
+
add forwarded ip address <735c9c7> [Matt Conway]
|
39
|
+
Merge branch 'master' of git@github.com:wr0ngway/rubber <4b1159b> [Matt Conway]
|
40
|
+
fix apache roles <83f602c> [Matt Conway]
|
41
|
+
better error message for missing image on destroy <53e8cf2> [Matt Conway]
|
42
|
+
don't check status when getting single host <d01a79c> [Matt Conway]
|
43
|
+
fix bad encoding char for gemcutter <c5290c2> [Matt Conway]
|
44
|
+
|
45
|
+
1.0.2
|
46
|
+
-----
|
47
|
+
|
48
|
+
add some error checking <ad2c6a3> [Matt Conway]
|
49
|
+
add error msg for auth failure <7ca7bec> [Matt Conway]
|
50
|
+
fix setting of ip in zerigo <8ca947a> [Matt Conway]
|
51
|
+
more todos <a13e97a> [Matt Conway]
|
52
|
+
version bump <6c80a34> [Matt Conway]
|
53
|
+
|
1
54
|
1.0.1
|
2
55
|
-----
|
3
56
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.3
|
@@ -75,10 +75,10 @@ cloud_providers:
|
|
75
75
|
|
76
76
|
# REQUIRED: the ami and instance type for creating instances
|
77
77
|
# The Ubuntu images at http://alestic.com/ work well
|
78
|
-
# Ubuntu 9.04 Jaunty base install 32-bit 2.6.21.7-2.fc8xen ami-
|
79
|
-
# Ubuntu 9.04 Jaunty base install 64-bit 2.6.21.7-2.fc8xen ami-
|
78
|
+
# Ubuntu 9.04 Jaunty base install 32-bit 2.6.21.7-2.fc8xen ami-ccf615a5
|
79
|
+
# Ubuntu 9.04 Jaunty base install 64-bit 2.6.21.7-2.fc8xen ami-eef61587
|
80
80
|
#
|
81
|
-
image_id: ami-
|
81
|
+
image_id: ami-ccf615a5
|
82
82
|
# m1.small or m1.large or m1.xlarge
|
83
83
|
image_type: m1.small
|
84
84
|
|
@@ -9,7 +9,7 @@ namespace :rubber do
|
|
9
9
|
|
10
10
|
task :custom_install, :roles => :passenger do
|
11
11
|
rubber.sudo_script 'install_passenger', <<-ENDSCRIPT
|
12
|
-
if [[ -z `ls
|
12
|
+
if [[ -z `ls #{rubber_env.passenger_lib} 2> /dev/null` ]]; then
|
13
13
|
echo -en "\n\n\n\n" | passenger-install-apache2-module
|
14
14
|
fi
|
15
15
|
ENDSCRIPT
|
@@ -2,9 +2,9 @@
|
|
2
2
|
@path = '/etc/apache2/mods-available/passenger.conf'
|
3
3
|
@post = 'cd /etc/apache2/mods-enabled && ln -fs ../mods-available/passenger.conf'
|
4
4
|
%>
|
5
|
-
LoadModule passenger_module
|
6
|
-
PassengerRoot
|
7
|
-
PassengerRuby
|
5
|
+
LoadModule passenger_module <%= rubber_env.passenger_lib %>
|
6
|
+
PassengerRoot <%= rubber_env.passenger_root %>
|
7
|
+
PassengerRuby <%= rubber_env.passenger_ruby %>
|
8
8
|
PassengerUseGlobalQueue on
|
9
9
|
|
10
10
|
PassengerMaxPoolSize <%= rubber_env.max_app_connections %>
|
@@ -1,4 +1,8 @@
|
|
1
1
|
passenger_version: 2.2.5
|
2
|
+
ruby_prefix: "#{use_enterprise_ruby ? '/usr/local' : '/usr'}"
|
3
|
+
passenger_root: "#{ruby_prefix}/lib/ruby/gems/1.8/gems/passenger-#{passenger_version}"
|
4
|
+
passenger_ruby: "#{ruby_prefix}/bin/ruby"
|
5
|
+
passenger_lib: "#{passenger_root}/ext/apache2/mod_passenger.so"
|
2
6
|
passenger_listen_port: 7000
|
3
7
|
passenger_listen_ssl_port: 7001
|
4
8
|
max_app_connections: 20
|
@@ -0,0 +1,36 @@
|
|
1
|
+
|
2
|
+
namespace :rubber do
|
3
|
+
|
4
|
+
namespace :redis do
|
5
|
+
|
6
|
+
rubber.allow_optional_tasks(self)
|
7
|
+
|
8
|
+
after "rubber:install_packages", "rubber:redis:custom_install"
|
9
|
+
|
10
|
+
task :custom_install, :roles => :redis do
|
11
|
+
custom_package('http://ftp.us.debian.org/debian/pool/main/r/redis/', 'redis-server', '1.01-1', '! -x /usr/bin/redis-server')
|
12
|
+
end
|
13
|
+
|
14
|
+
desc "Stops the redis server"
|
15
|
+
task :stop, :roles => :redis, :on_error => :continue do
|
16
|
+
run "/etc/init.d/redis-server stop"
|
17
|
+
end
|
18
|
+
|
19
|
+
desc "Starts the redis server"
|
20
|
+
task :start, :roles => :redis do
|
21
|
+
run "/etc/init.d/redis-server start"
|
22
|
+
end
|
23
|
+
|
24
|
+
desc "Restarts the redis server"
|
25
|
+
task :restart, :roles => :redis do
|
26
|
+
run "/etc/init.d/redis-server restart"
|
27
|
+
end
|
28
|
+
|
29
|
+
desc "Reloads the redis server"
|
30
|
+
task :reload, :roles => :redis do
|
31
|
+
run "/etc/init.d/redis-server restart"
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%
|
2
|
+
@read_cmd = 'crontab -l'
|
3
|
+
@write_cmd = 'crontab -'
|
4
|
+
@additive = ['# start-redis-crontab', '# end-redis-crontab']
|
5
|
+
%>
|
6
|
+
|
7
|
+
# backup redis DBs every hour
|
8
|
+
0 * * * * BACKUP_DIR=/mnt/redis_backups BACKUP_NAME=redis BACKUP_CMD="tar -czf %dir%/redis_%time_stamp%.tgz <%= rubber_env.redis_db_dir %>" <%= RUBBER_ROOT %>/script/cron-rake rubber:backup
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%
|
2
|
+
@path = '/etc/monit/monit.d/monit-redis.conf'
|
3
|
+
%>
|
4
|
+
<% PIDFILE = "/var/run/redis.pid" %>
|
5
|
+
check process redis with pidfile <%= PIDFILE %>
|
6
|
+
group redis-<%= RUBBER_ENV %>
|
7
|
+
start program = "/etc/init.d/redis-server start"
|
8
|
+
stop program = "/etc/init.d/redis-server stop"
|
9
|
+
if failed host <%= rubber_env.host %> port 6379 with timeout 10 seconds for 10 cycles then restart
|
@@ -0,0 +1,141 @@
|
|
1
|
+
<%
|
2
|
+
@path = '/etc/redis/redis.conf'
|
3
|
+
@post = <<-SCRIPT
|
4
|
+
mkdir -p #{rubber_env.redis_db_dir}
|
5
|
+
chown -R redis:redis #{rubber_env.redis_db_dir}
|
6
|
+
/etc/init.d/redis-server restart
|
7
|
+
SCRIPT
|
8
|
+
%>
|
9
|
+
|
10
|
+
# Redis configuration file example
|
11
|
+
|
12
|
+
# By default Redis does not run as a daemon. Use 'yes' if you need it.
|
13
|
+
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
|
14
|
+
daemonize yes
|
15
|
+
|
16
|
+
# When run as a daemon, Redis write a pid file in /var/run/redis.pid by default.
|
17
|
+
# You can specify a custom pid file location here.
|
18
|
+
pidfile /var/run/redis.pid
|
19
|
+
|
20
|
+
# Accept connections on the specified port, default is 6379
|
21
|
+
port 6379
|
22
|
+
|
23
|
+
# If you want you can bind a single interface, if the bind option is not
|
24
|
+
# specified all the interfaces will listen for connections.
|
25
|
+
#
|
26
|
+
# bind 127.0.0.1
|
27
|
+
|
28
|
+
# Close the connection after a client is idle for N seconds (0 to disable)
|
29
|
+
timeout 300
|
30
|
+
|
31
|
+
# Save the DB on disk:
|
32
|
+
#
|
33
|
+
# save <seconds> <changes>
|
34
|
+
#
|
35
|
+
# Will save the DB if both the given number of seconds and the given
|
36
|
+
# number of write operations against the DB occurred.
|
37
|
+
#
|
38
|
+
# In the example below the behaviour will be to save:
|
39
|
+
# after 900 sec (15 min) if at least 1 key changed
|
40
|
+
# after 300 sec (5 min) if at least 10 keys changed
|
41
|
+
# after 60 sec if at least 10000 keys changed
|
42
|
+
save 900 1
|
43
|
+
save 300 10
|
44
|
+
save 60 10000
|
45
|
+
|
46
|
+
# The filename where to dump the DB
|
47
|
+
dbfilename dump.rdb
|
48
|
+
|
49
|
+
# For default save/load DB in/from the working directory
|
50
|
+
# Note that you must specify a directory not a file name.
|
51
|
+
dir <%= rubber_env.redis_db_dir %>
|
52
|
+
|
53
|
+
# Set server verbosity to 'debug'
|
54
|
+
# it can be one of:
|
55
|
+
# debug (a lot of information, useful for development/testing)
|
56
|
+
# notice (moderately verbose, what you want in production probably)
|
57
|
+
# warning (only very important / critical messages are logged)
|
58
|
+
loglevel notice
|
59
|
+
|
60
|
+
# Specify the log file name. Also 'stdout' can be used to force
|
61
|
+
# the demon to log on the standard output. Note that if you use standard
|
62
|
+
# output for logging but daemonize, logs will be sent to /dev/null
|
63
|
+
logfile /var/log/redis/redis-server.log
|
64
|
+
|
65
|
+
# Set the number of databases. The default database is DB 0, you can select
|
66
|
+
# a different one on a per-connection basis using SELECT <dbid> where
|
67
|
+
# dbid is a number between 0 and 'databases'-1
|
68
|
+
databases 16
|
69
|
+
|
70
|
+
################################# REPLICATION #################################
|
71
|
+
|
72
|
+
# Master-Slave replication. Use slaveof to make a Redis instance a copy of
|
73
|
+
# another Redis server. Note that the configuration is local to the slave
|
74
|
+
# so for example it is possible to configure the slave to save the DB with a
|
75
|
+
# different interval, or to listen to another port, and so on.
|
76
|
+
|
77
|
+
# slaveof <masterip> <masterport>
|
78
|
+
|
79
|
+
################################## SECURITY ###################################
|
80
|
+
|
81
|
+
# Require clients to issue AUTH <PASSWORD> before processing any other
|
82
|
+
# commands. This might be useful in environments in which you do not trust
|
83
|
+
# others with access to the host running redis-server.
|
84
|
+
#
|
85
|
+
# This should stay commented out for backward compatibility and because most
|
86
|
+
# people do not need auth (e.g. they run their own servers).
|
87
|
+
|
88
|
+
# requirepass foobared
|
89
|
+
|
90
|
+
################################### LIMITS ####################################
|
91
|
+
|
92
|
+
# Set the max number of connected clients at the same time. By default there
|
93
|
+
# is no limit, and it's up to the number of file descriptors the Redis process
|
94
|
+
# is able to open. The special value '0' means no limts.
|
95
|
+
# Once the limit is reached Redis will close all the new connections sending
|
96
|
+
# an error 'max number of clients reached'.
|
97
|
+
|
98
|
+
# maxclients 128
|
99
|
+
|
100
|
+
# Don't use more memory than the specified amount of bytes.
|
101
|
+
# When the memory limit is reached Redis will try to remove keys with an
|
102
|
+
# EXPIRE set. It will try to start freeing keys that are going to expire
|
103
|
+
# in little time and preserve keys with a longer time to live.
|
104
|
+
# Redis will also try to remove objects from free lists if possible.
|
105
|
+
#
|
106
|
+
# If all this fails, Redis will start to reply with errors to commands
|
107
|
+
# that will use more memory, like SET, LPUSH, and so on, and will continue
|
108
|
+
# to reply to most read-only commands like GET.
|
109
|
+
#
|
110
|
+
# WARNING: maxmemory can be a good idea mainly if you want to use Redis as a
|
111
|
+
# 'state' server or cache, not as a real DB. When Redis is used as a real
|
112
|
+
# database the memory usage will grow over the weeks, it will be obvious if
|
113
|
+
# it is going to use too much memory in the long run, and you'll have the time
|
114
|
+
# to upgrade. With maxmemory after the limit is reached you'll start to get
|
115
|
+
# errors for write operations, and this may even lead to DB inconsistency.
|
116
|
+
|
117
|
+
# maxmemory <bytes>
|
118
|
+
|
119
|
+
############################### ADVANCED CONFIG ###############################
|
120
|
+
|
121
|
+
# Glue small output buffers together in order to send small replies in a
|
122
|
+
# single TCP packet. Uses a bit more CPU but most of the times it is a win
|
123
|
+
# in terms of number of queries per second. Use 'yes' if unsure.
|
124
|
+
glueoutputbuf yes
|
125
|
+
|
126
|
+
# Use object sharing. Can save a lot of memory if you have many common
|
127
|
+
# string in your dataset, but performs lookups against the shared objects
|
128
|
+
# pool so it uses more CPU and can be a bit slower. Usually it's a good
|
129
|
+
# idea.
|
130
|
+
#
|
131
|
+
# When object sharing is enabled (shareobjects yes) you can use
|
132
|
+
# shareobjectspoolsize to control the size of the pool used in order to try
|
133
|
+
# object sharing. A bigger pool size will lead to better sharing capabilities.
|
134
|
+
# In general you want this value to be at least the double of the number of
|
135
|
+
# very common strings you have in your dataset.
|
136
|
+
#
|
137
|
+
# WARNING: object sharing is experimental, don't enable this feature
|
138
|
+
# in production before of Redis 1.0-stable. Still please try this feature in
|
139
|
+
# your development environment so that we can test it better.
|
140
|
+
shareobjects no
|
141
|
+
shareobjectspoolsize 1024
|
@@ -0,0 +1 @@
|
|
1
|
+
description: The redis module
|
@@ -5,7 +5,11 @@ namespace :rubber do
|
|
5
5
|
DESC
|
6
6
|
required_task :create do
|
7
7
|
instance_alias = get_env('ALIAS', "Instance alias (e.g. web01)", true)
|
8
|
-
|
8
|
+
|
9
|
+
env = rubber_cfg.environment.bind(nil, instance_alias)
|
10
|
+
default_roles = env.instance_roles
|
11
|
+
r = get_env("ROLES", "Instance roles (e.g. web,app,db:primary=true)", true, default_roles)
|
12
|
+
|
9
13
|
if r == '*'
|
10
14
|
instance_roles = rubber_cfg.environment.known_roles
|
11
15
|
instance_roles = instance_roles.collect {|role| role == "db" ? "db:primary=true" : role }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Conway
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-11-02 00:00:00 -05:00
|
13
13
|
default_executable: vulcanize
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- generators/vulcanize/templates/base/Capfile
|
104
104
|
- generators/vulcanize/templates/base/config/deploy.rb
|
105
105
|
- generators/vulcanize/templates/base/config/rubber/common/crontab
|
106
|
+
- generators/vulcanize/templates/base/config/rubber/common/monit-postfix.conf
|
106
107
|
- generators/vulcanize/templates/base/config/rubber/common/profile.rc
|
107
108
|
- generators/vulcanize/templates/base/config/rubber/deploy-setup.rb
|
108
109
|
- generators/vulcanize/templates/base/config/rubber/rubber-dns.yml
|
@@ -205,6 +206,12 @@ files:
|
|
205
206
|
- generators/vulcanize/templates/passenger/config/rubber/role/passenger/passenger.conf
|
206
207
|
- generators/vulcanize/templates/passenger/config/rubber/rubber-passenger.yml
|
207
208
|
- generators/vulcanize/templates/passenger/templates.yml
|
209
|
+
- generators/vulcanize/templates/redis/config/rubber/deploy-redis.rb
|
210
|
+
- generators/vulcanize/templates/redis/config/rubber/role/redis/crontab
|
211
|
+
- generators/vulcanize/templates/redis/config/rubber/role/redis/monit-redis.conf
|
212
|
+
- generators/vulcanize/templates/redis/config/rubber/role/redis/redis.conf
|
213
|
+
- generators/vulcanize/templates/redis/config/rubber/rubber-redis.yml
|
214
|
+
- generators/vulcanize/templates/redis/templates.yml
|
208
215
|
- generators/vulcanize/templates/sphinx/config/rubber/common/sphinx.yml
|
209
216
|
- generators/vulcanize/templates/sphinx/config/rubber/deploy-sphinx.rb
|
210
217
|
- generators/vulcanize/templates/sphinx/config/rubber/role/sphinx/crontab
|
@@ -264,7 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
264
271
|
requirements: []
|
265
272
|
|
266
273
|
rubyforge_project: rubber
|
267
|
-
rubygems_version: 1.3.
|
274
|
+
rubygems_version: 1.3.5
|
268
275
|
signing_key:
|
269
276
|
specification_version: 3
|
270
277
|
summary: A capistrano plugin for managing multi-instance deployments to the cloud (ec2)
|