rubber 2.5.2 → 2.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +17 -1
- data/lib/rubber/cloud/vagrant.rb +2 -0
- data/lib/rubber/recipes/rubber.rb +1 -1
- data/lib/rubber/recipes/rubber/instances.rb +1 -0
- data/lib/rubber/recipes/rubber/setup.rb +61 -39
- data/lib/rubber/vagrant/config.rb +3 -1
- data/lib/rubber/vagrant/provisioner.rb +8 -6
- data/lib/rubber/version.rb +1 -1
- data/templates/base/config/rubber/deploy-setup.rb +4 -0
- data/templates/base/config/rubber/rubber-ruby.yml +2 -2
- data/templates/base/config/rubber/rubber.yml +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01552c1465c4b0aa4ed066f0125ce367b0a00407
|
4
|
+
data.tar.gz: a7a618e9599de68a09172bad4500a822443b042e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24595ac3976eb6a51785b00e11a3f360223275f83fc8ab4b83aef4b35635af0800070f15a4b95490a144882956bb844ceb3daf95e3de9f7cd3b0ac1df4746be2
|
7
|
+
data.tar.gz: 4f8d3265b289f7c7a5bcc6aabd3b5a9aadd669788113cffa244219dff6dd087a64d6c3ee7cfed8a2c2538baf105bd2a5734175dd555f0b9c2d581f68a9a8e020
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
2.5.3 (07/11/2013)
|
2
|
+
|
3
|
+
Improvements:
|
4
|
+
============
|
5
|
+
|
6
|
+
[base] Upgraded to ruby-build 20130628 and Ruby 1.9.3-p448. <caa9e06>
|
7
|
+
[base] Updated Digitial Ocean default zone info and image_id. <11502d2>
|
8
|
+
[base, core] Re-install the VirtualBox add-ons when upgrading the kernel in a Vagrant instance so you can package VMs properly.
|
9
|
+
[core] Ensure the SSH public key is installed for the user account if one is set. <75e7f20>
|
10
|
+
|
11
|
+
Bug Fixes:
|
12
|
+
=========
|
13
|
+
|
14
|
+
[core] Allow the Vagrant plugin to interact with the local ruby installation when RVM is used. <98a061a>
|
15
|
+
[core] Make sure we note the vagrant provider was used in the instance file. <d1573fe>
|
16
|
+
|
17
|
+
|
1
18
|
2.5.2 (06/13/2013)
|
2
19
|
|
3
20
|
Bug Fixes:
|
@@ -6,7 +23,6 @@ Bug Fixes:
|
|
6
23
|
[core] Do not use the embedded Vagrant ruby installation by default.
|
7
24
|
|
8
25
|
|
9
|
-
|
10
26
|
2.5.1 (06/09/2013)
|
11
27
|
-----------------
|
12
28
|
|
data/lib/rubber/cloud/vagrant.rb
CHANGED
@@ -28,6 +28,7 @@ module Rubber
|
|
28
28
|
Generic.instances.each do |instance|
|
29
29
|
if instance[:id] == instance_id
|
30
30
|
instance[:state] = state
|
31
|
+
instance[:provider] = 'vagrant'
|
31
32
|
end
|
32
33
|
end
|
33
34
|
|
@@ -38,6 +39,7 @@ module Rubber
|
|
38
39
|
instance[:state] = state
|
39
40
|
instance[:external_ip] = capistrano.rubber.get_env('EXTERNAL_IP', "External IP address for host '#{instance_id}'", true)
|
40
41
|
instance[:internal_ip] = capistrano.rubber.get_env('INTERNAL_IP', "Internal IP address for host '#{instance_id}'", true, instance[:external_ip])
|
42
|
+
instance[:provider] = 'vagrant'
|
41
43
|
|
42
44
|
[instance]
|
43
45
|
end
|
@@ -85,7 +85,7 @@ namespace :rubber do
|
|
85
85
|
# define capistrano host => role mapping for all instances
|
86
86
|
rubber_instances.filtered.each do |ic|
|
87
87
|
ic.roles.each do |role|
|
88
|
-
opts = Rubber::Util::symbolize_keys(role.options).merge(:platform => ic.platform)
|
88
|
+
opts = Rubber::Util::symbolize_keys(role.options).merge(:platform => ic.platform, :provider => ic.provider)
|
89
89
|
msg = "Auto role: #{role.name.to_sym} => #{ic.full_name}"
|
90
90
|
msg << ", #{opts.inspect}" if opts.inspect.size > 0
|
91
91
|
logger.info msg
|
@@ -375,6 +375,7 @@ namespace :rubber do
|
|
375
375
|
|
376
376
|
# turn back on root ssh access if we are using root as the capistrano user for connecting
|
377
377
|
enable_root_ssh(instance_item.external_ip, fetch(:initial_ssh_user, 'ubuntu')) if user == 'root'
|
378
|
+
|
378
379
|
# force a connection so if above isn't enabled we still timeout if initial connection hangs
|
379
380
|
direct_connection(instance_item.external_ip) do
|
380
381
|
run "echo"
|
@@ -9,8 +9,8 @@ namespace :rubber do
|
|
9
9
|
link_bash
|
10
10
|
set_timezone
|
11
11
|
enable_multiverse
|
12
|
-
upgrade_packages
|
13
12
|
install_core_packages
|
13
|
+
upgrade_packages
|
14
14
|
install_packages
|
15
15
|
setup_volumes
|
16
16
|
setup_gem_sources
|
@@ -23,16 +23,35 @@ namespace :rubber do
|
|
23
23
|
# Capistrano uses the :password variable for sudo commands. Since this setting is generally used for the deploy user,
|
24
24
|
# but we need it this one time for the initial SSH user, we need to swap out and restore the password.
|
25
25
|
#
|
26
|
-
# We special-case the 'ubuntu' user since
|
26
|
+
# We special-case the 'ubuntu' user since the Canonical AMIs on EC2 don't set the password for
|
27
27
|
# this account, making any password prompt potentially confusing.
|
28
28
|
orig_password = fetch(:password)
|
29
29
|
set(:password, initial_ssh_user == 'ubuntu' || ENV.has_key?('RUN_FROM_VAGRANT') ? nil : Capistrano::CLI.password_prompt("Password for #{initial_ssh_user} @ #{ip}: "))
|
30
30
|
|
31
|
+
task :_ensure_key_file_present, :hosts => "#{initial_ssh_user}@#{ip}" do
|
32
|
+
public_key_filename = "#{cloud.env.key_file}.pub"
|
33
|
+
|
34
|
+
if File.exists?(public_key_filename)
|
35
|
+
public_key = File.read(public_key_filename).chomp
|
36
|
+
|
37
|
+
rubber.sudo_script 'ensure_key_file_present', <<-ENDSCRIPT
|
38
|
+
mkdir -p ~/.ssh
|
39
|
+
touch ~/.ssh/authorized_keys
|
40
|
+
chmod 600 ~/.ssh/authorized_keys
|
41
|
+
|
42
|
+
if ! grep -q '#{public_key}' .ssh/authorized_keys; then
|
43
|
+
echo '#{public_key}' >> .ssh/authorized_keys
|
44
|
+
fi
|
45
|
+
ENDSCRIPT
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
31
49
|
task :_allow_root_ssh, :hosts => "#{initial_ssh_user}@#{ip}" do
|
32
50
|
rsudo "mkdir -p /root/.ssh && cp /home/#{initial_ssh_user}/.ssh/authorized_keys /root/.ssh/"
|
33
51
|
end
|
34
52
|
|
35
53
|
begin
|
54
|
+
_ensure_key_file_present
|
36
55
|
_allow_root_ssh
|
37
56
|
rescue ConnectionError => e
|
38
57
|
if e.message =~ /Net::SSH::AuthenticationFailed/
|
@@ -89,7 +108,7 @@ namespace :rubber do
|
|
89
108
|
# don't add unqualified hostname in local hosts file since user may be
|
90
109
|
# managing multiple domains with same aliases
|
91
110
|
hosts_data = [ic.full_name, ic.external_host, ic.internal_host]
|
92
|
-
|
111
|
+
|
93
112
|
# add the ip aliases for web tools hosts so we can map internal tools
|
94
113
|
# to their own vhost to make proxying easier (rewriting url paths for
|
95
114
|
# proxy is a real pain, e.g. '/graphite/' externally to '/' on the
|
@@ -99,7 +118,7 @@ namespace :rubber do
|
|
99
118
|
hosts_data << "#{name}-#{ic.full_name}"
|
100
119
|
end
|
101
120
|
end
|
102
|
-
|
121
|
+
|
103
122
|
local_hosts << ic.external_ip << ' ' << hosts_data.join(' ') << "\n"
|
104
123
|
end
|
105
124
|
local_hosts << delim << "\n"
|
@@ -124,10 +143,10 @@ namespace :rubber do
|
|
124
143
|
# Generate /etc/hosts contents for the remote instance from instance config
|
125
144
|
delim = "## rubber config #{Rubber.env}"
|
126
145
|
remote_hosts = []
|
127
|
-
|
146
|
+
|
128
147
|
rubber_instances.each do |ic|
|
129
148
|
hosts_data = [ic.internal_ip, ic.full_name, ic.name, ic.external_host, ic.internal_host]
|
130
|
-
|
149
|
+
|
131
150
|
# add the ip aliases for web tools hosts so we can map internal tools
|
132
151
|
# to their own vhost to make proxying easier (rewriting url paths for
|
133
152
|
# proxy is a real pain, e.g. '/graphite/' externally to '/' on the
|
@@ -137,21 +156,21 @@ namespace :rubber do
|
|
137
156
|
hosts_data << "#{name}-#{ic.full_name}"
|
138
157
|
end
|
139
158
|
end
|
140
|
-
|
159
|
+
|
141
160
|
remote_hosts << hosts_data.join(' ')
|
142
161
|
end
|
143
|
-
|
162
|
+
|
144
163
|
if rubber_instances.size > 0
|
145
|
-
|
164
|
+
|
146
165
|
replace="#{delim}\\n#{remote_hosts.join("\\n")}\\n#{delim}"
|
147
|
-
|
166
|
+
|
148
167
|
rubber.sudo_script 'setup_remote_aliases', <<-ENDSCRIPT
|
149
168
|
sed -i.bak '/#{delim}/,/#{delim}/c #{replace}' /etc/hosts
|
150
169
|
if ! grep -q "#{delim}" /etc/hosts; then
|
151
170
|
echo -e "#{replace}" >> /etc/hosts
|
152
171
|
fi
|
153
172
|
ENDSCRIPT
|
154
|
-
|
173
|
+
|
155
174
|
# Setup hostname on instance so shell, etcs have nice display
|
156
175
|
rsudo "echo $CAPISTRANO:HOST$ > /etc/hostname && hostname $CAPISTRANO:HOST$"
|
157
176
|
# Newer ubuntus ec2-init script always resets hostname, so prevent it
|
@@ -162,7 +181,7 @@ namespace :rubber do
|
|
162
181
|
# /etc/resolv.conf to add search domain
|
163
182
|
# ~/.ssh/options to setup user/host/key aliases
|
164
183
|
end
|
165
|
-
|
184
|
+
|
166
185
|
desc <<-DESC
|
167
186
|
Sets up aliases in dynamic dns provider for instance hostnames based on contents of instance.yml.
|
168
187
|
DESC
|
@@ -175,7 +194,7 @@ namespace :rubber do
|
|
175
194
|
def record_key(record)
|
176
195
|
"#{record[:host]}.#{record[:domain]} #{record[:type]}"
|
177
196
|
end
|
178
|
-
|
197
|
+
|
179
198
|
def convert_to_new_dns_format(records)
|
180
199
|
record = {}
|
181
200
|
records.each do |r|
|
@@ -200,10 +219,10 @@ namespace :rubber do
|
|
200
219
|
required_task :setup_dns_records do
|
201
220
|
records = rubber_env.dns_records
|
202
221
|
if records && rubber_env.dns_provider
|
203
|
-
|
222
|
+
|
204
223
|
provider_name = rubber_env.dns_provider
|
205
224
|
provider = Rubber::Dns::get_provider(provider_name, rubber_env)
|
206
|
-
|
225
|
+
|
207
226
|
# records in rubber_env.dns_records can either have a value which
|
208
227
|
# is an array, or multiple equivalent (same host+type)items with
|
209
228
|
# value being a string, so try and normalize them
|
@@ -222,7 +241,7 @@ namespace :rubber do
|
|
222
241
|
precords = domains.collect {|d| provider.find_host_records(:host => '*', :type => '*', :domain => d) }.flatten
|
223
242
|
precords.each do |record|
|
224
243
|
key = record_key(record)
|
225
|
-
raise "unmerged provider records" if provider_records[key]
|
244
|
+
raise "unmerged provider records" if provider_records[key]
|
226
245
|
provider_records[key] = record
|
227
246
|
end
|
228
247
|
|
@@ -255,16 +274,16 @@ namespace :rubber do
|
|
255
274
|
|
256
275
|
end
|
257
276
|
end
|
258
|
-
|
277
|
+
|
259
278
|
desc <<-DESC
|
260
279
|
Exports dns records from your provider into the format readable by rubber in rubber-dns.yml
|
261
280
|
DESC
|
262
281
|
required_task :export_dns_records do
|
263
282
|
if rubber_env.dns_provider
|
264
|
-
|
283
|
+
|
265
284
|
provider_name = rubber_env.dns_provider
|
266
285
|
provider = Rubber::Dns::get_provider(provider_name, rubber_env)
|
267
|
-
|
286
|
+
|
268
287
|
provider_records = provider.find_host_records(:host => '*', :type => '*', :domain => rubber_env.domain)
|
269
288
|
puts({'dns_records' => provider_records.collect {|r| Rubber::Util.stringify_keys(r)}}.to_yaml)
|
270
289
|
end
|
@@ -306,9 +325,12 @@ namespace :rubber do
|
|
306
325
|
DESC
|
307
326
|
task :install_core_packages do
|
308
327
|
core_packages = [
|
309
|
-
|
310
|
-
|
311
|
-
|
328
|
+
'python-software-properties', # Needed for add-apt-repository, which we use for adding PPAs.
|
329
|
+
'bc', # Needed for comparing version numbers in bash, which we do for various setup functions.
|
330
|
+
'update-notifier-common' # Needed for notifying us when a package upgrade requires a reboot.
|
331
|
+
]
|
332
|
+
|
333
|
+
rsudo "apt-get -q update"
|
312
334
|
rsudo "export DEBIAN_FRONTEND=noninteractive; apt-get -q -o Dpkg::Options::=--force-confold -y --force-yes install #{core_packages.join(' ')}"
|
313
335
|
end
|
314
336
|
|
@@ -383,7 +405,7 @@ namespace :rubber do
|
|
383
405
|
end
|
384
406
|
end
|
385
407
|
ENDSCRIPT
|
386
|
-
|
408
|
+
|
387
409
|
desc <<-DESC
|
388
410
|
Setup ruby gems sources. Set 'gemsources' in rubber.yml to \
|
389
411
|
be an array of URI strings.
|
@@ -425,7 +447,7 @@ namespace :rubber do
|
|
425
447
|
fi
|
426
448
|
ENDSCRIPT
|
427
449
|
end
|
428
|
-
|
450
|
+
|
429
451
|
desc <<-DESC
|
430
452
|
Enable the ubuntu multiverse source for getting packages like
|
431
453
|
ec2-ami-tools used for bundling images
|
@@ -439,13 +461,13 @@ namespace :rubber do
|
|
439
461
|
fi
|
440
462
|
ENDSCRIPT
|
441
463
|
end
|
442
|
-
|
464
|
+
|
443
465
|
def update_dyndns(instance_item)
|
444
466
|
env = rubber_cfg.environment.bind(instance_item.role_names, instance_item.name)
|
445
467
|
if env.dns_provider
|
446
468
|
provider = Rubber::Dns::get_provider(env.dns_provider, env)
|
447
469
|
provider.update(instance_item.name, instance_item.external_ip)
|
448
|
-
|
470
|
+
|
449
471
|
# add the ip aliases for web tools hosts so we can map internal tools
|
450
472
|
# to their own vhost to make proxying easier (rewriting url paths for
|
451
473
|
# proxy is a real pain, e.g. '/graphite/' externally to '/' on the
|
@@ -463,7 +485,7 @@ namespace :rubber do
|
|
463
485
|
if env.dns_provider
|
464
486
|
provider = Rubber::Dns::get_provider(env.dns_provider, env)
|
465
487
|
provider.destroy(instance_item.name)
|
466
|
-
|
488
|
+
|
467
489
|
# add the ip aliases for web tools hosts so we can map internal tools
|
468
490
|
# to their own vhost to make proxying easier (rewriting url paths for
|
469
491
|
# proxy is a real pain, e.g. '/graphite/' externally to '/' on the
|
@@ -496,10 +518,10 @@ namespace :rubber do
|
|
496
518
|
else
|
497
519
|
rsudo "export DEBIAN_FRONTEND=noninteractive; apt-get -q -o Dpkg::Options::=--force-confold -y --force-yes install $CAPISTRANO:VAR$", opts
|
498
520
|
end
|
499
|
-
|
521
|
+
|
500
522
|
maybe_reboot
|
501
523
|
end
|
502
|
-
|
524
|
+
|
503
525
|
def multi_capture(cmd, opts={})
|
504
526
|
mutex = Mutex.new
|
505
527
|
host_data = {}
|
@@ -512,9 +534,9 @@ namespace :rubber do
|
|
512
534
|
end
|
513
535
|
end
|
514
536
|
end
|
515
|
-
return host_data
|
537
|
+
return host_data
|
516
538
|
end
|
517
|
-
|
539
|
+
|
518
540
|
def maybe_reboot
|
519
541
|
reboot_needed = multi_capture("echo $(ls /var/run/reboot-required 2> /dev/null)")
|
520
542
|
reboot_hosts = reboot_needed.collect {|k, v| v.strip.size > 0 ? k : nil}.compact.sort
|
@@ -532,10 +554,10 @@ namespace :rubber do
|
|
532
554
|
ENV['REBOOT'] = 'y'
|
533
555
|
logger.info "Updates require a reboot on hosts #{reboot_hosts.inspect}"
|
534
556
|
end
|
535
|
-
|
557
|
+
|
536
558
|
reboot = get_env('REBOOT', "Updates require a reboot on hosts #{reboot_hosts.inspect}, reboot [y/N]?", false)
|
537
559
|
reboot = (reboot =~ /^y/)
|
538
|
-
|
560
|
+
|
539
561
|
if reboot
|
540
562
|
|
541
563
|
logger.info "Rebooting ..."
|
@@ -547,7 +569,7 @@ namespace :rubber do
|
|
547
569
|
# swallow exception since there is a chance
|
548
570
|
# net:ssh throws an Exception
|
549
571
|
end
|
550
|
-
|
572
|
+
|
551
573
|
sleep 30
|
552
574
|
|
553
575
|
reboot_hosts.each do |host|
|
@@ -556,16 +578,16 @@ namespace :rubber do
|
|
556
578
|
end
|
557
579
|
logger.info "#{host} completed reboot"
|
558
580
|
end
|
559
|
-
|
581
|
+
|
560
582
|
end
|
561
|
-
|
583
|
+
|
562
584
|
# could take a while to reboot (or get answer from prompt), so
|
563
585
|
# we need to rebuild all capistrano connections in case they timed out
|
564
586
|
teardown_connections_to(sessions.keys)
|
565
|
-
|
587
|
+
|
566
588
|
end
|
567
589
|
end
|
568
|
-
|
590
|
+
|
569
591
|
def custom_package(url_base, name, ver, install_test)
|
570
592
|
rubber.sudo_script "install_#{name}", <<-ENDSCRIPT
|
571
593
|
if [[ #{install_test} ]]; then
|
@@ -657,7 +679,7 @@ namespace :rubber do
|
|
657
679
|
end
|
658
680
|
expanded_gem_list.join(' ')
|
659
681
|
end
|
660
|
-
|
682
|
+
|
661
683
|
if opts.size > 0
|
662
684
|
script = prepare_script('gem_helper', gem_helper_script, nil)
|
663
685
|
rsudo "ruby #{script} #{cmd} $CAPISTRANO:VAR$", opts do |ch, str, data|
|
@@ -1,17 +1,19 @@
|
|
1
1
|
module VagrantPlugins
|
2
2
|
module Rubber
|
3
3
|
class Config < Vagrant.plugin("2", :config)
|
4
|
-
attr_accessor :roles, :rubber_env, :use_vagrant_ruby
|
4
|
+
attr_accessor :roles, :rubber_env, :use_vagrant_ruby, :rvm_ruby_version
|
5
5
|
|
6
6
|
def initialize
|
7
7
|
@roles = UNSET_VALUE
|
8
8
|
@rubber_env = UNSET_VALUE
|
9
9
|
@use_vagrant_ruby = UNSET_VALUE
|
10
|
+
@rvm_ruby_version = UNSET_VALUE
|
10
11
|
end
|
11
12
|
|
12
13
|
def finalize!
|
13
14
|
@rubber_env = 'vagrant' if @rubber_env == UNSET_VALUE
|
14
15
|
@use_vagrant_ruby = false if @use_vagrant_ruby == UNSET_VALUE
|
16
|
+
@rvm_ruby_version = nil if @rvm_ruby_version == UNSET_VALUE
|
15
17
|
|
16
18
|
::Rubber::initialize(Dir.pwd, @rubber_env)
|
17
19
|
|
@@ -32,12 +32,10 @@ module VagrantPlugins
|
|
32
32
|
script = <<-ENDSCRIPT
|
33
33
|
unset GEM_HOME;
|
34
34
|
unset GEM_PATH;
|
35
|
-
PATH=#{ENV['PATH'].split(':')[1..-1].join(':')} RUN_FROM_VAGRANT=true RUBBER_ENV=#{config.rubber_env} ALIAS=#{machine.name} ROLES='#{config.roles}' EXTERNAL_IP=#{private_ip} INTERNAL_IP=#{private_ip} RUBBER_SSH_KEY=#{ssh_info[:private_key_path]} bash -c 'bundle exec cap rubber:create -S initial_ssh_user=#{ssh_info[:username]}'
|
35
|
+
PATH=#{ENV['PATH'].split(':')[1..-1].join(':')} RUN_FROM_VAGRANT=true RUBBER_ENV=#{config.rubber_env} ALIAS=#{machine.name} ROLES='#{config.roles}' EXTERNAL_IP=#{private_ip} INTERNAL_IP=#{private_ip} RUBBER_SSH_KEY=#{ssh_info[:private_key_path]} bash -c '#{rvm_prefix} bundle exec cap rubber:create -S initial_ssh_user=#{ssh_info[:username]}'
|
36
36
|
ENDSCRIPT
|
37
37
|
end
|
38
38
|
|
39
|
-
puts script
|
40
|
-
|
41
39
|
system(script)
|
42
40
|
end
|
43
41
|
|
@@ -48,7 +46,7 @@ module VagrantPlugins
|
|
48
46
|
script = <<-ENDSCRIPT
|
49
47
|
unset GEM_HOME;
|
50
48
|
unset GEM_PATH;
|
51
|
-
PATH=#{ENV['PATH'].split(':')[1..-1].join(':')} RUN_FROM_VAGRANT=true RUBBER_ENV=#{config.rubber_env} RUBBER_SSH_KEY=#{ssh_info[:private_key_path]} ALIAS=#{machine.name} EXTERNAL_IP=#{private_ip} INTERNAL_IP=#{private_ip} bash -c 'bundle exec cap rubber:refresh -S initial_ssh_user=#{ssh_info[:username]}'
|
49
|
+
PATH=#{ENV['PATH'].split(':')[1..-1].join(':')} RUN_FROM_VAGRANT=true RUBBER_ENV=#{config.rubber_env} RUBBER_SSH_KEY=#{ssh_info[:private_key_path]} ALIAS=#{machine.name} EXTERNAL_IP=#{private_ip} INTERNAL_IP=#{private_ip} bash -c '#{rvm_prefix} bundle exec cap rubber:refresh -S initial_ssh_user=#{ssh_info[:username]}'
|
52
50
|
ENDSCRIPT
|
53
51
|
end
|
54
52
|
|
@@ -62,7 +60,7 @@ module VagrantPlugins
|
|
62
60
|
script = <<-ENDSCRIPT
|
63
61
|
unset GEM_HOME;
|
64
62
|
unset GEM_PATH;
|
65
|
-
PATH=#{ENV['PATH'].split(':')[1..-1].join(':')} RUN_FROM_VAGRANT=true RUBBER_ENV=#{config.rubber_env} RUBBER_SSH_KEY=#{ssh_info[:private_key_path]} FILTER=#{machine.name} bash -c 'bundle exec cap rubber:bootstrap'
|
63
|
+
PATH=#{ENV['PATH'].split(':')[1..-1].join(':')} RUN_FROM_VAGRANT=true RUBBER_ENV=#{config.rubber_env} RUBBER_SSH_KEY=#{ssh_info[:private_key_path]} FILTER=#{machine.name} bash -c '#{rvm_prefix} bundle exec cap rubber:bootstrap'
|
66
64
|
ENDSCRIPT
|
67
65
|
end
|
68
66
|
|
@@ -76,7 +74,7 @@ module VagrantPlugins
|
|
76
74
|
script = <<-ENDSCRIPT
|
77
75
|
unset GEM_HOME;
|
78
76
|
unset GEM_PATH;
|
79
|
-
PATH=#{ENV['PATH'].split(':')[1..-1].join(':')} RUN_FROM_VAGRANT=true RUBBER_ENV=#{config.rubber_env} RUBBER_SSH_KEY=#{ssh_info[:private_key_path]} FILTER=#{machine.name} bash -c 'bundle exec cap deploy:migrations'
|
77
|
+
PATH=#{ENV['PATH'].split(':')[1..-1].join(':')} RUN_FROM_VAGRANT=true RUBBER_ENV=#{config.rubber_env} RUBBER_SSH_KEY=#{ssh_info[:private_key_path]} FILTER=#{machine.name} bash -c '#{rvm_prefix} bundle exec cap deploy:migrations'
|
80
78
|
ENDSCRIPT
|
81
79
|
end
|
82
80
|
|
@@ -86,6 +84,10 @@ module VagrantPlugins
|
|
86
84
|
def internal_cap_command
|
87
85
|
"ruby -e \"require 'capistrano/cli'; Capistrano::CLI.execute\""
|
88
86
|
end
|
87
|
+
|
88
|
+
def rvm_prefix
|
89
|
+
config.rvm_ruby_version ? "rvm #{config.rvm_ruby_version} do" : ''
|
90
|
+
end
|
89
91
|
end
|
90
92
|
end
|
91
93
|
end
|
data/lib/rubber/version.rb
CHANGED
@@ -11,11 +11,11 @@
|
|
11
11
|
packages: [build-essential, git-core, subversion, curl, autoconf, bison, ruby, zlib1g-dev, libssl-dev, libreadline6-dev, libxml2-dev, libyaml-dev]
|
12
12
|
|
13
13
|
# REQUIRED: The version of ruby-build to use for building ruby.
|
14
|
-
ruby_build_version:
|
14
|
+
ruby_build_version: 20130628
|
15
15
|
|
16
16
|
# REQUIRED: Set to the version string for the ruby version you wish to use
|
17
17
|
# Run "ruby-build --definitions" to see the list of possible options
|
18
|
-
ruby_version: 1.9.3-
|
18
|
+
ruby_version: 1.9.3-p448
|
19
19
|
|
20
20
|
# REQUIRED: Installation path for ruby.
|
21
21
|
ruby_path: "/usr/local/rubies/#{ruby_version}"
|
@@ -104,12 +104,13 @@ cloud_providers:
|
|
104
104
|
#
|
105
105
|
# Options include
|
106
106
|
# New York 1
|
107
|
-
#
|
107
|
+
# San Francisco 1
|
108
108
|
#
|
109
|
+
# These change often. Check https://www.digitalocean.com/droplets/new for the most up to date options.
|
109
110
|
region: New York 1
|
110
111
|
|
111
112
|
# REQUIRED: The image name and type for creating instances.
|
112
|
-
image_id: Ubuntu 12.04 x64
|
113
|
+
image_id: Ubuntu 12.04 x64
|
113
114
|
image_type: 512MB
|
114
115
|
|
115
116
|
# Use an alternate cloud provider supported by fog. This doesn't fully work
|
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.5.
|
4
|
+
version: 2.5.3
|
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-
|
12
|
+
date: 2013-07-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|