rubber 2.1.0 → 2.1.1
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/.travis.yml +2 -2
- data/CHANGELOG +33 -0
- data/lib/rubber/cloud/fog.rb +12 -14
- data/lib/rubber/configuration.rb +1 -1
- data/lib/rubber/environment.rb +12 -3
- data/lib/rubber/recipes/rubber/setup.rb +7 -1
- data/lib/rubber/recipes/rubber/utils.rb +4 -1
- data/lib/rubber/version.rb +1 -2
- data/rubber.gemspec +1 -1
- data/templates/apache/config/rubber/deploy-apache.rb +13 -2
- data/templates/base/config/rubber/rubber.yml +9 -2
- data/templates/complete_passenger/config/rubber/role/haproxy/haproxy-passenger.conf +8 -1
- data/templates/couchbase/config/rubber/deploy-couchbase.rb +105 -0
- data/templates/couchbase/config/rubber/role/couchbase/crontab +8 -0
- data/templates/couchbase/config/rubber/rubber-couchbase.yml +25 -0
- data/templates/couchbase/templates.rb +3 -0
- data/templates/couchbase/templates.yml +1 -0
- data/templates/graylog/config/rubber/deploy-graylog.rb +5 -1
- data/templates/graylog/config/rubber/role/graylog_web/graylog_web-upstart.conf +1 -1
- data/templates/graylog/config/rubber/rubber-graylog.yml +3 -3
- data/templates/jenkins/config/rubber/deploy-jenkins.rb +37 -24
- data/templates/jenkins/config/rubber/role/jenkins/crontab +7 -0
- data/templates/jenkins/config/rubber/role/jenkins/github-deploy-key.pem +2 -0
- data/templates/jenkins/config/rubber/role/jenkins/github-deploy-key.pem.pub +2 -0
- data/templates/jenkins/config/rubber/role/jenkins/jenkins-apache-vhost.conf +1 -1
- data/templates/jenkins/config/rubber/rubber-jenkins.yml +1 -1
- data/templates/monit/config/rubber/role/couchbase/monit-couchbase.conf +7 -0
- data/templates/monit/config/rubber/role/resque_scheduler/monit-resque_scheduler.conf +10 -0
- data/templates/mysql/config/rubber/deploy-mysql.rb +1 -0
- data/templates/passenger/config/rubber/deploy-passenger.rb +43 -4
- data/templates/passenger/config/rubber/rubber-passenger.yml +4 -1
- data/templates/passenger_nginx/config/rubber/role/passenger_nginx/application.conf +13 -0
- data/templates/torquebox/config/rubber/role/torquebox/standalone-ha.xml +60 -54
- data/templates/torquebox/config/rubber/role/torquebox/standalone.conf +1 -0
- data/templates/torquebox/config/rubber/rubber-torquebox.yml +6 -4
- data/test/cloud/aws_test.rb +1 -1
- data/test/cloud/fog_test.rb +1 -1
- data/test/dns/aws_test.rb +28 -4
- data/test/dns/zerigo_test.rb +2 -2
- data/test/environment_test.rb +28 -8
- data/test/fixtures/basic/rubber.yml +5 -0
- data/test/instance_test.rb +1 -1
- metadata +14 -6
@@ -55,6 +55,7 @@ if [ "x$JAVA_OPTS" = "x" ]; then
|
|
55
55
|
JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
|
56
56
|
JAVA_OPTS="$JAVA_OPTS -Djboss.bind.address=<%= rubber_env.full_host %>"
|
57
57
|
JAVA_OPTS="$JAVA_OPTS -Djboss.mod_cluster.proxyList=<%= rubber_instances.for_role('web').collect { |host| "#{host.full_name}:80" }.join(',') %>"
|
58
|
+
JAVA_OPTS="$JAVA_OPTS -Djruby.home=<%= rubber_env.ruby_path %>"
|
58
59
|
JAVA_OPTS="$JAVA_OPTS -Djboss.server.default.config=standalone-ha.xml"
|
59
60
|
else
|
60
61
|
echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS"
|
@@ -1,16 +1,18 @@
|
|
1
|
-
torquebox_version: 2.0
|
1
|
+
torquebox_version: 2.1.0
|
2
2
|
torquebox_prefix: /opt
|
3
3
|
torquebox_dir: "#{torquebox_prefix}/torquebox"
|
4
|
+
torquebox_log_dir: /var/log/torquebox
|
4
5
|
torquebox_pid_file: "#{torquebox_dir}/jboss/standalone/torquebox.pid"
|
5
6
|
torquebox_http_port: 9090
|
6
7
|
torquebox_https_port: 9443
|
7
8
|
torquebox_ajp_port: 8009
|
8
9
|
|
9
|
-
backstage_user:
|
10
|
-
backstage_password:
|
10
|
+
backstage_user: nirvdrum
|
11
|
+
backstage_password: negativetwenty
|
11
12
|
|
12
13
|
mod_cluster_version: 1.2.0
|
13
14
|
|
14
15
|
roles:
|
15
16
|
torquebox:
|
16
|
-
packages: [openjdk-7-jdk
|
17
|
+
packages: [openjdk-7-jdk libaio1, unzip]
|
18
|
+
gems: [[torquebox, "#{torquebox_version}"]]
|
data/test/cloud/aws_test.rb
CHANGED
@@ -8,7 +8,7 @@ class AwsTest < Test::Unit::TestCase
|
|
8
8
|
|
9
9
|
setup do
|
10
10
|
env = {'access_key' => "XXX", 'secret_access_key' => "YYY", 'region' => "us-east-1"}
|
11
|
-
env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil)
|
11
|
+
env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
|
12
12
|
@cloud = Rubber::Cloud::Aws.new(env, nil)
|
13
13
|
end
|
14
14
|
|
data/test/cloud/fog_test.rb
CHANGED
@@ -9,7 +9,7 @@ class FogTest < Test::Unit::TestCase
|
|
9
9
|
setup do
|
10
10
|
env = {'credentials' =>
|
11
11
|
{'rackspace_api_key' => "XXX", 'rackspace_username' => "YYY", 'provider' => "rackspace"}}
|
12
|
-
env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil)
|
12
|
+
env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
|
13
13
|
@cloud = Rubber::Cloud::Fog.new(env, nil)
|
14
14
|
end
|
15
15
|
|
data/test/dns/aws_test.rb
CHANGED
@@ -10,7 +10,7 @@ class AwsTest < Test::Unit::TestCase
|
|
10
10
|
setup do
|
11
11
|
env = {'access_key' => get_secret('cloud_providers.aws.access_key') || 'xxx',
|
12
12
|
'access_secret' => get_secret('cloud_providers.aws.secret_access_key') || 'yyy'}
|
13
|
-
@env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil)
|
13
|
+
@env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
|
14
14
|
|
15
15
|
@dns = Rubber::Dns::Aws.new(@env)
|
16
16
|
destroy_test_domains(@dns)
|
@@ -18,8 +18,7 @@ class AwsTest < Test::Unit::TestCase
|
|
18
18
|
|
19
19
|
context "compatibility" do
|
20
20
|
should "create using old credential style" do
|
21
|
-
env = {'
|
22
|
-
'dns_providers' => {
|
21
|
+
env = {'dns_providers' => {
|
23
22
|
'fog' => {
|
24
23
|
'credentials' => {
|
25
24
|
'provider' => 'aws', 'aws_access_key_id' => 'xxx', 'aws_secret_access_key' => 'yyy'
|
@@ -27,7 +26,7 @@ class AwsTest < Test::Unit::TestCase
|
|
27
26
|
}
|
28
27
|
}
|
29
28
|
}
|
30
|
-
@env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil)
|
29
|
+
@env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
|
31
30
|
|
32
31
|
provider = Rubber::Dns::get_provider(@env.dns_provider, @env)
|
33
32
|
assert provider
|
@@ -189,6 +188,31 @@ class AwsTest < Test::Unit::TestCase
|
|
189
188
|
assert_equal "host#{max - 1}", records.first[:host]
|
190
189
|
end
|
191
190
|
|
191
|
+
should "use defaults not supplied by record" do
|
192
|
+
env = {'access_key' => get_secret('cloud_providers.aws.access_key') || 'xxx',
|
193
|
+
'access_secret' => get_secret('cloud_providers.aws.secret_access_key') || 'yyy',
|
194
|
+
'domain' => "#{TEST_DOMAIN}5.com",
|
195
|
+
'type' => 'A',
|
196
|
+
'ttl' => 345}
|
197
|
+
@env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
|
198
|
+
|
199
|
+
@dns = Rubber::Dns::Aws.new(@env)
|
200
|
+
|
201
|
+
@dns.create_host_record({:host => 'newhost', :data => ['1.1.1.1']})
|
202
|
+
|
203
|
+
@zone = @dns.find_or_create_zone(env['domain'])
|
204
|
+
assert_equal @zone.records.all.size, 1
|
205
|
+
record = @zone.records.first
|
206
|
+
attributes = @dns.host_to_opts(record)
|
207
|
+
|
208
|
+
assert_equal 'newhost', attributes[:host]
|
209
|
+
assert_equal ['1.1.1.1'], attributes[:data]
|
210
|
+
assert_equal env['domain'], attributes[:domain]
|
211
|
+
assert_equal env['type'], attributes[:type]
|
212
|
+
assert_equal env['ttl'], attributes[:ttl]
|
213
|
+
|
214
|
+
end
|
215
|
+
|
192
216
|
end
|
193
217
|
|
194
218
|
end
|
data/test/dns/zerigo_test.rb
CHANGED
@@ -8,7 +8,7 @@ class ZerigoTest < Test::Unit::TestCase
|
|
8
8
|
setup do
|
9
9
|
env = {'email' => get_secret('dns_providers.zerigo.email') || 'xxx',
|
10
10
|
'token' => get_secret('dns_providers.zerigo.token') || 'yyy'}
|
11
|
-
@env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil)
|
11
|
+
@env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
|
12
12
|
|
13
13
|
@dns = Rubber::Dns::Zerigo.new(@env)
|
14
14
|
destroy_test_domains(@dns)
|
@@ -25,7 +25,7 @@ class ZerigoTest < Test::Unit::TestCase
|
|
25
25
|
}
|
26
26
|
}
|
27
27
|
}
|
28
|
-
@env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil)
|
28
|
+
@env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
|
29
29
|
|
30
30
|
provider = Rubber::Dns::get_provider(@env.dns_provider, @env)
|
31
31
|
assert provider
|
data/test/environment_test.rb
CHANGED
@@ -4,12 +4,12 @@ class EnvironmentTest < Test::Unit::TestCase
|
|
4
4
|
include Rubber::Configuration
|
5
5
|
|
6
6
|
def test_known_roles
|
7
|
-
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/basic")
|
7
|
+
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/basic", 'test')
|
8
8
|
assert_equal ['role1', 'role2', 'role3', 'role4', 'role5'], env.known_roles, "list of known roles not correct"
|
9
9
|
end
|
10
10
|
|
11
11
|
def test_env
|
12
|
-
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/basic")
|
12
|
+
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/basic", 'test')
|
13
13
|
e = env.bind()
|
14
14
|
assert_equal 'val1', e['var1'], 'env not retrieving right val'
|
15
15
|
assert_equal 'val2', e['var2'], 'env not retrieving right val'
|
@@ -37,8 +37,28 @@ class EnvironmentTest < Test::Unit::TestCase
|
|
37
37
|
assert_equal 'host1val2', e.var2, 'env not retrieving right val for method missing'
|
38
38
|
end
|
39
39
|
|
40
|
+
def test_env_override
|
41
|
+
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/basic", 'test')
|
42
|
+
e = env.bind()
|
43
|
+
assert_equal 'val1', e['var1'], 'should be global val with no overrides'
|
44
|
+
assert_equal 'val2', e['var2'], 'should be global val with no overrides'
|
45
|
+
|
46
|
+
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/basic", 'env1')
|
47
|
+
e = env.bind(nil, nil)
|
48
|
+
assert_equal 'env1val1', e['var1'], 'should be val from env override'
|
49
|
+
assert_equal 'env1val2', e['var2'], 'should be val from env override'
|
50
|
+
|
51
|
+
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/basic", 'env1')
|
52
|
+
e = env.bind('role1', nil)
|
53
|
+
assert_equal 'env1val2', e['var2'], 'env override should win against role'
|
54
|
+
|
55
|
+
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/basic", 'env1')
|
56
|
+
e = env.bind(nil, 'host1')
|
57
|
+
assert_equal 'host1val2', e['var2'], 'host override should win against env'
|
58
|
+
end
|
59
|
+
|
40
60
|
def test_host_override
|
41
|
-
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/basic")
|
61
|
+
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/basic", 'test')
|
42
62
|
e = env.bind('norole', 'host2')
|
43
63
|
assert_equal 'host2val3', e['var3'], 'env not retrieving right val'
|
44
64
|
assert_equal %w[host2val4a host2val4b], e['var4'], 'env not retrieving right val'
|
@@ -56,7 +76,7 @@ class EnvironmentTest < Test::Unit::TestCase
|
|
56
76
|
end
|
57
77
|
|
58
78
|
def test_expansion
|
59
|
-
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/expansion")
|
79
|
+
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/expansion", 'test')
|
60
80
|
e = env.bind()
|
61
81
|
assert_equal 'val1', e['var1']
|
62
82
|
assert_equal 'val2', e['var2']
|
@@ -89,7 +109,7 @@ class EnvironmentTest < Test::Unit::TestCase
|
|
89
109
|
end
|
90
110
|
|
91
111
|
def test_bool_expansion
|
92
|
-
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/expansion")
|
112
|
+
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/expansion", 'test')
|
93
113
|
e = env.bind()
|
94
114
|
assert_equal true, e['truevar']
|
95
115
|
assert_equal false, e['falsevar']
|
@@ -101,19 +121,19 @@ class EnvironmentTest < Test::Unit::TestCase
|
|
101
121
|
end
|
102
122
|
|
103
123
|
def test_secret_env
|
104
|
-
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/basic")
|
124
|
+
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/basic", 'test')
|
105
125
|
e = env.bind()
|
106
126
|
assert_nil e['rubber_secret'], 'env should not have secret set'
|
107
127
|
|
108
128
|
fixture_dir = File.expand_path("#{File.dirname(__FILE__)}/fixtures/secret")
|
109
|
-
env = Rubber::Configuration::Environment.new(fixture_dir)
|
129
|
+
env = Rubber::Configuration::Environment.new(fixture_dir, 'test')
|
110
130
|
e = env.bind()
|
111
131
|
assert_equal "#{fixture_dir}/secret.yml", e['rubber_secret'], 'env should have secret set'
|
112
132
|
assert_equal "secret_val", e['secret_key'], 'env should have gotten setting from secret file'
|
113
133
|
end
|
114
134
|
|
115
135
|
def test_nested_ref
|
116
|
-
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/nested")
|
136
|
+
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/nested", 'test')
|
117
137
|
e = env.bind()
|
118
138
|
assert_equal 'val1', e.var1, 'env not retrieving right val'
|
119
139
|
assert_equal 'val3', e.var2.var3, 'env not retrieving right val'
|
data/test/instance_test.rb
CHANGED
@@ -198,7 +198,7 @@ class InstanceTest < Test::Unit::TestCase
|
|
198
198
|
|
199
199
|
setup do
|
200
200
|
env = {'access_key' => "XXX", 'secret_access_key' => "YYY", 'region' => "us-east-1"}
|
201
|
-
env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil)
|
201
|
+
env = Rubber::Configuration::Environment::BoundEnv.new(env, nil, nil, nil)
|
202
202
|
@cloud = Rubber::Cloud::Aws.new(env, nil)
|
203
203
|
@cloud.storage_provider.put_bucket('bucket')
|
204
204
|
Rubber.stubs(:cloud).returns(@cloud)
|
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.1.
|
4
|
+
version: 2.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-10-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: capistrano
|
@@ -99,7 +99,7 @@ dependencies:
|
|
99
99
|
requirements:
|
100
100
|
- - ~>
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '1.
|
102
|
+
version: '1.6'
|
103
103
|
type: :runtime
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -107,7 +107,7 @@ dependencies:
|
|
107
107
|
requirements:
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '1.
|
110
|
+
version: '1.6'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: json
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -351,6 +351,11 @@ files:
|
|
351
351
|
- templates/complete_unicorn_nginx/templates.yml
|
352
352
|
- templates/complete_unicorn_nginx_mysql/templates.yml
|
353
353
|
- templates/complete_unicorn_nginx_postgresql/templates.yml
|
354
|
+
- templates/couchbase/config/rubber/deploy-couchbase.rb
|
355
|
+
- templates/couchbase/config/rubber/role/couchbase/crontab
|
356
|
+
- templates/couchbase/config/rubber/rubber-couchbase.yml
|
357
|
+
- templates/couchbase/templates.rb
|
358
|
+
- templates/couchbase/templates.yml
|
354
359
|
- templates/cruise/config/rubber/deploy-cruise.rb
|
355
360
|
- templates/cruise/config/rubber/role/cruise/cruise
|
356
361
|
- templates/cruise/config/rubber/role/cruise/my.cnf
|
@@ -402,6 +407,7 @@ files:
|
|
402
407
|
- templates/haproxy/templates.yml
|
403
408
|
- templates/jenkins/config/environments/jenkins.rb
|
404
409
|
- templates/jenkins/config/rubber/deploy-jenkins.rb
|
410
|
+
- templates/jenkins/config/rubber/role/jenkins/crontab
|
405
411
|
- templates/jenkins/config/rubber/role/jenkins/github-deploy-key.pem
|
406
412
|
- templates/jenkins/config/rubber/role/jenkins/github-deploy-key.pem.pub
|
407
413
|
- templates/jenkins/config/rubber/role/jenkins/jenkins-apache-vhost.conf
|
@@ -435,6 +441,7 @@ files:
|
|
435
441
|
- templates/monit/config/rubber/deploy-monit.rb
|
436
442
|
- templates/monit/config/rubber/role/apache/monit-apache.conf
|
437
443
|
- templates/monit/config/rubber/role/cassandra/monit-cassandra.conf
|
444
|
+
- templates/monit/config/rubber/role/couchbase/monit-couchbase.conf
|
438
445
|
- templates/monit/config/rubber/role/elasticsearch/monit-elasticsearch.conf
|
439
446
|
- templates/monit/config/rubber/role/graphite_server/monit-graphite_server.conf
|
440
447
|
- templates/monit/config/rubber/role/graylog_server/monit-graylog_server.conf
|
@@ -453,6 +460,7 @@ files:
|
|
453
460
|
- templates/monit/config/rubber/role/passenger_nginx/monit-nginx.conf
|
454
461
|
- templates/monit/config/rubber/role/postgresql/monit-postgresql.conf
|
455
462
|
- templates/monit/config/rubber/role/redis/monit-redis.conf
|
463
|
+
- templates/monit/config/rubber/role/resque_scheduler/monit-resque_scheduler.conf
|
456
464
|
- templates/monit/config/rubber/role/resque_web/monit-resque_web.conf
|
457
465
|
- templates/monit/config/rubber/role/resque_worker/monit-resque_pool.conf
|
458
466
|
- templates/monit/config/rubber/role/sphinx/monit-sphinx.conf
|
@@ -656,7 +664,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
656
664
|
version: '0'
|
657
665
|
segments:
|
658
666
|
- 0
|
659
|
-
hash:
|
667
|
+
hash: 3394204759182119607
|
660
668
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
661
669
|
none: false
|
662
670
|
requirements:
|
@@ -665,7 +673,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
665
673
|
version: '0'
|
666
674
|
segments:
|
667
675
|
- 0
|
668
|
-
hash:
|
676
|
+
hash: 3394204759182119607
|
669
677
|
requirements: []
|
670
678
|
rubyforge_project: rubber
|
671
679
|
rubygems_version: 1.8.24
|