beaker 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/HISTORY.md +323 -2
- data/Rakefile +20 -6
- data/lib/beaker/dsl/install_utils.rb +45 -1
- data/lib/beaker/host.rb +4 -4
- data/lib/beaker/host/unix.rb +11 -0
- data/lib/beaker/host_prebuilt_steps.rb +20 -21
- data/lib/beaker/hypervisor.rb +1 -0
- data/lib/beaker/hypervisor/aws_sdk.rb +50 -9
- data/lib/beaker/hypervisor/docker.rb +3 -0
- data/lib/beaker/hypervisor/vagrant.rb +3 -3
- data/lib/beaker/hypervisor/vsphere.rb +11 -9
- data/lib/beaker/hypervisor/vsphere_helper.rb +5 -1
- data/lib/beaker/logger.rb +1 -1
- data/lib/beaker/options/command_line_parser.rb +7 -1
- data/lib/beaker/options/options_hash.rb +22 -0
- data/lib/beaker/options/parser.rb +2 -2
- data/lib/beaker/options/presets.rb +1 -0
- data/lib/beaker/result.rb +1 -1
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/dsl/install_utils_spec.rb +80 -0
- data/spec/beaker/host_prebuilt_steps_spec.rb +15 -23
- data/spec/beaker/host_spec.rb +30 -8
- data/spec/beaker/hypervisor/docker_spec.rb +18 -1
- data/spec/beaker/hypervisor/hypervisor_spec.rb +24 -0
- data/spec/beaker/hypervisor/vagrant_spec.rb +23 -7
- data/spec/beaker/hypervisor/vsphere_spec.rb +14 -0
- data/spec/beaker/options/command_line_parser_spec.rb +7 -0
- data/spec/beaker/options/options_hash_spec.rb +24 -0
- data/spec/beaker/ssh_connection_spec.rb +185 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODAwM2ViN2UzMjliZTZhNTMzZWNjZGIyNDM3YWE0MjExMjRlYWQyYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTlhYjdkZDFjNGZiNjExYzMzZGUwYmUzYTM5NDZmOTE1Zjk0OGQxNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjQyYWM5YzE2ZTYwNjIxYjA1ZDFiYWU0MTI1OTIxMGE0MzRhZWQxYzk1ZWMw
|
10
|
+
NGQ3MjYzNTcxOTllMWY0NzVhN2I0YTBiZGM1MzY2MzcyNzA4NDRlNGQxZmRk
|
11
|
+
MTUzNTYwYTYxNTM1YzgyMTIwMzFiNjQzYjU0ZGVlYTFhOTczYjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZmNiMTRhZmE0YTA3NzNlZWVkODE4ZmIwYTBhZDA1YmYyZGU1MTJjNWZjMTFh
|
14
|
+
M2I2OGI5MjU3ZTE1MTBhMzc1MjVhMWE1M2IyMjRmN2Q4NGYzMzc1MjNmODBk
|
15
|
+
MjRjN2QwNGI2YTk3NmU2NTkxODY4NDZkMTI5YjA2MWYzMGFhNTA=
|
data/HISTORY.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# default - History
|
2
2
|
## Tags
|
3
|
-
* [LATEST -
|
3
|
+
* [LATEST - 8 Jan, 2015 (4dde5f3a)](#LATEST)
|
4
|
+
* [beaker2.1.0 - 17 Dec, 2014 (ec089b1a)](#beaker2.1.0)
|
4
5
|
* [beaker2.0.0 - 5 Dec, 2014 (fb4b620b)](#beaker2.0.0)
|
5
6
|
* [beaker1.20.1 - 17 Oct, 2014 (be250ad6)](#beaker1.20.1)
|
6
7
|
* [beaker1.20.0 - 17 Oct, 2014 (24acc2d3)](#beaker1.20.0)
|
@@ -66,7 +67,327 @@
|
|
66
67
|
* [pe1.2 - 6 Sep, 2011 (ba3dadd2)](#pe1.2)
|
67
68
|
|
68
69
|
## Details
|
69
|
-
### <a name = "LATEST">LATEST -
|
70
|
+
### <a name = "LATEST">LATEST - 8 Jan, 2015 (4dde5f3a)
|
71
|
+
|
72
|
+
* (GEM) update beaker version to 2.2.0 (4dde5f3a)
|
73
|
+
|
74
|
+
* Merge pull request #608 from chris-reeves/gh503_scp_to_dirs (1c6624bd)
|
75
|
+
|
76
|
+
|
77
|
+
```
|
78
|
+
Merge pull request #608 from chris-reeves/gh503_scp_to_dirs
|
79
|
+
|
80
|
+
(gh-503) (QENG-1485) Fix recursive copying in do_scp_to
|
81
|
+
```
|
82
|
+
* Merge pull request #603 from kevpl/qeng1562_aio_supportadd (5e3e59aa)
|
83
|
+
|
84
|
+
|
85
|
+
```
|
86
|
+
Merge pull request #603 from kevpl/qeng1562_aio_supportadd
|
87
|
+
|
88
|
+
(QENG-1562) added AIO installation support for yum/apt on FOSS
|
89
|
+
```
|
90
|
+
* Merge pull request #557 from kevpl/qeng1538_eos_fixhack (6776472e)
|
91
|
+
|
92
|
+
|
93
|
+
```
|
94
|
+
Merge pull request #557 from kevpl/qeng1538_eos_fixhack
|
95
|
+
|
96
|
+
(QENG-1538) fixes EOS hack
|
97
|
+
```
|
98
|
+
* Add expectations to spec tests for do_scp_to (abb53aa2)
|
99
|
+
|
100
|
+
|
101
|
+
```
|
102
|
+
Add expectations to spec tests for do_scp_to
|
103
|
+
|
104
|
+
Some tests which are supposed to test whether files and directories are
|
105
|
+
excluded from copies were only testing that non-excluded files *were* copied,
|
106
|
+
and didn't test that excluded files *weren't* copied. This commit explicitly
|
107
|
+
tests that excluded files are not copied.
|
108
|
+
```
|
109
|
+
* (gh-503) Update spec tests for do_scp_to (467f62a7)
|
110
|
+
|
111
|
+
|
112
|
+
```
|
113
|
+
(gh-503) Update spec tests for do_scp_to
|
114
|
+
|
115
|
+
Update spec tests following fix for recursive copying in do_scp_to
|
116
|
+
```
|
117
|
+
* (gh-503) Fix recursive copying in do_scp_to (b4fb0e66)
|
118
|
+
|
119
|
+
|
120
|
+
```
|
121
|
+
(gh-503) Fix recursive copying in do_scp_to
|
122
|
+
|
123
|
+
Because of the functionality within do_scp_to which allows certain files and
|
124
|
+
directories to be ignored when copying, each specific file/directory is copied
|
125
|
+
individually. In the existing code the source and target paths are effectively
|
126
|
+
the same, causing directories to be copied as subdirectories of themselves.
|
127
|
+
This commit ensures that all files and directories are copied to their parent
|
128
|
+
directories.
|
129
|
+
```
|
130
|
+
* Merge pull request #606 from kevpl/maint_prebuiltspec_fix (74e7ffb5)
|
131
|
+
|
132
|
+
|
133
|
+
```
|
134
|
+
Merge pull request #606 from kevpl/maint_prebuiltspec_fix
|
135
|
+
|
136
|
+
(MAINT) fixed broken host_prebuilt_steps spec tests
|
137
|
+
```
|
138
|
+
* Merge pull request #607 from anodelman/maint (6fc8b78d)
|
139
|
+
|
140
|
+
|
141
|
+
```
|
142
|
+
Merge pull request #607 from anodelman/maint
|
143
|
+
|
144
|
+
(QENG-1641) jenkins beaker spec testing reporting green on failure
|
145
|
+
```
|
146
|
+
* (QENG-1641) jenkins beaker spec testing reporting green on failure (ad97e32d)
|
147
|
+
|
148
|
+
|
149
|
+
```
|
150
|
+
(QENG-1641) jenkins beaker spec testing reporting green on failure
|
151
|
+
|
152
|
+
- fix Rakefile to report correct exit code
|
153
|
+
```
|
154
|
+
* Merge pull request #588 from madAndroid/enable_ssh_agent_forwarding_docker_and_vagrant (2146bb6d)
|
155
|
+
|
156
|
+
|
157
|
+
```
|
158
|
+
Merge pull request #588 from madAndroid/enable_ssh_agent_forwarding_docker_and_vagrant
|
159
|
+
|
160
|
+
(GH-587) SSH agent forwarding for Docker and Vagrant
|
161
|
+
```
|
162
|
+
* (MAINT) fixed broken host_prebuilt_steps spec tests (73a3a153)
|
163
|
+
|
164
|
+
* Merge pull request #605 from anodelman/aws (406d09ce)
|
165
|
+
|
166
|
+
|
167
|
+
```
|
168
|
+
Merge pull request #605 from anodelman/aws
|
169
|
+
|
170
|
+
(OPS-5099) [aws] -help with disappearing EBS volumes
|
171
|
+
```
|
172
|
+
* (OPS-5099) [aws] -help with disappearing EBS volumes (34c91223)
|
173
|
+
|
174
|
+
|
175
|
+
```
|
176
|
+
(OPS-5099) [aws] -help with disappearing EBS volumes
|
177
|
+
|
178
|
+
- no longer kill all orphan volumes when zombie hunting
|
179
|
+
```
|
180
|
+
* Merge pull request #599 from kevpl/qeng1605_configure_option (b78580a7)
|
181
|
+
|
182
|
+
|
183
|
+
```
|
184
|
+
Merge pull request #599 from kevpl/qeng1605_configure_option
|
185
|
+
|
186
|
+
(QENG-1605) added --no-configure option to skip configuration if needed
|
187
|
+
```
|
188
|
+
* Merge pull request #596 from nrvale0/fix_ssh_setup (3dd3da76)
|
189
|
+
|
190
|
+
|
191
|
+
```
|
192
|
+
Merge pull request #596 from nrvale0/fix_ssh_setup
|
193
|
+
|
194
|
+
Fix ssh setup
|
195
|
+
```
|
196
|
+
* Merge pull request #600 from kbarber/ticket/master/qeng-1594-correct-carriage-return-placement (4d99b0c0)
|
197
|
+
|
198
|
+
|
199
|
+
```
|
200
|
+
Merge pull request #600 from kbarber/ticket/master/qeng-1594-correct-carriage-return-placement
|
201
|
+
|
202
|
+
(QENG-1594) Prefix carriage returns during sshd_config append
|
203
|
+
```
|
204
|
+
* Merge pull request #601 from kevpl/qeng1627_spec_add (b8401e7f)
|
205
|
+
|
206
|
+
|
207
|
+
```
|
208
|
+
Merge pull request #601 from kevpl/qeng1627_spec_add
|
209
|
+
|
210
|
+
(QENG-1627) added spec tests to flush out host and ssh_connection testin...
|
211
|
+
```
|
212
|
+
* (QENG-1627) added spec tests to flush out host and ssh_connection testing (eab653a5)
|
213
|
+
|
214
|
+
* (QENG-1594) Prefix carriage returns during sshd_config append (52855b5f)
|
215
|
+
|
216
|
+
|
217
|
+
```
|
218
|
+
(QENG-1594) Prefix carriage returns during sshd_config append
|
219
|
+
|
220
|
+
The original fix: f2c1b1efd4d36575032294d504b15c56e3cda4e7 was appending
|
221
|
+
carriage returns instead of prefixing them. This patch corrects the order,
|
222
|
+
so QENG-1594 can be closed again.
|
223
|
+
|
224
|
+
Signed-off-by: Ken Barber <ken@bob.sh>
|
225
|
+
```
|
226
|
+
* Merge pull request #593 from electrical/symbol_to_string (c1c46b4b)
|
227
|
+
|
228
|
+
|
229
|
+
```
|
230
|
+
Merge pull request #593 from electrical/symbol_to_string
|
231
|
+
|
232
|
+
(gh-573) force symbols into strings
|
233
|
+
```
|
234
|
+
* (QENG-1605) added --no-configure option to skip configuration if needed (014da7ce)
|
235
|
+
|
236
|
+
* Merge pull request #586 from chris-reeves/gh585_vagrant_1_7_x (c05dc074)
|
237
|
+
|
238
|
+
|
239
|
+
```
|
240
|
+
Merge pull request #586 from chris-reeves/gh585_vagrant_1_7_x
|
241
|
+
|
242
|
+
(gh-585) Add support for vagrant 1.7.x
|
243
|
+
```
|
244
|
+
* Merge pull request #569 from nemski/optional_snap (4dad0067)
|
245
|
+
|
246
|
+
|
247
|
+
```
|
248
|
+
Merge pull request #569 from nemski/optional_snap
|
249
|
+
|
250
|
+
(gh-568) Make snapshot optional for vsphere
|
251
|
+
```
|
252
|
+
* (#592) make sure ssh dir is present with proper perms before enviornment file (3b06071b)
|
253
|
+
|
254
|
+
* Merge pull request #578 from cassianoleal/patch-1 (d868494c)
|
255
|
+
|
256
|
+
|
257
|
+
```
|
258
|
+
Merge pull request #578 from cassianoleal/patch-1
|
259
|
+
|
260
|
+
Fix copying module files to guest
|
261
|
+
```
|
262
|
+
* (GH-587) - Use regex to test for agent forwarding in Vagrantfile (eea7bf0e)
|
263
|
+
|
264
|
+
|
265
|
+
```
|
266
|
+
(GH-587) - Use regex to test for agent forwarding in Vagrantfile
|
267
|
+
|
268
|
+
(GH-587) - Use regex to test for agent forwarding in Vagrantfile
|
269
|
+
```
|
270
|
+
* (GH-587) - Add additonal test for docker ssh_forwarding, and change forward_ssh_agent to be a symbol, instead of a string (8a965b4c)
|
271
|
+
|
272
|
+
* (gh-573) force symbols into strings (32ed4cbc)
|
273
|
+
|
274
|
+
|
275
|
+
```
|
276
|
+
(gh-573) force symbols into strings
|
277
|
+
|
278
|
+
Fixes #573
|
279
|
+
```
|
280
|
+
* Merge pull request #589 from anodelman/aws (69826745)
|
281
|
+
|
282
|
+
|
283
|
+
```
|
284
|
+
Merge pull request #589 from anodelman/aws
|
285
|
+
|
286
|
+
(QENG-1530) beaker support to query aws instance/resource relationships
|
287
|
+
```
|
288
|
+
* Merge pull request #584 from myoung34/master (80641787)
|
289
|
+
|
290
|
+
|
291
|
+
```
|
292
|
+
Merge pull request #584 from myoung34/master
|
293
|
+
|
294
|
+
(gh-581) Fix syntax for mac address specification in Vagrantfile
|
295
|
+
```
|
296
|
+
* (GH-587) don't use 'nil?' - check whether forward_ssh_agent is true rather (f40f9a8b)
|
297
|
+
|
298
|
+
* (QENG-1530) beaker support to query aws instance/resource relationships (1003a0cc)
|
299
|
+
|
300
|
+
|
301
|
+
```
|
302
|
+
(QENG-1530) beaker support to query aws instance/resource relationships
|
303
|
+
|
304
|
+
- adding query support against ec2 vpc and security_group objects
|
305
|
+
```
|
306
|
+
* Merge pull request #572 from hajee/master (4129461f)
|
307
|
+
|
308
|
+
|
309
|
+
```
|
310
|
+
Merge pull request #572 from hajee/master
|
311
|
+
|
312
|
+
Make restarting sshd more robust on Redhat systems
|
313
|
+
```
|
314
|
+
* (GH-587) enable ssh agent forwarding for both vagrant and docker (a58fb6e4)
|
315
|
+
|
316
|
+
* (gh-585) Add support for vagrant 1.7.x (3aa080c8)
|
317
|
+
|
318
|
+
|
319
|
+
```
|
320
|
+
(gh-585) Add support for vagrant 1.7.x
|
321
|
+
|
322
|
+
As of version 1.7.x, vagrant will replace the default insecure keypair with a
|
323
|
+
randomly generated keypair on first 'vagrant up'. As a result the generated
|
324
|
+
ssh configs have changed and contain per-host private keys. Beaker was
|
325
|
+
breaking the path to these new private key files due to a substitution which
|
326
|
+
wasn't sufficiently constrained (the path to the private key now contains the
|
327
|
+
hostname, which was being replaced with the host's IP). This commit adds the
|
328
|
+
necessary constraint.
|
329
|
+
```
|
330
|
+
* (gh-577) Without the exact path to the service command, starting up a redhat vagrant box fails (99a4ef29)
|
331
|
+
|
332
|
+
|
333
|
+
```
|
334
|
+
(gh-577) Without the exact path to the service command, starting up a redhat vagrant box fails
|
335
|
+
|
336
|
+
Fixes #577
|
337
|
+
```
|
338
|
+
* (gh-581) Fix syntax for mac address specification in Vagrantfile (f1b9d51b)
|
339
|
+
|
340
|
+
* Merge pull request #560 from jlambert121/ignore_vendor (68090776)
|
341
|
+
|
342
|
+
|
343
|
+
```
|
344
|
+
Merge pull request #560 from jlambert121/ignore_vendor
|
345
|
+
|
346
|
+
(MAINT) exclude copying vendor dir to clients
|
347
|
+
```
|
348
|
+
* (PUP-3770) Fix copying module files to guest (a99c7288)
|
349
|
+
|
350
|
+
|
351
|
+
```
|
352
|
+
(PUP-3770) Fix copying module files to guest
|
353
|
+
|
354
|
+
In certain scenarios, no module files are copied to the guest. I have found this issue with modules residing under `/vagrant/module_path` and `/home/ci/.../module_path`.
|
355
|
+
|
356
|
+
The regexp generated was `/(?-mix:((\/|\A).bundle(\/|\z))|((\/|\A).git(\/|\z))|((\/|\A).idea(\/|\z))|((\/|\A).vagrant(\/|\z))|((\/|\A).vendor(\/|\z))|((\/|\A)acceptance(\/|\z))|((\/|\A)spec(\/|\z))|((\/|\A)tests(\/|\z))|((\/|\A)log(\/|\z))|((\/|\A).(\/|\z))|((\/|\A)..(\/|\z)))/`. I tested this pattern in http://rubular.com/ and found that indeed it matches all files under those directories.
|
357
|
+
|
358
|
+
The string substitution was not doing anything at all (`"\."` gets expanded to `.` instead of `\.`).
|
359
|
+
|
360
|
+
It was also only trying to replace the first `.` of each entry as it was using `String#sub` instead of `String#gsub`.
|
361
|
+
|
362
|
+
Once that was fixed, beaker worked.
|
363
|
+
```
|
364
|
+
* (gh-568) Throw descriptive exception when no snapshot exists (2496a73e)
|
365
|
+
|
366
|
+
* (gh-568) Allow snapshot option to be optional (d7b6d4e6)
|
367
|
+
|
368
|
+
* (gh-568) Allow snapshot option to be optional (838709b5)
|
369
|
+
|
370
|
+
* (MAINT) exclude copying vendor dir to clients (5fec6251)
|
371
|
+
|
372
|
+
* (QENG-1562) added AIO installation support for yum/apt on FOSS (eb4528c5)
|
373
|
+
|
374
|
+
* (QENG-1538) fixes EOS hack (55f7d2b2)
|
375
|
+
|
376
|
+
|
377
|
+
```
|
378
|
+
(QENG-1538) fixes EOS hack
|
379
|
+
|
380
|
+
In QENG-299, a hack was required to get around an issue w/EOS
|
381
|
+
for root ssh key setup. A change was submitted to the
|
382
|
+
sshkeys repo to fix this. This fix removes the hack, and
|
383
|
+
sets up the correct root ssh key procedure in Beaker for EOS
|
384
|
+
|
385
|
+
Conflicts:
|
386
|
+
spec/beaker/host_prebuilt_steps_spec.rb
|
387
|
+
```
|
388
|
+
### <a name = "beaker2.1.0">beaker2.1.0 - 17 Dec, 2014 (ec089b1a)
|
389
|
+
|
390
|
+
* (HISTORY) update beaker history for gem release 2.1.0 (ec089b1a)
|
70
391
|
|
71
392
|
* (GEM) update beaker version to 2.1.0 (747aacee)
|
72
393
|
|
data/Rakefile
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'open3'
|
1
2
|
|
2
3
|
task :default => [ 'test:spec' ]
|
3
4
|
|
@@ -14,7 +15,7 @@ task :history do
|
|
14
15
|
end
|
15
16
|
|
16
17
|
task :travis do
|
17
|
-
Rake::Task['yard'].invoke
|
18
|
+
Rake::Task['yard'].invoke
|
18
19
|
Rake::Task['spec'].invoke
|
19
20
|
end
|
20
21
|
|
@@ -23,10 +24,23 @@ namespace :test do
|
|
23
24
|
task :spec do
|
24
25
|
original_dir = Dir.pwd
|
25
26
|
Dir.chdir( File.expand_path(File.dirname(__FILE__)) )
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
exit_status = 1
|
28
|
+
output = ''
|
29
|
+
Open3.popen3("bundle exec rspec") {|stdin, stdout, stderr, wait_thr|
|
30
|
+
while line = stdout.gets
|
31
|
+
puts line
|
32
|
+
end
|
33
|
+
output = stdout
|
34
|
+
if not wait_thr.value.success?
|
35
|
+
fail "Failed to 'bundle exec rspec' (exit status: #{wait_thr.value})"
|
36
|
+
end
|
37
|
+
exit_status = wait_thr.value
|
38
|
+
}
|
39
|
+
if exit_status != /0/
|
40
|
+
#check for deprecation warnings
|
41
|
+
if output =~ /Deprecation Warnings/
|
42
|
+
fail "DEPRECATION WARNINGS in spec generation, please fix!"
|
43
|
+
end
|
30
44
|
end
|
31
45
|
Dir.chdir( original_dir )
|
32
46
|
end
|
@@ -100,7 +114,7 @@ namespace :docs do
|
|
100
114
|
output = `bundle exec yard doc`
|
101
115
|
puts output
|
102
116
|
if output =~ /\[warn\]|\[error\]/
|
103
|
-
|
117
|
+
fail "Errors/Warnings during yard documentation generation"
|
104
118
|
end
|
105
119
|
Dir.chdir( original_dir )
|
106
120
|
end
|
@@ -26,7 +26,7 @@ module Beaker
|
|
26
26
|
GitHubSig = 'github.com,207.97.227.239 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=='
|
27
27
|
|
28
28
|
# The directories in the module directory that will not be scp-ed to the test system when using `copy_module_to`
|
29
|
-
PUPPET_MODULE_INSTALL_IGNORE = ['.bundle', '.git', '.idea', '.vagrant', '.vendor', 'acceptance', 'spec', 'tests', 'log']
|
29
|
+
PUPPET_MODULE_INSTALL_IGNORE = ['.bundle', '.git', '.idea', '.vagrant', '.vendor', 'vendor', 'acceptance', 'spec', 'tests', 'log']
|
30
30
|
|
31
31
|
# @param [String] uri A uri in the format of <git uri>#<revision>
|
32
32
|
# the `git://`, `http://`, `https://`, and ssh
|
@@ -1113,6 +1113,50 @@ module Beaker
|
|
1113
1113
|
end
|
1114
1114
|
end
|
1115
1115
|
|
1116
|
+
# Install development repo of the puppet-agent on the given host
|
1117
|
+
#
|
1118
|
+
# @param [Host] host An object implementing {Beaker::Hosts}'s interface
|
1119
|
+
# @param [Hash{Symbol=>String}] opts An options hash
|
1120
|
+
# @option opts [String] :version The version of puppet-agent to install
|
1121
|
+
# @option opts [String] :copy_base_local Directory where puppet-agent artifact
|
1122
|
+
# will be stored locally
|
1123
|
+
# (default: 'tmp/repo_configs')
|
1124
|
+
# @option opts [String] :copy_dir_external Directory where puppet-agent
|
1125
|
+
# artifact will be pushed to on the external machine
|
1126
|
+
# (default: '/root')
|
1127
|
+
# @return nil
|
1128
|
+
def install_puppetagent_dev_repo( host, opts )
|
1129
|
+
opts[:copy_base_local] ||= File.join('tmp', 'repo_configs')
|
1130
|
+
opts[:copy_dir_external] ||= File.join('/', 'root')
|
1131
|
+
variant, version, arch, codename = host['platform'].to_array
|
1132
|
+
release_path = "#{options[:dev_builds_url]}/puppet-agent/#{opts[:version]}/artifacts/"
|
1133
|
+
copy_dir_local = File.join(opts[:copy_base_local], variant)
|
1134
|
+
onhost_copy_base = opts[:copy_dir_external]
|
1135
|
+
|
1136
|
+
case variant
|
1137
|
+
when /^(fedora|el|centos)$/
|
1138
|
+
release_path << "el/#{version}/products/#{arch}"
|
1139
|
+
release_file = "puppet-agent-#{opts[:version]}-1.#{arch}.rpm"
|
1140
|
+
when /^(debian|ubuntu|cumulus)$/
|
1141
|
+
release_path << "deb/#{codename}"
|
1142
|
+
release_file = "puppet-agent_#{opts[:version]}-1_#{arch}.deb"
|
1143
|
+
else
|
1144
|
+
raise "No repository installation step for #{variant} yet..."
|
1145
|
+
end
|
1146
|
+
|
1147
|
+
onhost_copied_file = File.join(onhost_copy_base, release_file)
|
1148
|
+
fetch_http_file( release_path, release_file, copy_dir_local)
|
1149
|
+
scp_to host, File.join(copy_dir_local, release_file), onhost_copy_base
|
1150
|
+
|
1151
|
+
case variant
|
1152
|
+
when /^(fedora|el|centos)$/
|
1153
|
+
on host, "rpm -ivh #{onhost_copied_file}"
|
1154
|
+
when /^(debian|ubuntu|cumulus)$/
|
1155
|
+
on host, "dpkg -i --force-all #{onhost_copied_file}"
|
1156
|
+
on host, "apt-get update"
|
1157
|
+
end
|
1158
|
+
end
|
1159
|
+
|
1116
1160
|
#Install Higgs up till the point where you need to continue installation in a web browser, defaults to execution
|
1117
1161
|
#on the master node.
|
1118
1162
|
#@param [Host] higgs_host The host to install Higgs on (supported on linux platform only)
|