blimpy 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/blimpy/box.rb +29 -7
- data/lib/blimpy/version.rb +1 -1
- data/spec/blimpy/box_spec.rb +1 -0
- metadata +10 -10
data/lib/blimpy/box.rb
CHANGED
@@ -167,15 +167,32 @@ module Blimpy
|
|
167
167
|
|
168
168
|
def bootstrap_livery
|
169
169
|
if livery == :cwd
|
170
|
+
unpack_command = 'true'
|
170
171
|
dir_name = File.basename(Dir.pwd)
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
172
|
+
|
173
|
+
if can_rsync?
|
174
|
+
unpack_command = "cd #{dir_name}"
|
175
|
+
run_command('rsync', '-avL',
|
176
|
+
'--exclude=.git',
|
177
|
+
'--exclude=.svn',
|
178
|
+
'--exclude=.blimpy.d',
|
179
|
+
'.',
|
180
|
+
"#{username}@#{dns_name}:#{dir_name}/")
|
181
|
+
else
|
182
|
+
puts "Remote host has no rsync(1), falling back to copying a full tarball over"
|
183
|
+
tarball = Blimpy::Livery.tarball_directory(Dir.pwd)
|
184
|
+
scp_file(tarball)
|
185
|
+
# HAXX
|
186
|
+
basename = File.basename(tarball)
|
187
|
+
unpack_command = "tar -zxf #{basename} && cd #{dir_name}"
|
188
|
+
end
|
189
|
+
|
177
190
|
puts 'Bootstrapping the livery'
|
178
|
-
|
191
|
+
run_sudo = 'sudo'
|
192
|
+
if username == 'root'
|
193
|
+
run_sudo = ''
|
194
|
+
end
|
195
|
+
ssh_into("#{unpack_command} && #{run_sudo} ./bootstrap.sh")
|
179
196
|
end
|
180
197
|
end
|
181
198
|
|
@@ -206,6 +223,11 @@ module Blimpy
|
|
206
223
|
raise NotImplementedError, '#fog should be implemented by cloud-specific subclasses'
|
207
224
|
end
|
208
225
|
|
226
|
+
def can_rsync?
|
227
|
+
@can_rsync ||= ssh_into('-q', 'which rsync > /dev/null')
|
228
|
+
end
|
229
|
+
|
230
|
+
|
209
231
|
private
|
210
232
|
|
211
233
|
def create_host
|
data/lib/blimpy/version.rb
CHANGED
data/spec/blimpy/box_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blimpy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-08 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fog
|
16
|
-
requirement: &
|
16
|
+
requirement: &7560740 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *7560740
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: thor
|
27
|
-
requirement: &
|
27
|
+
requirement: &7559940 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *7559940
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: minitar
|
38
|
-
requirement: &
|
38
|
+
requirement: &7559080 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *7559080
|
47
47
|
description: Blimpy is a tool for managing a fleet of machines in the CLOUD!
|
48
48
|
email:
|
49
49
|
- tyler@monkeypox.org
|
@@ -106,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
106
106
|
version: '0'
|
107
107
|
segments:
|
108
108
|
- 0
|
109
|
-
hash: -
|
109
|
+
hash: -306445518054353312
|
110
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
111
|
none: false
|
112
112
|
requirements:
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
version: '0'
|
116
116
|
segments:
|
117
117
|
- 0
|
118
|
-
hash: -
|
118
|
+
hash: -306445518054353312
|
119
119
|
requirements: []
|
120
120
|
rubyforge_project:
|
121
121
|
rubygems_version: 1.8.10
|