rubber 2.6.1 → 2.6.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG +26 -1
- data/lib/capistrano/thread_safety_fix.rb +30 -0
- data/lib/rubber/cloud/digital_ocean.rb +2 -2
- data/lib/rubber/recipes/rubber/volumes.rb +9 -1
- data/lib/rubber/recipes/rubber.rb +1 -0
- data/lib/rubber/version.rb +1 -1
- data/templates/base/config/rubber/rubber.yml +1 -1
- data/templates/cassandra/config/rubber/role/cassandra/monit-cassandra.conf +1 -1
- data/templates/graphite/config/rubber/role/graphite_server/monit-graphite_server.conf +1 -1
- data/templates/memcached/config/rubber/role/memcached/memcached.conf +3 -3
- data/templates/memcached/config/rubber/rubber-memcached.yml +1 -0
- data/templates/monit/config/rubber/role/cassandra/monit-cassandra.conf +1 -1
- data/templates/monit/config/rubber/role/elasticsearch/monit-elasticsearch.conf +1 -1
- data/templates/monit/config/rubber/role/graphite_server/monit-graphite_server.conf +1 -1
- data/templates/monit/config/rubber/role/graylog_server/monit-graylog_server.conf +1 -1
- data/templates/monit/config/rubber/role/graylog_web/monit-graylog_web.conf +1 -1
- data/templates/monit/config/rubber/role/jetty/monit-jetty.conf +1 -1
- data/templates/monit/config/rubber/role/mongrel/monit-mongrel.conf +1 -1
- data/templates/monit/config/rubber/role/redis/monit-redis.conf +1 -1
- data/templates/monit/config/rubber/role/sphinx/monit-sphinx.conf +1 -1
- data/templates/torquebox/config/rubber/role/torquebox/monit-torquebox.conf +1 -1
- data/templates/zookeeper/config/rubber/role/zookeeper/monit-zookeeper.conf +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f897442ad924496abcf7f3beeabfb592b0b5c7e9
|
4
|
+
data.tar.gz: e62e8386658cc1a20a8f32e0efa7113813b0166b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0dc0cd057ce461ee16d32d12c970c756cc9dd343e4f8e2861e08a1657131cba3777fe4449edcb964a5862caa8c445eca7f4e772bed94e3251290c9324fed2d2
|
7
|
+
data.tar.gz: 377e5688e2c403a57aee8c29de42057a679d31771f192bea842e46dd5f0d13f69439a29e478da8daacbd97ed45aaf6027fdb22e5ed85984e1fc64fd8f9a2b9dd
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,28 @@
|
|
1
|
+
2.6.2 (11/07/2013)
|
2
|
+
|
3
|
+
Improvements:
|
4
|
+
============
|
5
|
+
|
6
|
+
[memcached] Added configuration of max memcached memory size through rubber var 'memcached_max_mem'. <ba28c39>
|
7
|
+
[cassandra] Quote all `rubber_env.host` in Monit config template in case hostname conflicts with monit keyword. <61bd9b1>
|
8
|
+
[graphite] Quote all `rubber_env.host` in Monit config template in case hostname conflicts with monit keyword. <61bd9b1>
|
9
|
+
[elasticsearch] Quote all `rubber_env.host` in Monit config template in case hostname conflicts with monit keyword. <61bd9b1>
|
10
|
+
[graylog] Quote all `rubber_env.host` in Monit config template in case hostname conflicts with monit keyword. <61bd9b1>
|
11
|
+
[jetty] Quote all `rubber_env.host` in Monit config template in case hostname conflicts with monit keyword. <61bd9b1>
|
12
|
+
[mongrel] Quote all `rubber_env.host` in Monit config template in case hostname conflicts with monit keyword. <61bd9b1>
|
13
|
+
[redis] Quote all `rubber_env.host` in Monit config template in case hostname conflicts with monit keyword. <61bd9b1>
|
14
|
+
[sphinx] Quote all `rubber_env.host` in Monit config template in case hostname conflicts with monit keyword. <61bd9b1>
|
15
|
+
[torquebox] Quote all `rubber_env.host` in Monit config template in case hostname conflicts with monit keyword. <61bd9b1>
|
16
|
+
[zookeeper] Quote all `rubber_env.host` in Monit config template in case hostname conflicts with monit keyword. <61bd9b1>
|
17
|
+
|
18
|
+
Bug Fixes:
|
19
|
+
=========
|
20
|
+
|
21
|
+
[base] Fixed unknown method 'known_roles' when running create_staging. <44167c4>
|
22
|
+
[core] Fixed ip_address deprecation for digital ocean.
|
23
|
+
[core] Fixed a thread safety issue in Capistrano via a monkey-patch. <f3f9086>
|
24
|
+
|
25
|
+
|
1
26
|
2.6.1 (11/06/2013)
|
2
27
|
|
3
28
|
Improvements:
|
@@ -23,7 +48,7 @@ Improvements:
|
|
23
48
|
============
|
24
49
|
|
25
50
|
[base] Upgraded to ruby-build 20131030 <214423d>
|
26
|
-
[base]
|
51
|
+
[base] Enhances database.yml to respond to active environment, not just 'production' <3843caf>
|
27
52
|
|
28
53
|
|
29
54
|
2.5.5 (10/16/2013)
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'capistrano/configuration'
|
2
|
+
|
3
|
+
# Overrides a method in Capistrano::Configurations::Connections that has multiple threads writing to a shared hash.
|
4
|
+
# While that shared hash is a thread local variable, they the thread is passed as an argument, so all the connection
|
5
|
+
# threads are trying to update it at the same time. This has been observed to cause problems where servers will end
|
6
|
+
# up losing their connection objects, messing up all future SSH operations and eventually leading to an error about
|
7
|
+
# calling a method on a nil object.
|
8
|
+
#
|
9
|
+
# We shouldn't make a habit of patching Capistrano in Rubber. But since Capistrano 2.x is effectively a dead project,
|
10
|
+
# getting this fixed upstream is extremely unlikely.
|
11
|
+
|
12
|
+
module Capistrano
|
13
|
+
class Configuration
|
14
|
+
private
|
15
|
+
|
16
|
+
MUTEX = Mutex.new
|
17
|
+
|
18
|
+
def safely_establish_connection_to(server, thread, failures=nil)
|
19
|
+
conn = connection_factory.connect_to(server)
|
20
|
+
|
21
|
+
MUTEX.synchronize do
|
22
|
+
thread[:sessions] ||= {}
|
23
|
+
thread[:sessions][server] ||= conn
|
24
|
+
end
|
25
|
+
rescue Exception => err
|
26
|
+
raise unless failures
|
27
|
+
failures << { :server => server, :error => err }
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -79,8 +79,8 @@ module Rubber
|
|
79
79
|
instance[:id] = item.id
|
80
80
|
instance[:state] = item.state
|
81
81
|
instance[:type] = item.flavor_id
|
82
|
-
instance[:external_ip] = item.
|
83
|
-
instance[:internal_ip] = item.
|
82
|
+
instance[:external_ip] = item.public_ip_address
|
83
|
+
instance[:internal_ip] = item.public_ip_address
|
84
84
|
instance[:region_id] = item.region_id
|
85
85
|
instance[:provider] = 'digital_ocean'
|
86
86
|
instance[:platform] = 'linux'
|
@@ -41,7 +41,15 @@ namespace :rubber do
|
|
41
41
|
|
42
42
|
# The act of setting up volumes might blow away previously deployed code, so reset the update state so it can
|
43
43
|
# be deployed again if needed.
|
44
|
-
|
44
|
+
deploy_to = fetch(:deploy_to, nil)
|
45
|
+
|
46
|
+
unless deploy_to.nil?
|
47
|
+
deployed = capture("echo $(ls /var/run/reboot-required 2> /dev/null)")
|
48
|
+
|
49
|
+
unless deployed
|
50
|
+
set :rubber_code_was_updated, false
|
51
|
+
end
|
52
|
+
end
|
45
53
|
end
|
46
54
|
|
47
55
|
desc <<-DESC
|
data/lib/rubber/version.rb
CHANGED
@@ -266,7 +266,7 @@ stop_on_error_cmd: "function error_exit { exit 99; }; trap error_exit ERR"
|
|
266
266
|
#
|
267
267
|
# staging_roles: "web,app,db:primary=true"
|
268
268
|
# Auto detect staging roles
|
269
|
-
staging_roles: "#{
|
269
|
+
staging_roles: "#{known_roles.reject {|r| r =~ /slave/ || r =~ /^db$/ }.join(',')}"
|
270
270
|
|
271
271
|
# OPTIONAL: Lets one assign amazon elastic IPs (static IPs) to your instances
|
272
272
|
# You should typically set this on the role/host level rather than
|
@@ -7,7 +7,7 @@ check process cassandra with pidfile <%= rubber_env.cassandra_pid_file %>
|
|
7
7
|
group cassandra-<%= Rubber.env %>
|
8
8
|
start program = "<%= rubber_env.cassandra_dir %>/bin/cassandra -p <%= rubber_env.cassandra_pid_file %>"
|
9
9
|
stop program = "/bin/bash -l -c 'kill `cat <%= rubber_env.cassandra_pid_file %>`'"
|
10
|
-
#if failed host <%= rubber_env.host %> port <%= rubber_env.cassandra_rpc_port %> with timeout 10 seconds for 10 cycles then restart
|
10
|
+
#if failed host "<%= rubber_env.host %>" port <%= rubber_env.cassandra_rpc_port %> with timeout 10 seconds for 10 cycles then restart
|
11
11
|
|
12
12
|
<% if Rubber.env == 'production' %>
|
13
13
|
check filesystem commitlog_lv with path /mnt/cassandra/commitlog
|
@@ -5,4 +5,4 @@ check process graphite_server with pidfile <%= rubber_env.graphite_server_pid_fi
|
|
5
5
|
group graphite-<%= Rubber.env %>
|
6
6
|
start program = "/usr/bin/env service graphite-server start"
|
7
7
|
stop program = "/usr/bin/env service graphite-server stop"
|
8
|
-
if failed host <%= rubber_env.host %> port <%= rubber_env.graphite_server_port %> with timeout 10 seconds for 3 cycles then restart
|
8
|
+
if failed host "<%= rubber_env.host %>" port <%= rubber_env.graphite_server_port %> with timeout 10 seconds for 3 cycles then restart
|
@@ -6,7 +6,7 @@
|
|
6
6
|
# memcached default config file edited for mobicious
|
7
7
|
# 2003 - Jay Bonci <jaybonci@debian.org>
|
8
8
|
# This configuration file is read by the start-memcached script provided as
|
9
|
-
# part of the Debian GNU/Linux distribution.
|
9
|
+
# part of the Debian GNU/Linux distribution.
|
10
10
|
|
11
11
|
# Run memcached as a daemon. This command is implied, and is not needed for the
|
12
12
|
# daemon to run. See the README.Debian that comes with this package for more
|
@@ -25,10 +25,10 @@ logfile <%= rubber_env.memcached_log_dir %>/memcached.log
|
|
25
25
|
# Start with a cap of 64 megs of memory. It's reasonable, and the daemon default
|
26
26
|
# Note that the daemon will grow to this size, but does not start out holding this much
|
27
27
|
# memory
|
28
|
-
-m
|
28
|
+
-m <%= rubber_env.memcached_max_mem %>
|
29
29
|
|
30
30
|
# Default connection port is 11211
|
31
|
-
-p 11211
|
31
|
+
-p 11211
|
32
32
|
|
33
33
|
# Run the daemon as root. The start-memcached will default to running as root if no
|
34
34
|
# -u command is present in this config file
|
@@ -5,4 +5,4 @@ check process cassandra with pidfile <%= rubber_env.cassandra_pid_file %>
|
|
5
5
|
group cassandra-<%= Rubber.env %>
|
6
6
|
start program = "<%= rubber_env.cassandra_dir %>/bin/cassandra -p <%= rubber_env.cassandra_pid_file %>"
|
7
7
|
stop program = "kill `cat <%= rubber_env.cassandra_pid_file %>`"
|
8
|
-
if failed host <%= rubber_env.host %> port <%= rubber_env.cassandra_rpc_port %> with timeout 10 seconds for 10 cycles then restart
|
8
|
+
if failed host "<%= rubber_env.host %>" port <%= rubber_env.cassandra_rpc_port %> with timeout 10 seconds for 10 cycles then restart
|
@@ -5,4 +5,4 @@ check process elasticsearch with pidfile <%= rubber_env.elasticsearch_pid_file %
|
|
5
5
|
group elasticsearch-<%= Rubber.env %>
|
6
6
|
start program = "/usr/bin/env service elasticsearch start"
|
7
7
|
stop program = "/usr/bin/env service elasticsearch stop"
|
8
|
-
if failed host <%= rubber_env.host %> port <%= rubber_env.elasticsearch_http_port %> with timeout 10 seconds for 10 cycles then restart
|
8
|
+
if failed host "<%= rubber_env.host %>" port <%= rubber_env.elasticsearch_http_port %> with timeout 10 seconds for 10 cycles then restart
|
@@ -5,4 +5,4 @@ check process graphite_server with pidfile <%= rubber_env.graphite_server_pid_fi
|
|
5
5
|
group graphite-<%= Rubber.env %>
|
6
6
|
start program = "/usr/bin/env service graphite-server start"
|
7
7
|
stop program = "/usr/bin/env service graphite-server stop"
|
8
|
-
if failed host <%= rubber_env.host %> port <%= rubber_env.graphite_server_port %> with timeout 10 seconds for 3 cycles then restart
|
8
|
+
if failed host "<%= rubber_env.host %>" port <%= rubber_env.graphite_server_port %> with timeout 10 seconds for 3 cycles then restart
|
@@ -5,4 +5,4 @@ check process graylog_server with pidfile <%= rubber_env.graylog_server_pid_file
|
|
5
5
|
group graylog-<%= Rubber.env %>
|
6
6
|
start program = "/usr/bin/env service graylog-server start"
|
7
7
|
stop program = "/usr/bin/env service graylog-server stop"
|
8
|
-
if failed host <%= rubber_env.host %> port <%= rubber_env.graylog_server_port %> type UDP with timeout 10 seconds for 10 cycles then restart
|
8
|
+
if failed host "<%= rubber_env.host %>" port <%= rubber_env.graylog_server_port %> type UDP with timeout 10 seconds for 10 cycles then restart
|
@@ -5,4 +5,4 @@ check process graylog_web with pidfile <%= rubber_env.graylog_web_pid_file %>
|
|
5
5
|
group graylog-<%= Rubber.env %>
|
6
6
|
start program = "/usr/bin/env service graylog-web start"
|
7
7
|
stop program = "/usr/bin/env service graylog-web stop"
|
8
|
-
if failed host <%= rubber_env.host %> port <%= rubber_env.graylog_web_port %> with timeout 10 seconds for 10 cycles then restart
|
8
|
+
if failed host "<%= rubber_env.host %>" port <%= rubber_env.graylog_web_port %> with timeout 10 seconds for 10 cycles then restart
|
@@ -5,4 +5,4 @@ check process jetty with pidfile /var/run/jetty.pid
|
|
5
5
|
group jetty-<%= Rubber.env %>
|
6
6
|
start program = "<%= rubber_env.jetty_dir %>/bin/jetty.sh start"
|
7
7
|
stop program = "<%= rubber_env.jetty_dir %>/bin/jetty.sh stop"
|
8
|
-
if failed host <%= rubber_env.host %> port <%= rubber_env.jetty_port %> with timeout 10 seconds for 10 cycles then restart
|
8
|
+
if failed host "<%= rubber_env.host %>" port <%= rubber_env.jetty_port %> with timeout 10 seconds for 10 cycles then restart
|
@@ -16,5 +16,5 @@
|
|
16
16
|
stop program = "/bin/sh -c 'cd <%= Rubber.root %> && PATH=/usr/local/bin:$PATH && mongrel_rails cluster::stop --clean --only <%= port %> && sleep 30 && mongrel_rails cluster::stop --clean --force --only <%= port %>'"
|
17
17
|
if totalmem > 200.0 MB for 3 cycles then restart
|
18
18
|
<%# monit needs to test on same same interface that mongrel is listening on (see mongrel_cluster.yml) %>
|
19
|
-
if failed host <%= rubber_env.host %> port <%= port %> protocol http with timeout 10 seconds for 10 cycles then restart
|
19
|
+
if failed host "<%= rubber_env.host %>" port <%= port %> protocol http with timeout 10 seconds for 10 cycles then restart
|
20
20
|
<% end %>
|
@@ -5,4 +5,4 @@ check process redis with pidfile <%= rubber_env.redis_server_pid_file %>
|
|
5
5
|
group redis-<%= Rubber.env %>
|
6
6
|
start program = "/usr/bin/env service redis-server start"
|
7
7
|
stop program = "/usr/bin/env service redis-server stop"
|
8
|
-
if failed host <%= rubber_env.host %> port <%= rubber_env.redis_server_port %> with timeout 10 seconds for 10 cycles then restart
|
8
|
+
if failed host "<%= rubber_env.host %>" port <%= rubber_env.redis_server_port %> with timeout 10 seconds for 10 cycles then restart
|
@@ -10,4 +10,4 @@ check process sphinx with pidfile <%= pidfile %>
|
|
10
10
|
group sphinx-<%= Rubber.env %>
|
11
11
|
start program = "/usr/bin/sudo -H -u <%= rubber_env.app_user %> bash -l -c '<%= start_program %>'"
|
12
12
|
stop program = "/usr/bin/sudo -H -u <%= rubber_env.app_user %> bash -l -c '<%= stop_program %>'"
|
13
|
-
if failed host <%= rubber_env.host %> port 9312 with timeout 5 seconds for 5 cycles then restart
|
13
|
+
if failed host "<%= rubber_env.host %>" port 9312 with timeout 5 seconds for 5 cycles then restart
|
@@ -5,4 +5,4 @@ check process torquebox with pidfile <%= rubber_env.torquebox_pid_file %>
|
|
5
5
|
group torquebox-<%= Rubber.env %>
|
6
6
|
start program = "/usr/bin/env service torquebox start"
|
7
7
|
stop program = "/usr/bin/env service torquebox stop"
|
8
|
-
if failed host <%= rubber_env.host %> port <%= rubber_env.torquebox_http_port %> with timeout 10 seconds for 20 cycles then restart
|
8
|
+
if failed host "<%= rubber_env.host %>" port <%= rubber_env.torquebox_http_port %> with timeout 10 seconds for 20 cycles then restart
|
@@ -5,4 +5,4 @@ check process zookeeper with pidfile <%= rubber_env.zookeeper_pid_file %>
|
|
5
5
|
group zookeeper-<%= Rubber.env %>
|
6
6
|
start program = "/usr/bin/env service zookeeper start"
|
7
7
|
stop program = "/usr/bin/env service zookeeper stop"
|
8
|
-
if failed host <%= rubber_env.host %> port <%= rubber_env.zookeeper_client_port %> with timeout 10 seconds for 10 cycles then restart
|
8
|
+
if failed host "<%= rubber_env.host %>" port <%= rubber_env.zookeeper_client_port %> with timeout 10 seconds for 10 cycles then restart
|
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: 2.6.
|
4
|
+
version: 2.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Conway
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
@@ -205,6 +205,7 @@ files:
|
|
205
205
|
- TODO
|
206
206
|
- bin/rubber
|
207
207
|
- lib/capistrano/hostcmd.rb
|
208
|
+
- lib/capistrano/thread_safety_fix.rb
|
208
209
|
- lib/rubber.rb
|
209
210
|
- lib/rubber/capistrano.rb
|
210
211
|
- lib/rubber/cli.rb
|