axtro-rubber 1.0.2.8 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +124 -0
- data/VERSION +1 -1
- data/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-apache-vhost.conf +4 -0
- data/generators/vulcanize/templates/apache/config/rubber/role/web_tools/tools-index.html +6 -2
- data/generators/vulcanize/templates/apache/config/rubber/rubber-apache.yml +0 -1
- data/generators/vulcanize/templates/base/config/rubber/common/crontab +2 -1
- data/generators/vulcanize/templates/base/config/rubber/common/monit-postfix.conf +8 -0
- data/generators/vulcanize/templates/base/config/rubber/common/rubber.profile +14 -0
- data/generators/vulcanize/templates/base/config/rubber/deploy-setup.rb +21 -41
- data/generators/vulcanize/templates/base/config/rubber/rubber-dns.yml +79 -0
- data/generators/vulcanize/templates/base/config/rubber/rubber.yml +29 -30
- data/generators/vulcanize/templates/complete_passenger_mysql/config/rubber/role/haproxy/haproxy-passenger.conf +2 -0
- data/generators/vulcanize/templates/jetty/config/rubber/deploy-jetty.rb +59 -0
- data/generators/vulcanize/templates/jetty/config/rubber/role/jetty/jetty.sh +589 -0
- data/generators/vulcanize/templates/jetty/config/rubber/role/jetty/jetty.xml +199 -0
- data/generators/vulcanize/templates/jetty/config/rubber/role/jetty/monit-jetty.conf +9 -0
- data/generators/vulcanize/templates/jetty/config/rubber/rubber-jetty.yml +10 -0
- data/generators/vulcanize/templates/jetty/templates.yml +1 -0
- data/generators/vulcanize/templates/mongrel/config/rubber/role/mongrel/monit-mongrel.conf +2 -2
- data/generators/vulcanize/templates/munin/config/rubber/common/munin-plugins.conf +9 -0
- data/generators/vulcanize/templates/munin/config/rubber/rubber-munin.yml +1 -1
- data/generators/vulcanize/templates/munin/script/munin/example_mysql_query.rb +3 -3
- data/generators/vulcanize/templates/mysql/config/rubber/rubber-mysql.yml +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 +34 -0
- data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger-sudoers.conf +2 -1
- data/generators/vulcanize/templates/passenger/config/rubber/role/passenger/munin-passenger.conf +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 +5 -2
- data/generators/vulcanize/templates/passenger/templates.yml +3 -1
- 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/generators/vulcanize/templates/resque/config/rubber/deploy-resque-worker-default.rb +38 -0
- data/generators/vulcanize/templates/resque/config/rubber/deploy-resque.rb +39 -0
- data/generators/vulcanize/templates/resque/config/rubber/role/resque_worker_default/monit-resque_worker_default.conf +19 -0
- data/generators/vulcanize/templates/resque/config/rubber/rubber-resque.yml +10 -0
- data/generators/vulcanize/templates/resque/templates.yml +3 -0
- data/generators/vulcanize/templates/sphinx/config/rubber/role/sphinx/crontab +2 -2
- data/generators/vulcanize/templates/sphinx/config/rubber/role/sphinx/monit-sphinx.conf +2 -2
- data/lib/rubber/cloud/aws.rb +32 -2
- data/lib/rubber/dns/base.rb +41 -26
- data/lib/rubber/dns/dyndns.rb +25 -10
- data/lib/rubber/dns/nettica.rb +75 -31
- data/lib/rubber/dns/zerigo.rb +96 -53
- data/lib/rubber/environment.rb +11 -3
- data/lib/rubber/instance.rb +11 -0
- data/lib/rubber/recipes/rubber/instances.rb +59 -6
- data/lib/rubber/recipes/rubber/security_groups.rb +1 -1
- data/lib/rubber/recipes/rubber/setup.rb +155 -52
- data/lib/rubber/recipes/rubber/spot_requests.rb +23 -0
- data/lib/rubber/recipes/rubber/static_ips.rb +83 -0
- data/lib/rubber/recipes/rubber/utils.rb +2 -2
- data/lib/rubber/recipes/rubber.rb +10 -3
- data/lib/rubber/tasks/rubber.rb +64 -6
- data/lib/rubber.rb +1 -1
- data/rails/init.rb +9 -0
- data/test/environment_test.rb +18 -0
- data/test/generator_test.rb +3 -0
- data/test/instance_test.rb +3 -0
- data/test/test_helper.rb +4 -0
- data/test/util_test.rb +3 -0
- metadata +28 -4
- data/generators/vulcanize/templates/base/config/rubber/common/profile.rc +0 -9
data/CHANGELOG
CHANGED
@@ -1,3 +1,127 @@
|
|
1
|
+
1.2.0
|
2
|
+
-----
|
3
|
+
|
4
|
+
Added Windows support. <e3c883e> [Kevin Menard]
|
5
|
+
The libmysql-ruby package seems to not work with the latest Ruby enterprise edition, so re-install the gem to be safe. <931b19d> [Kevin Menard]
|
6
|
+
Bumped to the latest ruby enterprise edition. <0ab3557> [Kevin Menard]
|
7
|
+
Added example spot instance request configuration. <239b2f4> [Kevin Menard]
|
8
|
+
Updated to the latest version of redis. <9723864> [Kevin Menard]
|
9
|
+
Updated to the latest version of passenger. <5f152fc> [Kevin Menard]
|
10
|
+
Fixed rake failing due to Test::Unit 2.0 being installed. <a579dc2> [Kevin Menard]
|
11
|
+
Jeweler is available on gemcutter. <b5539b5> [Kevin Menard]
|
12
|
+
Merge branch 'master' of github.com:wr0ngway/rubber <5efd21d> [Kevin Menard]
|
13
|
+
Added support for spot instances. <a995d14> [Kevin Menard]
|
14
|
+
Task to move around static IP addresses. <9612eb9> [Matt Conway]
|
15
|
+
Merge branch 'master' of github.com:wr0ngway/rubber <3d66204> [Kevin Menard]
|
16
|
+
Make it easier to override jetty options. <96d566e> [Kevin Menard]
|
17
|
+
|
18
|
+
1.1.7
|
19
|
+
-----
|
20
|
+
|
21
|
+
Merge branch 'master' of github.com:wr0ngway/rubber <cb39353> [Matt Conway]
|
22
|
+
fix for new security group param name in amazon-ec2 <a9f9b19> [Matt Conway]
|
23
|
+
Only raise an exception if there's a problem. <890837b> [nirvdrum]
|
24
|
+
Merge remote branch 'nirvdrum/resque2' <09fd5b8> [Matt Conway]
|
25
|
+
Merge remote branch 'nirvdrum/master' <0c99d7d> [Matt Conway]
|
26
|
+
use rubygems for crontab too <08d1d51> [Matt Conway]
|
27
|
+
munin needs a mailer for notifications <d933a8c> [Matt Conway]
|
28
|
+
Switched to the Jetty Hightide distribution to get JSP, JTA, and a few other niceties. <6d1b1a9> [Kevin Menard]
|
29
|
+
Bumped passenger version. <79feda0> [Kevin Menard]
|
30
|
+
Allow a configurable number of resque workers. <0587b40> [Kevin Menard]
|
31
|
+
Added support for resque. <67ae003> [Kevin Menard]
|
32
|
+
|
33
|
+
1.1.6
|
34
|
+
-----
|
35
|
+
|
36
|
+
stop using helper method to install ree as it uses different path for 64bit pkg <fbdeab3> [Matt Conway]
|
37
|
+
remind about bootstrap <fd2e593> [Matt Conway]
|
38
|
+
fix setting of rails vars <cd7206d> [Matt Conway]
|
39
|
+
Merge remote branch 'nirvdrum/master' into pull <b902618> [Matt Conway]
|
40
|
+
add passenger memory stats munin plugin <de6bb9a> [Matt Conway]
|
41
|
+
setup path so that we select correct ruby globally <8365a70> [Matt Conway]
|
42
|
+
sort display order of tools <4a7a9a0> [Matt Conway]
|
43
|
+
fix arithmetic for server slicing in serial_task <4bbd9e7> [Matt Conway]
|
44
|
+
Upgraded to the latest version of redis. <a62955f> [Kevin Menard]
|
45
|
+
Merge branch 'wr0ngway/master' <09046af> [Kevin Menard]
|
46
|
+
escape percents in crontab <a299c3b> [Matt Conway]
|
47
|
+
fix ruby prefix path for passenger munin plugin <af9488d> [Matt Conway]
|
48
|
+
fix config reference in munin example <50e563d> [Matt Conway]
|
49
|
+
enable rubygems at system level for munin plugins <df32e3e> [Matt Conway]
|
50
|
+
env should use rubygems by default <c2467cc> [Matt Conway]
|
51
|
+
make default bucket name be dns friendly <b58fbbe> [Matt Conway]
|
52
|
+
fix sphinx crontab to sudo using configured user <3fe8b6f> [Matt Conway]
|
53
|
+
fix being able to reference cluster config (instance.yml) from within rubber.yml <08fecec> [Matt Conway]
|
54
|
+
Fixed monit conf file. <d84d287> [Kevin Menard]
|
55
|
+
git-core is fine on modern Ubuntu AMIs. <16eda00> [Kevin Menard]
|
56
|
+
Added a jetty generator. <5c18774> [Kevin Menard]
|
57
|
+
|
58
|
+
1.1.5
|
59
|
+
-----
|
60
|
+
|
61
|
+
strip out blank security_groups to make it easier to conditionally define them in rubber.yml <f75f1a3> [Matt Conway]
|
62
|
+
add some feedback for add/remove role <bafe1bb> [Matt Conway]
|
63
|
+
prevent backup from sometimes trying to upload a directory to s3 <f8c7951> [Matt Conway]
|
64
|
+
make passenger template depend on apache <b970183> [Matt Conway]
|
65
|
+
|
66
|
+
1.1.4
|
67
|
+
-----
|
68
|
+
|
69
|
+
role should be passenger, role dependencies handle the association from app -> passenger <fc9472f> [Matt Conway]
|
70
|
+
new version of REE <e347a82> [Matt Conway]
|
71
|
+
|
72
|
+
1.1.3
|
73
|
+
-----
|
74
|
+
|
75
|
+
use correct path for passenger when using enterprise ruby or not <20a8542> [Matt Conway]
|
76
|
+
add ability to grab default roles from rubber.yml at instance creation time <8817d78> [Matt Conway]
|
77
|
+
add gemcutter, simplify changelog <44d989b> [Matt Conway]
|
78
|
+
update to latest 9.04 ami <5043937> [Matt Conway]
|
79
|
+
initial redis module <bb3a6b2> [Matt Conway]
|
80
|
+
monitor postfix <6303745> [Matt Conway]
|
81
|
+
switch to gemcutter <aead58a> [Matt Conway]
|
82
|
+
add changelog generation <06475d9> [Matt Conway]
|
83
|
+
|
84
|
+
1.1.2
|
85
|
+
-----
|
86
|
+
|
87
|
+
fix ver <e32a665> [Matt Conway]
|
88
|
+
fix ver <f5c5172> [Matt Conway]
|
89
|
+
remove bad code <16306dc> [Matt Conway]
|
90
|
+
|
91
|
+
1.1.1
|
92
|
+
-----
|
93
|
+
|
94
|
+
prevent reading from env before it is created (infinite loop) <b3255cb> [Matt Conway]
|
95
|
+
fix gemcutter task <7372e7b> [Matt Conway]
|
96
|
+
ignore gems <a879638> [Matt Conway]
|
97
|
+
|
98
|
+
1.1.0
|
99
|
+
-----
|
100
|
+
|
101
|
+
add setup of arbitrary dns records via nettica or zerigo apis <61ca87e> [Matt Conway]
|
102
|
+
command for backing up arbitrary directories <d984451> [Matt Conway]
|
103
|
+
helper for installing rubber gems locally <51e926b> [Matt Conway]
|
104
|
+
add lib for rails initiliazer, fix bad char in description for gemcutter, add task for pushing to gemcutter <0ab8d80> [Matt Conway]
|
105
|
+
refactor dns classes to allow setting up other dns records from rubber.yml <937629c> [Matt Conway]
|
106
|
+
add rails/init.rb to gemspec, automate gemcutter gem creation <c9c3e52> [Matt Conway]
|
107
|
+
update REE to 1.8.7-20090928 <59888ec> [Matt Conway]
|
108
|
+
add gemcutter source <ae8aabb> [Matt Conway]
|
109
|
+
add forwarded ip address <735c9c7> [Matt Conway]
|
110
|
+
Merge branch 'master' of git@github.com:wr0ngway/rubber <4b1159b> [Matt Conway]
|
111
|
+
fix apache roles <83f602c> [Matt Conway]
|
112
|
+
better error message for missing image on destroy <53e8cf2> [Matt Conway]
|
113
|
+
don't check status when getting single host <d01a79c> [Matt Conway]
|
114
|
+
fix bad encoding char for gemcutter <c5290c2> [Matt Conway]
|
115
|
+
|
116
|
+
1.0.2
|
117
|
+
-----
|
118
|
+
|
119
|
+
add some error checking <ad2c6a3> [Matt Conway]
|
120
|
+
add error msg for auth failure <7ca7bec> [Matt Conway]
|
121
|
+
fix setting of ip in zerigo <8ca947a> [Matt Conway]
|
122
|
+
more todos <a13e97a> [Matt Conway]
|
123
|
+
version bump <6c80a34> [Matt Conway]
|
124
|
+
|
1
125
|
1.0.1
|
2
126
|
-----
|
3
127
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0
|
1
|
+
1.2.0
|
@@ -17,13 +17,17 @@
|
|
17
17
|
<li><a href="http://<%= cruise_host %>/cruise/">CruiseControl</a></li>
|
18
18
|
<% end %>
|
19
19
|
|
20
|
-
<% rubber_instances.for_role('haproxy').each do |ic| %>
|
20
|
+
<% rubber_instances.for_role('haproxy').sort {|a,b| a.name <=> b.name }.each do |ic| %>
|
21
21
|
<li><a href="/haproxy_<%= ic.name %>/">HAProxy <%= ic.name %></a></li>
|
22
22
|
<% end %>
|
23
23
|
|
24
|
-
<% rubber_instances.each do |ic| %>
|
24
|
+
<% rubber_instances.sort {|a,b| a.name <=> b.name }.each do |ic| %>
|
25
25
|
<li><a href="/monit_<%= ic.name %>/">Monit <%= ic.name %></a></li>
|
26
26
|
<% end %>
|
27
|
+
|
28
|
+
<% if resque_host = rubber_instances.for_role('resque').first %>
|
29
|
+
<li><a href="/resque/">Resque</a></li>
|
30
|
+
<% end %>
|
27
31
|
|
28
32
|
</ul>
|
29
33
|
</body>
|
@@ -3,11 +3,12 @@
|
|
3
3
|
@write_cmd = 'crontab -'
|
4
4
|
%>
|
5
5
|
|
6
|
-
PATH=/usr/
|
6
|
+
PATH=/sbin:/usr/sbin:/usr/local/sbin:<%= rubber_env.ruby_prefix %>/bin:/usr/local/bin:/usr/bin:/bin
|
7
7
|
MAILTO=<%= rubber_env.admin_email %>
|
8
8
|
# don't need to set RUBBER_ENV for each script since we set it for all cron here
|
9
9
|
RUBBER_ENV=<%= RUBBER_ENV %>
|
10
10
|
RAILS_ENV=<%= RUBBER_ENV %>
|
11
|
+
RUBYOPT=rubygems
|
11
12
|
|
12
13
|
# Roll all rails logs at midnight
|
13
14
|
0 0 * * * LOG_DIR=<%= RUBBER_ROOT %>/log <%= RUBBER_ROOT %>/script/cron-rake rubber:rotate_logs
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<%
|
2
|
+
@path = "/etc/profile.d/rubber.sh"
|
3
|
+
%>
|
4
|
+
|
5
|
+
# convenience to simply running rails console, etc with correct env
|
6
|
+
export RUBBER_ENV=<%= RUBBER_ENV %>
|
7
|
+
export RAILS_ENV=<%= RUBBER_ENV %>
|
8
|
+
alias current="cd <%= RUBBER_ROOT %>"
|
9
|
+
|
10
|
+
# make sure we use the right ruby since REE installs into /usr/local
|
11
|
+
export PATH=<%= rubber_env.ruby_prefix %>/bin:$PATH
|
12
|
+
|
13
|
+
# Always use rubygems
|
14
|
+
export RUBYOPT="rubygems"
|
@@ -13,33 +13,26 @@ namespace :rubber do
|
|
13
13
|
rubber_instances.filtered.each do |ic|
|
14
14
|
env = rubber_cfg.environment.bind(ic.role_names, ic.name)
|
15
15
|
if env.use_enterprise_ruby
|
16
|
-
ent_ruby_hosts << ic.full_name
|
16
|
+
ent_ruby_hosts << ic.full_name unless ic.windows?
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
20
|
if ent_ruby_hosts.size > 0
|
21
|
-
|
22
21
|
task :_install_enterprise_ruby, :hosts => ent_ruby_hosts do
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
put(prefs, '/etc/apt/preferences')
|
37
|
-
|
38
|
-
rubber.sudo_script 'install_enterprise_ruby', <<-ENDSCRIPT
|
39
|
-
wget http://apt.brightbox.net/release.asc -O - | apt-key add -
|
40
|
-
echo "deb http://apt.brightbox.net/ hardy rubyee" > /etc/apt/sources.list.d/brightbox-rubyee.list
|
22
|
+
ver = "1.8.7-2010.01"
|
23
|
+
rubber.run_script "install_ruby-enterprise", <<-ENDSCRIPT
|
24
|
+
if [[ ! `ruby --version 2> /dev/null` =~ "Ruby Enterprise Edition 2010.01" ]]; then
|
25
|
+
arch=`uname -m`
|
26
|
+
if [ "$arch" = "x86_64" ]; then
|
27
|
+
src="http://rubyforge.org/frs/download.php/68720/ruby-enterprise_#{ver}_amd64.deb"
|
28
|
+
else
|
29
|
+
src="http://rubyforge.org/frs/download.php/68718/ruby-enterprise_#{ver}_i386.deb"
|
30
|
+
fi
|
31
|
+
src_file="${src##*/}"
|
32
|
+
wget -qP /tmp ${src}
|
33
|
+
dpkg -i /tmp/${src_file}
|
34
|
+
fi
|
41
35
|
ENDSCRIPT
|
42
|
-
|
43
36
|
end
|
44
37
|
|
45
38
|
_install_enterprise_ruby
|
@@ -64,26 +57,13 @@ namespace :rubber do
|
|
64
57
|
ENDSCRIPT
|
65
58
|
end
|
66
59
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
src="http://mirrors.kernel.org/ubuntu/pool/main/g/git-core/git-core_1.5.4.5-1~dapper1_amd64.deb"
|
75
|
-
else
|
76
|
-
src="http://mirrors.kernel.org/ubuntu/pool/main/g/git-core/git-core_1.5.4.5-1~dapper1_i386.deb"
|
77
|
-
fi
|
78
|
-
apt-get install liberror-perl libdigest-sha1-perl
|
79
|
-
wget -qO /tmp/git.deb ${src}
|
80
|
-
dpkg -i /tmp/git.deb
|
81
|
-
|
82
|
-
if [[ "#{repository}" =~ "@" ]]; then
|
83
|
-
# Get host key for src machine to prevent ssh from failing
|
84
|
-
rm -f ~/.ssh/known_hosts
|
85
|
-
! ssh -o 'StrictHostKeyChecking=no' #{repository.gsub(/:.*/, '')} &> /dev/null
|
86
|
-
fi
|
60
|
+
after "rubber:install_packages", "rubber:base:configure_git" if scm == "git"
|
61
|
+
task :configure_git do
|
62
|
+
rubber.run_script 'configure_git', <<-ENDSCRIPT
|
63
|
+
if [[ "#{repository}" =~ "@" ]]; then
|
64
|
+
# Get host key for src machine to prevent ssh from failing
|
65
|
+
rm -f ~/.ssh/known_hosts
|
66
|
+
! ssh -o 'StrictHostKeyChecking=no' #{repository.gsub(/:.*/, '')} &> /dev/null
|
87
67
|
fi
|
88
68
|
ENDSCRIPT
|
89
69
|
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# OPTIONAL: The dns provider to use. Need to exist in dns_providers below
|
2
|
+
# dns_provider: nettica
|
3
|
+
|
4
|
+
# OPTIONAL: The configuration for each dns provider (nettica|zerigo|dyndns)
|
5
|
+
# This lets rubber update a dynamic dns service with the instance alias and ip
|
6
|
+
#
|
7
|
+
dns_providers:
|
8
|
+
nettica:
|
9
|
+
user: joe
|
10
|
+
password: sekret
|
11
|
+
type: A
|
12
|
+
ttl: 300
|
13
|
+
zerigo:
|
14
|
+
customer_id: 1234
|
15
|
+
email: foo@bar.com
|
16
|
+
token: hexxy
|
17
|
+
type: A
|
18
|
+
ttl: 300
|
19
|
+
dyndns:
|
20
|
+
user: joe
|
21
|
+
password: sekret
|
22
|
+
update_url: https://members.dyndns.org/nic/update?hostname=%host%&myip=%ip%'
|
23
|
+
|
24
|
+
# OPTIONAL: Lets you configure your dns service, for example to add other CNAMES
|
25
|
+
# or setup dns round robin, etc. Run "cap rubber:setup_dns_records"
|
26
|
+
# to apply them as rubber only sets up instance aliases as part of
|
27
|
+
# the standard lifecycle
|
28
|
+
#
|
29
|
+
# dns_records:
|
30
|
+
# # simple A record
|
31
|
+
# - host: bar
|
32
|
+
# data: 1.1.1.1
|
33
|
+
#
|
34
|
+
# # more detailed A record
|
35
|
+
# - host: bar
|
36
|
+
# domain: otherdomain.com
|
37
|
+
# data: 1.1.1.1
|
38
|
+
# type: A
|
39
|
+
# ttl: 300
|
40
|
+
#
|
41
|
+
# # tld A record
|
42
|
+
# - host: ''
|
43
|
+
# data: 1.1.1.1
|
44
|
+
# type: A
|
45
|
+
#
|
46
|
+
# # simple CNAME record
|
47
|
+
# - host: otherbar
|
48
|
+
# domain: foo.com
|
49
|
+
# data: bar.foo.com
|
50
|
+
# type: CNAME
|
51
|
+
# ttl: 300
|
52
|
+
#
|
53
|
+
# # 2 of the same A records is a round robin dns
|
54
|
+
# - host: rr
|
55
|
+
# domain: foo.com
|
56
|
+
# data: 1.1.1.1
|
57
|
+
# type: A
|
58
|
+
# ttl: 300
|
59
|
+
# - host: rr
|
60
|
+
# domain: foo.com
|
61
|
+
# data: 1.1.1.2
|
62
|
+
# type: A
|
63
|
+
# ttl: 300
|
64
|
+
#
|
65
|
+
# # A record, grabbing ip from instance config
|
66
|
+
# - host: baz
|
67
|
+
# domain: foo.com
|
68
|
+
# data: "#{rubber_instances.for_role('web').first.external_ip}"
|
69
|
+
# type: A
|
70
|
+
# ttl: 300
|
71
|
+
#
|
72
|
+
# # MX record
|
73
|
+
# - host: ''
|
74
|
+
# domain: foo.com
|
75
|
+
# data: mail.foo.com
|
76
|
+
# type: MX
|
77
|
+
# ttl: 300
|
78
|
+
# priority: 10
|
79
|
+
|
@@ -32,28 +32,10 @@ timezone: US/Eastern
|
|
32
32
|
#
|
33
33
|
domain: foo.com
|
34
34
|
|
35
|
-
# OPTIONAL:
|
36
|
-
#
|
37
|
-
#
|
38
|
-
|
39
|
-
nettica:
|
40
|
-
user: joe
|
41
|
-
password: sekret
|
42
|
-
record_type: A
|
43
|
-
ttl: 300
|
44
|
-
zerigo:
|
45
|
-
customer_id: 1234
|
46
|
-
email: foo@bar.com
|
47
|
-
token: hexxy
|
48
|
-
record_type: A
|
49
|
-
ttl: 300
|
50
|
-
dyndns:
|
51
|
-
user: joe
|
52
|
-
password: sekret
|
53
|
-
update_url: https://members.dyndns.org/nic/update?hostname=%host%&myip=%ip%'
|
54
|
-
|
55
|
-
# OPTIONAL: The dns provider to use
|
56
|
-
# dns_provider: nettica
|
35
|
+
# OPTIONAL: See rubber-dns.yml for dns configuration
|
36
|
+
# This lets rubber update a dynamic dns service with the instance alias
|
37
|
+
# and ip when they are created. It also allows setting up arbitrary
|
38
|
+
# dns records (CNAME, MX, Round Robin DNS, etc)
|
57
39
|
|
58
40
|
# OPTIONAL: Additional rubber file to pull config from if it exists. This file will
|
59
41
|
# also be pushed to remote host at RUBBER_ROOT/config/rubber/rubber-secret.yml
|
@@ -86,20 +68,33 @@ cloud_providers:
|
|
86
68
|
#
|
87
69
|
# pk_file: "#{Dir[(File.expand_path('~') rescue '/root') + '/.ec2/pk-*'].first}"
|
88
70
|
# cert_file: "#{Dir[(File.expand_path('~') rescue '/root') + '/.ec2/cert-*'].first}"
|
89
|
-
# image_bucket: "#{app_name}
|
71
|
+
# image_bucket: "#{app_name}-images"
|
90
72
|
|
91
73
|
# OPTIONAL: Needed for backing up database to s3
|
92
|
-
# backup_bucket: "#{app_name}
|
74
|
+
# backup_bucket: "#{app_name}-backups"
|
93
75
|
|
94
76
|
# REQUIRED: the ami and instance type for creating instances
|
95
77
|
# The Ubuntu images at http://alestic.com/ work well
|
96
|
-
# Ubuntu 9.04 Jaunty base install 32-bit 2.6.21.7-2.fc8xen ami-
|
97
|
-
# 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
|
98
80
|
#
|
99
|
-
image_id: ami-
|
81
|
+
image_id: ami-ccf615a5
|
100
82
|
# m1.small or m1.large or m1.xlarge
|
101
83
|
image_type: m1.small
|
102
84
|
|
85
|
+
# OPTIONAL: EC2 spot instance request support.
|
86
|
+
#
|
87
|
+
# Enables the creation of spot instance requests. Rubber will wait synchronously until the request is fulfilled,
|
88
|
+
# at which point it will begin initializing the instance, unless spot_instance_request_timeout is set.
|
89
|
+
# spot_instance: true
|
90
|
+
#
|
91
|
+
# The maximum price you would like to pay for your spot instance.
|
92
|
+
# spot_price: "0.085"
|
93
|
+
#
|
94
|
+
# If a spot instance request can't be fulfilled in 3 minutes, fallback to on-demand instance creation. If not set,
|
95
|
+
# the default is infinite.
|
96
|
+
# spot_instance_request_timeout: 180
|
97
|
+
|
103
98
|
# REQUIRED the cloud provider to use
|
104
99
|
#
|
105
100
|
cloud_provider: aws
|
@@ -138,18 +133,22 @@ isolate_security_groups: true
|
|
138
133
|
# OPTIONAL: Set if you want to use Ruby Enterprise Edition instead of the standard ubuntu one
|
139
134
|
use_enterprise_ruby: false
|
140
135
|
|
136
|
+
# REE installs into /usr/local, so this lets us setup environment to use it globally
|
137
|
+
# instead of system ruby
|
138
|
+
ruby_prefix: "#{use_enterprise_ruby ? '/usr/local' : '/usr'}"
|
139
|
+
|
141
140
|
# OPTIONAL: The packages to install on all instances
|
142
141
|
# You can install a specific version of a package by using a sub-array of pkg, version
|
143
142
|
# For example, packages: [[rake, 0.7.1], irb]
|
144
|
-
packages: [postfix, build-essential, ruby-full, ruby1.8-dev, rake, irb]
|
143
|
+
packages: [postfix, build-essential, ruby-full, ruby1.8-dev, rake, irb, git-core]
|
145
144
|
|
146
145
|
# OPTIONAL: gem sources to setup for rubygems
|
147
|
-
gemsources: ["http://gems.rubyforge.org/", "http://gems.github.com"]
|
146
|
+
gemsources: ["http://gemcutter.org", "http://gems.rubyforge.org/", "http://gems.github.com"]
|
148
147
|
|
149
148
|
# OPTIONAL: The gems to install on all instances
|
150
149
|
# You can install a specific version of a gem by using a sub-array of gem, version
|
151
150
|
# For example, gem: [[rails, 2.2.2], open4, aws-s3]
|
152
|
-
gems: [
|
151
|
+
gems: [rubber, rails, open4, aws-s3]
|
153
152
|
|
154
153
|
# OPTIONAL: A string prepended to shell command strings that cause multi
|
155
154
|
# statement shell commands to fail fast. You may need to comment this out
|
@@ -8,12 +8,14 @@
|
|
8
8
|
%>
|
9
9
|
|
10
10
|
listen passenger_proxy 0.0.0.0:<%= rubber_env.web_port %>
|
11
|
+
option forwardfor
|
11
12
|
<% backend_hosts.each do |server| %>
|
12
13
|
server <%= server %> <%= server %>:<%= rubber_env.passenger_listen_port %> maxconn <%= rubber_env.max_app_connections %> check
|
13
14
|
<% end %>
|
14
15
|
|
15
16
|
listen passenger_proxy 0.0.0.0:<%= rubber_env.web_ssl_port %>
|
16
17
|
mode tcp
|
18
|
+
option forwardfor
|
17
19
|
<% backend_hosts.each do |server| %>
|
18
20
|
server <%= server %> <%= server %>:<%= rubber_env.passenger_listen_ssl_port %> maxconn <%= rubber_env.max_app_connections %> check
|
19
21
|
<% end %>
|
@@ -0,0 +1,59 @@
|
|
1
|
+
|
2
|
+
namespace :rubber do
|
3
|
+
|
4
|
+
namespace :jetty do
|
5
|
+
|
6
|
+
rubber.allow_optional_tasks(self)
|
7
|
+
|
8
|
+
after "rubber:install_packages", "rubber:jetty:custom_install"
|
9
|
+
|
10
|
+
task :custom_install, :roles => :jetty do
|
11
|
+
rubber.sudo_script 'install_jetty', <<-ENDSCRIPT
|
12
|
+
if [[ -z `ls #{rubber_env.jetty_prefix}/jetty-hightide-#{rubber_env.jetty_version} 2> /dev/null` ]]; then
|
13
|
+
wget -q http://dist.codehaus.org/jetty/jetty-hightide-7.0.0/jetty-hightide-#{rubber_env.jetty_version}.tar.gz
|
14
|
+
tar -zxf jetty-hightide-#{rubber_env.jetty_version}.tar.gz
|
15
|
+
|
16
|
+
# Install to appropriate location.
|
17
|
+
mv jetty-hightide-#{rubber_env.jetty_version} #{rubber_env.jetty_prefix}
|
18
|
+
rm -f #{rubber_env.jetty_dir}
|
19
|
+
ln -s #{rubber_env.jetty_prefix}/jetty-hightide-#{rubber_env.jetty_version} #{rubber_env.jetty_dir}
|
20
|
+
chmod 744 #{rubber_env.jetty_dir}/bin/*.sh
|
21
|
+
|
22
|
+
# Cleanup the jetty distribution
|
23
|
+
rm -r #{rubber_env.jetty_dir}/webapps/*
|
24
|
+
rm -r #{rubber_env.jetty_dir}/contexts/test.d/
|
25
|
+
|
26
|
+
for file in #{rubber_env.jetty_dir}/contexts/*.xml; do
|
27
|
+
mv $file $file.example
|
28
|
+
done
|
29
|
+
|
30
|
+
# Cleanup after ourselves.
|
31
|
+
rm jetty-hightide-#{rubber_env.jetty_version}.tar.gz
|
32
|
+
fi
|
33
|
+
ENDSCRIPT
|
34
|
+
end
|
35
|
+
|
36
|
+
after "rubber:setup_app_permissions", "rubber:jetty:setup_jetty_permissions"
|
37
|
+
|
38
|
+
task :setup_jetty_permissions, :roles => :jetty do
|
39
|
+
run "chown -R #{rubber_env.app_user}:#{rubber_env.app_user} #{rubber_env.jetty_dir}"
|
40
|
+
end
|
41
|
+
|
42
|
+
before "deploy:stop", "rubber:jetty:stop"
|
43
|
+
after "deploy:start", "rubber:jetty:start"
|
44
|
+
after "deploy:restart", "rubber:jetty:restart"
|
45
|
+
|
46
|
+
task :restart, :roles => :jetty do
|
47
|
+
run "#{rubber_env.jetty_dir}/bin/jetty.sh restart"
|
48
|
+
end
|
49
|
+
|
50
|
+
task :stop, :roles => :jetty do
|
51
|
+
run "#{rubber_env.jetty_dir}/bin/jetty.sh stop"
|
52
|
+
end
|
53
|
+
|
54
|
+
task :start, :roles => :jetty do
|
55
|
+
run "#{rubber_env.jetty_dir}/bin/jetty.sh start"
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
end
|