rubber 2.1.2 → 2.2.0
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 -4
- data/CHANGELOG +98 -0
- data/LICENSE +10 -336
- data/lib/rubber/cloud/aws.rb +8 -8
- data/lib/rubber/commands/cron.rb +1 -1
- data/lib/rubber/commands/util.rb +46 -0
- data/lib/rubber/encryption.rb +46 -0
- data/lib/rubber/environment.rb +24 -5
- data/lib/rubber/recipes/rubber.rb +1 -1
- data/lib/rubber/recipes/rubber/instances.rb +97 -37
- data/lib/rubber/recipes/rubber/setup.rb +9 -4
- data/lib/rubber/recipes/rubber/static_ips.rb +3 -2
- data/lib/rubber/version.rb +1 -1
- data/rubber.gemspec +1 -2
- data/templates/apache/config/rubber/rubber-apache.yml +2 -2
- data/templates/base/config/deploy.rb +1 -1
- data/templates/base/config/rubber/common/crontab +1 -3
- data/templates/base/config/rubber/common/gemrc +5 -0
- data/templates/base/config/rubber/common/rubber.profile +0 -3
- data/templates/base/config/rubber/common/ruby.profile +9 -0
- data/templates/base/config/rubber/deploy-setup.rb +45 -65
- data/templates/base/config/rubber/rubber-ruby.yml +21 -0
- data/templates/base/config/rubber/rubber.yml +8 -3
- data/templates/base/script/rubber +7 -3
- data/templates/collectd/config/rubber/role/passenger/collectd-passenger.rb.conf +2 -2
- data/templates/collectd/config/rubber/role/passenger/passenger-status-sudoers.conf +2 -2
- data/templates/complete_unicorn_nginx/config/rubber/rubber-complete.yml +2 -3
- data/templates/complete_unicorn_nginx/templates.yml +0 -1
- data/templates/elasticsearch/config/rubber/deploy-elasticsearch.rb +1 -1
- data/templates/elasticsearch/config/rubber/rubber-elasticsearch.yml +1 -1
- data/templates/graphite/config/rubber/deploy-graphite.rb +9 -52
- data/templates/graphite/config/rubber/role/graphite_server/carbon.conf +1 -1
- data/templates/graphite/config/rubber/role/graphite_server/graphite-collectd-ping.conf +11 -0
- data/templates/graphite/config/rubber/role/graphite_server/monit-graphite_server.conf +8 -0
- data/templates/graphite/config/rubber/role/graphite_web/graphite_web-upstart.conf +15 -0
- data/templates/graphite/config/rubber/role/graphite_web/monit-graphite_web.conf +7 -0
- data/templates/graphite/config/rubber/role/graphite_web/uwsgi.ini +16 -0
- data/templates/graphite/config/rubber/rubber-graphite.yml +6 -4
- data/templates/graphite/templates.yml +2 -0
- data/templates/mongrel/config/rubber/deploy-mongrel.rb +1 -1
- data/templates/monit/config/rubber/role/mongrel/monit-mongrel.conf +2 -2
- data/templates/munin/config/rubber/role/munin/munin-plugins.conf +3 -3
- data/templates/munin/config/rubber/role/passenger/munin-passenger-memory.conf +1 -1
- data/templates/munin/config/rubber/role/passenger/munin-passenger-sudoers.conf +2 -2
- data/templates/munin/config/rubber/role/passenger/munin-passenger.conf +1 -1
- data/templates/munin/config/rubber/role/passenger_nginx/munin-passenger-memory.conf +1 -1
- data/templates/munin/config/rubber/role/passenger_nginx/munin-passenger-sudoers.conf +2 -2
- data/templates/munin/config/rubber/role/passenger_nginx/munin-passenger.conf +1 -1
- data/templates/passenger/config/rubber/deploy-passenger.rb +5 -11
- data/templates/passenger/config/rubber/role/passenger/passenger-apache-vhost.conf +12 -0
- data/templates/passenger/config/rubber/rubber-passenger.yml +3 -3
- data/templates/passenger_nginx/config/rubber/role/passenger_nginx/nginx.conf +1 -1
- data/templates/passenger_nginx/config/rubber/rubber-passenger_nginx.yml +2 -2
- data/templates/postgresql/config/rubber/deploy-postgresql.rb +47 -0
- data/templates/redis/config/rubber/rubber-redis.yml +1 -1
- data/templates/resque/templates.yml +0 -1
- data/templates/sidekiq/config/rubber/deploy-sidekiq.rb +35 -0
- data/templates/sidekiq/config/rubber/role/sidekiq/monit-sidekiq.conf +10 -0
- data/templates/sidekiq/config/rubber/rubber-sidekiq.yml +2 -0
- data/templates/sidekiq/templates.rb +2 -0
- data/templates/sidekiq/templates.yml +4 -0
- data/templates/solr/config/rubber/common/solr_sunspot.yml +10 -0
- data/templates/solr/config/rubber/deploy-solr.rb +78 -0
- data/templates/solr/config/rubber/rubber-solr.yml +10 -0
- data/templates/solr/templates.yml +3 -0
- data/templates/sphinx/config/rubber/deploy-sphinx.rb +4 -4
- data/templates/torquebox/config/rubber/deploy-torquebox.rb +16 -4
- data/templates/torquebox/config/rubber/role/app/torquebox-apache-vhost.conf +15 -5
- data/templates/torquebox/config/rubber/role/torquebox/graylog-logging-module.xml +9 -0
- data/templates/torquebox/config/rubber/role/torquebox/standalone-ha.xml +25 -7
- data/templates/torquebox/config/rubber/role/torquebox/standalone.conf +2 -2
- data/templates/torquebox/config/rubber/rubber-torquebox.yml +6 -3
- data/templates/zookeeper/config/rubber/rubber-zookeeper.yml +1 -1
- data/test/command_test.rb +7 -5
- data/test/commands/cron_test.rb +22 -18
- data/test/commands/util_test.rb +40 -0
- data/test/encryption_test.rb +59 -0
- data/test/environment_test.rb +14 -0
- data/test/fixtures/obfuscated/rubber.yml +3 -0
- data/test/fixtures/obfuscated/secret.yml +1 -0
- metadata +33 -12
- data/templates/base/config/rubber/rubber-rvm.yml +0 -42
- data/templates/complete_passenger/templates.rb +0 -9
- data/templates/complete_passenger_nginx/templates.rb +0 -8
- data/templates/complete_unicorn_nginx/config/rubber/role/haproxy/haproxy-unicorn.conf +0 -21
- data/templates/complete_unicorn_nginx/templates.rb +0 -8
- data/templates/graphite/config/rubber/role/graphite_web/graphite-vhost.conf +0 -62
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
require File.expand_path(File.join(__FILE__, '..', 'test_helper'))
|
|
2
|
+
require 'rubber/encryption'
|
|
3
|
+
|
|
4
|
+
class EncryptionTest < Test::Unit::TestCase
|
|
5
|
+
include Rubber::Encryption
|
|
6
|
+
|
|
7
|
+
should "generate a unique encryption key" do
|
|
8
|
+
k1, k2 = generate_encrypt_key, generate_encrypt_key
|
|
9
|
+
assert k1
|
|
10
|
+
assert k2
|
|
11
|
+
assert k1 != k2
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
context "encryption" do
|
|
15
|
+
|
|
16
|
+
setup do
|
|
17
|
+
@key = generate_encrypt_key
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
should "encrypt data" do
|
|
21
|
+
pend('This is not yet working on JRuby.') if defined?(JRUBY_VERSION)
|
|
22
|
+
|
|
23
|
+
data = "hello"
|
|
24
|
+
e = encrypt(data, @key)
|
|
25
|
+
assert e
|
|
26
|
+
assert e.size > 0
|
|
27
|
+
assert e != data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
should "decrypt data" do
|
|
31
|
+
pend('This is not yet working on JRuby.') if defined?(JRUBY_VERSION)
|
|
32
|
+
|
|
33
|
+
data = "hello"
|
|
34
|
+
e = encrypt(data, @key)
|
|
35
|
+
d = decrypt(e, @key)
|
|
36
|
+
assert data == d
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
should "pretty print large data" do
|
|
40
|
+
pend('This is not yet working on JRuby.') if defined?(JRUBY_VERSION)
|
|
41
|
+
|
|
42
|
+
data = "foo" * 100
|
|
43
|
+
e = encrypt(data, @key)
|
|
44
|
+
assert e =~ /\n/
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
should "roundtrip large data" do
|
|
48
|
+
pend('This is not yet working on JRuby.') if defined?(JRUBY_VERSION)
|
|
49
|
+
|
|
50
|
+
data = "foo" * 100
|
|
51
|
+
e = encrypt(data, @key)
|
|
52
|
+
d = decrypt(e, @key)
|
|
53
|
+
assert data == d
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
end
|
|
59
|
+
|
data/test/environment_test.rb
CHANGED
|
@@ -139,6 +139,20 @@ class EnvironmentTest < Test::Unit::TestCase
|
|
|
139
139
|
assert_equal "secret_val", e['secret_key'], 'env should have gotten setting from secret file'
|
|
140
140
|
end
|
|
141
141
|
|
|
142
|
+
def test_obfuscated_secret_env
|
|
143
|
+
pend('This is not yet working on JRuby.') if defined?(JRUBY_VERSION)
|
|
144
|
+
|
|
145
|
+
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/basic", 'test')
|
|
146
|
+
e = env.bind()
|
|
147
|
+
assert_nil e['rubber_secret'], 'env should not have secret set'
|
|
148
|
+
|
|
149
|
+
fixture_dir = File.expand_path("#{File.dirname(__FILE__)}/fixtures/obfuscated")
|
|
150
|
+
env = Rubber::Configuration::Environment.new(fixture_dir, 'test')
|
|
151
|
+
e = env.bind()
|
|
152
|
+
assert_equal "#{fixture_dir}/secret.yml", e['rubber_secret'], 'env should have secret set'
|
|
153
|
+
assert_equal "secret_val", e['secret_key'], 'env should have gotten setting from secret file'
|
|
154
|
+
end
|
|
155
|
+
|
|
142
156
|
def test_nested_ref
|
|
143
157
|
env = Rubber::Configuration::Environment.new("#{File.dirname(__FILE__)}/fixtures/nested", 'test')
|
|
144
158
|
e = env.bind()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
U8VwQr9NY9ftpSCKBxjQnERDxrfB/BKiQo+v+L6Fz7E=
|
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.
|
|
4
|
+
version: 2.2.0
|
|
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:
|
|
13
|
+
date: 2013-02-08 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: capistrano
|
|
@@ -35,7 +35,7 @@ dependencies:
|
|
|
35
35
|
requirements:
|
|
36
36
|
- - ~>
|
|
37
37
|
- !ruby/object:Gem::Version
|
|
38
|
-
version: 2.
|
|
38
|
+
version: '2.6'
|
|
39
39
|
type: :runtime
|
|
40
40
|
prerelease: false
|
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -43,7 +43,7 @@ dependencies:
|
|
|
43
43
|
requirements:
|
|
44
44
|
- - ~>
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: 2.
|
|
46
|
+
version: '2.6'
|
|
47
47
|
- !ruby/object:Gem::Dependency
|
|
48
48
|
name: thor
|
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -250,6 +250,7 @@ files:
|
|
|
250
250
|
- lib/rubber/dns/dyndns.rb
|
|
251
251
|
- lib/rubber/dns/nettica.rb
|
|
252
252
|
- lib/rubber/dns/zerigo.rb
|
|
253
|
+
- lib/rubber/encryption.rb
|
|
253
254
|
- lib/rubber/environment.rb
|
|
254
255
|
- lib/rubber/generator.rb
|
|
255
256
|
- lib/rubber/instance.rb
|
|
@@ -286,14 +287,16 @@ files:
|
|
|
286
287
|
- templates/base/Capfile
|
|
287
288
|
- templates/base/config/deploy.rb
|
|
288
289
|
- templates/base/config/rubber/common/crontab
|
|
290
|
+
- templates/base/config/rubber/common/gemrc
|
|
289
291
|
- templates/base/config/rubber/common/ntp-sysctl.conf
|
|
290
292
|
- templates/base/config/rubber/common/ntp.conf
|
|
291
293
|
- templates/base/config/rubber/common/rsyslog.conf
|
|
292
294
|
- templates/base/config/rubber/common/rubber.profile
|
|
295
|
+
- templates/base/config/rubber/common/ruby.profile
|
|
293
296
|
- templates/base/config/rubber/deploy-setup.rb
|
|
294
297
|
- templates/base/config/rubber/deploy-util.rb
|
|
295
298
|
- templates/base/config/rubber/rubber-dns.yml
|
|
296
|
-
- templates/base/config/rubber/rubber-
|
|
299
|
+
- templates/base/config/rubber/rubber-ruby.yml
|
|
297
300
|
- templates/base/config/rubber/rubber.yml
|
|
298
301
|
- templates/base/script/rubber
|
|
299
302
|
- templates/base/templates.rb
|
|
@@ -335,19 +338,15 @@ files:
|
|
|
335
338
|
- templates/complete_mongrel_mysql/templates.yml
|
|
336
339
|
- templates/complete_passenger/config/rubber/role/haproxy/haproxy-passenger.conf
|
|
337
340
|
- templates/complete_passenger/config/rubber/rubber-complete.yml
|
|
338
|
-
- templates/complete_passenger/templates.rb
|
|
339
341
|
- templates/complete_passenger/templates.yml
|
|
340
342
|
- templates/complete_passenger_mysql/templates.yml
|
|
341
343
|
- templates/complete_passenger_nginx/config/rubber/role/haproxy/haproxy-passenger.conf
|
|
342
344
|
- templates/complete_passenger_nginx/config/rubber/rubber-complete.yml
|
|
343
|
-
- templates/complete_passenger_nginx/templates.rb
|
|
344
345
|
- templates/complete_passenger_nginx/templates.yml
|
|
345
346
|
- templates/complete_passenger_nginx_mysql/templates.yml
|
|
346
347
|
- templates/complete_passenger_nginx_postgresql/templates.yml
|
|
347
348
|
- templates/complete_passenger_postgresql/templates.yml
|
|
348
|
-
- templates/complete_unicorn_nginx/config/rubber/role/haproxy/haproxy-unicorn.conf
|
|
349
349
|
- templates/complete_unicorn_nginx/config/rubber/rubber-complete.yml
|
|
350
|
-
- templates/complete_unicorn_nginx/templates.rb
|
|
351
350
|
- templates/complete_unicorn_nginx/templates.yml
|
|
352
351
|
- templates/complete_unicorn_nginx_mysql/templates.yml
|
|
353
352
|
- templates/complete_unicorn_nginx_postgresql/templates.yml
|
|
@@ -373,14 +372,18 @@ files:
|
|
|
373
372
|
- templates/graphite/config/rubber/deploy-graphite.rb
|
|
374
373
|
- templates/graphite/config/rubber/role/collectd/graphite-collectd.conf
|
|
375
374
|
- templates/graphite/config/rubber/role/graphite_server/carbon.conf
|
|
375
|
+
- templates/graphite/config/rubber/role/graphite_server/graphite-collectd-ping.conf
|
|
376
376
|
- templates/graphite/config/rubber/role/graphite_server/graphite_server-upstart.conf
|
|
377
|
+
- templates/graphite/config/rubber/role/graphite_server/monit-graphite_server.conf
|
|
377
378
|
- templates/graphite/config/rubber/role/graphite_server/storage-schemas.conf
|
|
378
379
|
- templates/graphite/config/rubber/role/graphite_web/crontab
|
|
379
380
|
- templates/graphite/config/rubber/role/graphite_web/dashboard.conf
|
|
380
381
|
- templates/graphite/config/rubber/role/graphite_web/dashboard.html
|
|
381
|
-
- templates/graphite/config/rubber/role/graphite_web/graphite-vhost.conf
|
|
382
382
|
- templates/graphite/config/rubber/role/graphite_web/graphite.wsgi
|
|
383
|
+
- templates/graphite/config/rubber/role/graphite_web/graphite_web-upstart.conf
|
|
383
384
|
- templates/graphite/config/rubber/role/graphite_web/local_settings.py
|
|
385
|
+
- templates/graphite/config/rubber/role/graphite_web/monit-graphite_web.conf
|
|
386
|
+
- templates/graphite/config/rubber/role/graphite_web/uwsgi.ini
|
|
384
387
|
- templates/graphite/config/rubber/rubber-graphite.yml
|
|
385
388
|
- templates/graphite/templates.yml
|
|
386
389
|
- templates/graylog/config/initializers/graylog.rb
|
|
@@ -577,6 +580,15 @@ files:
|
|
|
577
580
|
- templates/resque_scheduler/lib/tasks/resque-scheduler.rake
|
|
578
581
|
- templates/resque_scheduler/templates.rb
|
|
579
582
|
- templates/resque_scheduler/templates.yml
|
|
583
|
+
- templates/sidekiq/config/rubber/deploy-sidekiq.rb
|
|
584
|
+
- templates/sidekiq/config/rubber/role/sidekiq/monit-sidekiq.conf
|
|
585
|
+
- templates/sidekiq/config/rubber/rubber-sidekiq.yml
|
|
586
|
+
- templates/sidekiq/templates.rb
|
|
587
|
+
- templates/sidekiq/templates.yml
|
|
588
|
+
- templates/solr/config/rubber/common/solr_sunspot.yml
|
|
589
|
+
- templates/solr/config/rubber/deploy-solr.rb
|
|
590
|
+
- templates/solr/config/rubber/rubber-solr.yml
|
|
591
|
+
- templates/solr/templates.yml
|
|
580
592
|
- templates/sphinx/config/rubber/common/sphinx.yml
|
|
581
593
|
- templates/sphinx/config/rubber/deploy-sphinx.rb
|
|
582
594
|
- templates/sphinx/config/rubber/role/sphinx/crontab
|
|
@@ -588,6 +600,7 @@ files:
|
|
|
588
600
|
- templates/torquebox/config/rubber/role/app/mod_proxy_cluster.load
|
|
589
601
|
- templates/torquebox/config/rubber/role/app/mod_slotmem.load
|
|
590
602
|
- templates/torquebox/config/rubber/role/app/torquebox-apache-vhost.conf
|
|
603
|
+
- templates/torquebox/config/rubber/role/torquebox/graylog-logging-module.xml
|
|
591
604
|
- templates/torquebox/config/rubber/role/torquebox/monit-torquebox.conf
|
|
592
605
|
- templates/torquebox/config/rubber/role/torquebox/standalone-ha.xml
|
|
593
606
|
- templates/torquebox/config/rubber/role/torquebox/standalone.conf
|
|
@@ -620,8 +633,10 @@ files:
|
|
|
620
633
|
- test/cloud/fog_test.rb
|
|
621
634
|
- test/command_test.rb
|
|
622
635
|
- test/commands/cron_test.rb
|
|
636
|
+
- test/commands/util_test.rb
|
|
623
637
|
- test/dns/aws_test.rb
|
|
624
638
|
- test/dns/zerigo_test.rb
|
|
639
|
+
- test/encryption_test.rb
|
|
625
640
|
- test/environment_test.rb
|
|
626
641
|
- test/fixtures/basic/common/bar.conf
|
|
627
642
|
- test/fixtures/basic/common/foo.conf
|
|
@@ -643,6 +658,8 @@ files:
|
|
|
643
658
|
- test/fixtures/instance_expansion/instance-test.yml
|
|
644
659
|
- test/fixtures/instance_expansion/rubber.yml
|
|
645
660
|
- test/fixtures/nested/rubber.yml
|
|
661
|
+
- test/fixtures/obfuscated/rubber.yml
|
|
662
|
+
- test/fixtures/obfuscated/secret.yml
|
|
646
663
|
- test/fixtures/secret/rubber.yml
|
|
647
664
|
- test/fixtures/secret/secret.yml
|
|
648
665
|
- test/generator_test.rb
|
|
@@ -664,7 +681,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
664
681
|
version: '0'
|
|
665
682
|
segments:
|
|
666
683
|
- 0
|
|
667
|
-
hash: -
|
|
684
|
+
hash: -1895405216543771761
|
|
668
685
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
669
686
|
none: false
|
|
670
687
|
requirements:
|
|
@@ -673,7 +690,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
673
690
|
version: '0'
|
|
674
691
|
segments:
|
|
675
692
|
- 0
|
|
676
|
-
hash: -
|
|
693
|
+
hash: -1895405216543771761
|
|
677
694
|
requirements: []
|
|
678
695
|
rubyforge_project: rubber
|
|
679
696
|
rubygems_version: 1.8.24
|
|
@@ -688,8 +705,10 @@ test_files:
|
|
|
688
705
|
- test/cloud/fog_test.rb
|
|
689
706
|
- test/command_test.rb
|
|
690
707
|
- test/commands/cron_test.rb
|
|
708
|
+
- test/commands/util_test.rb
|
|
691
709
|
- test/dns/aws_test.rb
|
|
692
710
|
- test/dns/zerigo_test.rb
|
|
711
|
+
- test/encryption_test.rb
|
|
693
712
|
- test/environment_test.rb
|
|
694
713
|
- test/fixtures/basic/common/bar.conf
|
|
695
714
|
- test/fixtures/basic/common/foo.conf
|
|
@@ -711,6 +730,8 @@ test_files:
|
|
|
711
730
|
- test/fixtures/instance_expansion/instance-test.yml
|
|
712
731
|
- test/fixtures/instance_expansion/rubber.yml
|
|
713
732
|
- test/fixtures/nested/rubber.yml
|
|
733
|
+
- test/fixtures/obfuscated/rubber.yml
|
|
734
|
+
- test/fixtures/obfuscated/secret.yml
|
|
714
735
|
- test/fixtures/secret/rubber.yml
|
|
715
736
|
- test/fixtures/secret/secret.yml
|
|
716
737
|
- test/generator_test.rb
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# rvm needs some extra packages to compile/install ruby runtimes
|
|
2
|
-
# curl is required.
|
|
3
|
-
# patch is required (for ree, some ruby head's).
|
|
4
|
-
# For JRuby (if you wish to use it) you will need:
|
|
5
|
-
# aptitude install curl sun-java6-bin sun-java6-jre sun-java6-jdk
|
|
6
|
-
# For MRI & ree (if you wish to use it) you will need:
|
|
7
|
-
# aptitude install curl bison build-essential zlib1g-dev libssl-dev libreadline5-dev libxml2-dev git-core
|
|
8
|
-
# For IronRuby (if you wish to use it) you will need:
|
|
9
|
-
# aptitude install curl mono-2.0-devel
|
|
10
|
-
|
|
11
|
-
packages: [build-essential, git-core, subversion, curl, autoconf, bison, ruby, zlib1g-dev, libssl-dev, libreadline6-dev, libxml2-dev, libyaml-dev]
|
|
12
|
-
|
|
13
|
-
# REQUIRED: the version of rvm itself
|
|
14
|
-
rvm_version: 1.13.0
|
|
15
|
-
|
|
16
|
-
# REQUIRED: Set to the rvm version string for the ruby version you wish to use
|
|
17
|
-
# Run "rvm list known" to see the list of possible options
|
|
18
|
-
rvm_ruby: 1.9.3-p194
|
|
19
|
-
|
|
20
|
-
# OPTIONAL: Extra args to pass to rvm when installing ruby
|
|
21
|
-
# rvm_install_options: "--patch falcon,debug --force-autoconf -j 3"
|
|
22
|
-
|
|
23
|
-
# REQUIRED: Set to version of RubyGems you want RVM to install. Note that older RVMs do not
|
|
24
|
-
# know about newer RubyGems. So you may need to bump your rvm_version to get the latest RubyGems release.
|
|
25
|
-
rubygems_version: 1.8.23
|
|
26
|
-
|
|
27
|
-
# REQUIRED: Set to version of rake you want RVM to install.
|
|
28
|
-
rake_version: 0.9.2.2
|
|
29
|
-
|
|
30
|
-
# When rvm is installed as root, and you set the default, it symlinks ruby executables
|
|
31
|
-
# into /usr/local/rvm
|
|
32
|
-
ruby_prefix: /usr/local/rvm
|
|
33
|
-
|
|
34
|
-
rvm_prefix: /usr/local/rvm
|
|
35
|
-
|
|
36
|
-
# lets us setup global environment to use rvm (also needed when running sudo)
|
|
37
|
-
rvm_prepare: "source #{rvm_prefix}/scripts/rvm"
|
|
38
|
-
|
|
39
|
-
# dirty hack to get the rvm gem home rather than bundler gem home
|
|
40
|
-
# When we run rubber:config it loads rails/bundler, which forces the bundler gem home, yet deployment only gems
|
|
41
|
-
# like passenger need to be installed in rvm gem home rather than bundler
|
|
42
|
-
rvm_gem_home: "#{$rubber_rvm_gem_home ||= `unset GEM_HOME; bash -l -c 'rvm gemdir'`.strip}"
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
|
9
|
-
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
@path = "/etc/haproxy/haproxy.cfg"
|
|
3
|
-
@additive = ["# start haproxy unicorn", "# end haproxy unicorn"]
|
|
4
|
-
%>
|
|
5
|
-
|
|
6
|
-
<%
|
|
7
|
-
backend_hosts = rubber_instances.for_role('app').collect { |i| i.name }
|
|
8
|
-
%>
|
|
9
|
-
|
|
10
|
-
listen unicorn_proxy 0.0.0.0:<%= rubber_env.web_port %>
|
|
11
|
-
option forwardfor
|
|
12
|
-
<% backend_hosts.each do |server| %>
|
|
13
|
-
server <%= server %> <%= server %>:<%= rubber_env.unicorn_listen_port %> maxconn <%= rubber_env.max_app_connections %> check
|
|
14
|
-
<% end %>
|
|
15
|
-
|
|
16
|
-
listen unicorn_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.unicorn_listen_ssl_port %> maxconn <%= rubber_env.max_app_connections %> check
|
|
21
|
-
<% end %>
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
@path = '/etc/apache2/sites-available/graphite'
|
|
3
|
-
@post = <<-SCRIPT
|
|
4
|
-
a2ensite graphite
|
|
5
|
-
SCRIPT
|
|
6
|
-
%>
|
|
7
|
-
|
|
8
|
-
# This needs to be in your server's config somewhere, probably
|
|
9
|
-
# the main httpd.conf
|
|
10
|
-
# NameVirtualHost *:80
|
|
11
|
-
|
|
12
|
-
# This line also needs to be in your server's config.
|
|
13
|
-
# LoadModule wsgi_module modules/mod_wsgi.so
|
|
14
|
-
|
|
15
|
-
# You may need to manually edit this file to fit your needs.
|
|
16
|
-
# This configuration assumes the default installation prefix
|
|
17
|
-
# of /opt/graphite/, if you installed graphite somewhere else
|
|
18
|
-
# you will need to change all the occurances of /opt/graphite/
|
|
19
|
-
# in this file to your chosen install location.
|
|
20
|
-
|
|
21
|
-
Listen <%= rubber_env.graphite_web_port %>
|
|
22
|
-
<VirtualHost *:<%= rubber_env.graphite_web_port %>>
|
|
23
|
-
ServerName <%= rubber_env.full_host %>
|
|
24
|
-
DocumentRoot "/opt/graphite/webapp"
|
|
25
|
-
ErrorLog /opt/graphite/storage/log/webapp/error.log
|
|
26
|
-
CustomLog /opt/graphite/storage/log/webapp/access.log common
|
|
27
|
-
|
|
28
|
-
# I've found that an equal number of processes & threads tends
|
|
29
|
-
# to show the best performance for Graphite (ymmv).
|
|
30
|
-
WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120
|
|
31
|
-
WSGIProcessGroup graphite
|
|
32
|
-
|
|
33
|
-
# XXX You need to set this up!
|
|
34
|
-
# Read http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGISocketPrefix
|
|
35
|
-
# WSGISocketPrefix /var/run/apache2/
|
|
36
|
-
|
|
37
|
-
# XXX You will need to create this file! There is a graphite.wsgi.example
|
|
38
|
-
# file in this directory that you can safely use, just copy it to graphite.wgsi
|
|
39
|
-
WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi
|
|
40
|
-
|
|
41
|
-
Alias /content/ /opt/graphite/webapp/content/
|
|
42
|
-
<Location "/content/">
|
|
43
|
-
SetHandler None
|
|
44
|
-
</Location>
|
|
45
|
-
|
|
46
|
-
# XXX In order for the django admin site media to work you
|
|
47
|
-
# must change @DJANGO_ROOT@ to be the path to your django
|
|
48
|
-
# installation, which is probably something like:
|
|
49
|
-
# /usr/lib/python2.6/site-packages/django
|
|
50
|
-
Alias /media/ "/usr/lib/pymodules/python2.6/django/contrib/admin/media/"
|
|
51
|
-
<Location "/media/">
|
|
52
|
-
SetHandler None
|
|
53
|
-
</Location>
|
|
54
|
-
|
|
55
|
-
# The graphite.wsgi file has to be accessible by apache. It won't
|
|
56
|
-
# be visible to clients because of the DocumentRoot though.
|
|
57
|
-
<Directory /opt/graphite/conf/>
|
|
58
|
-
Order deny,allow
|
|
59
|
-
Allow from all
|
|
60
|
-
</Directory>
|
|
61
|
-
|
|
62
|
-
</VirtualHost>
|