beaker-hostgenerator 1.1.9 → 1.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94c94c791caf70b7295b868ffdce1b3f4754c2e5
4
- data.tar.gz: f232a7d8052462634ffd27f177ed6ad4c93be187
3
+ metadata.gz: 0c562efcceaea000f8e2f134bd3c23e92ef712ec
4
+ data.tar.gz: d7b77a85511762068d8ba26e97f8b9f8dbe6bdb6
5
5
  SHA512:
6
- metadata.gz: 2a30e8019eb4336ece8b179d6d384b175ae28274d6c91dfa0beabc38010405279b8495e65af56d720fea501ee9ddb9c1537fb114cf744eec193b71c5303bacdb
7
- data.tar.gz: 793ac838de99e00b28aafdde352ef9846752e34edb314a0378e0f89cd89055e2ccb21146cfe02622e06d04982c3ce284a69c20cb2e627ceffaa50cedfc6c5af7
6
+ metadata.gz: 5963b93040fb980e87878af8f872340ce7a289e39bb03f2744fab3461861f81fc46a7a4e0578366ee5061f55e0f7c4925837c3dd88c154c234b7f313527c1e4b
7
+ data.tar.gz: 0e3a472485f6291dcc74f68ec527984952d52e5dfc38d0b56d9a4034aedf73fdce4e05f8f931231acc0a4bab3761f78ec083dbf7937ea0cc0d72d630acc0585b
@@ -165,6 +165,12 @@ module BeakerHostGenerator
165
165
  'platform' => 'el-5-x86_64',
166
166
  'packaging_platform' => 'el-5-x86_64'
167
167
  },
168
+ :docker => {
169
+ 'docker_image_commands' => [
170
+ 'yum install -y crontabs initscripts iproute openssl sysvinit-tools tar wget which',
171
+ 'sed -i -e "/mingetty/d" /etc/inittab'
172
+ ]
173
+ },
168
174
  :vmpooler => {
169
175
  'template' => 'centos-5-x86_64'
170
176
  }
@@ -183,6 +189,13 @@ module BeakerHostGenerator
183
189
  'platform' => 'el-6-x86_64',
184
190
  'packaging_platform' => 'el-6-x86_64'
185
191
  },
192
+ :docker => {
193
+ 'docker_image_commands' => [
194
+ 'rm -rf /var/run/network/*',
195
+ 'yum install -y crontabs initscripts iproute openssl sysvinit-tools tar wget which',
196
+ 'rm /etc/init/tty.conf'
197
+ ]
198
+ },
186
199
  :vmpooler => {
187
200
  'template' => 'centos-6-x86_64'
188
201
  }
@@ -192,6 +205,12 @@ module BeakerHostGenerator
192
205
  'platform' => 'el-7-x86_64',
193
206
  'packaging_platform' => 'el-7-x86_64'
194
207
  },
208
+ :docker => {
209
+ 'docker_image_commands' => [
210
+ 'systemctl mask getty@tty1.service',
211
+ 'yum install -y crontabs initscripts iproute openssl sysvinit-tools tar wget which ss'
212
+ ]
213
+ },
195
214
  :vmpooler => {
196
215
  'template' => 'centos-7-x86_64'
197
216
  }
@@ -270,6 +289,11 @@ module BeakerHostGenerator
270
289
  'platform' => 'debian-7-amd64',
271
290
  'packaging_platform' => 'debian-7-amd64'
272
291
  },
292
+ :docker => {
293
+ 'docker_image_commands' => [
294
+ 'apt-get update && apt-get install -y cron locales-all net-tools wget'
295
+ ],
296
+ },
273
297
  :vmpooler => {
274
298
  'template' => 'debian-7-x86_64'
275
299
  }
@@ -288,6 +312,13 @@ module BeakerHostGenerator
288
312
  'platform' => 'debian-8-amd64',
289
313
  'packaging_platform' => 'debian-8-amd64'
290
314
  },
315
+ :docker => {
316
+ 'docker_image_commands' => [
317
+ 'rm -f /usr/sbin/policy-rc.d',
318
+ 'systemctl mask getty@tty1.service getty-static.service',
319
+ 'apt-get update && apt-get install -y cron locales-all net-tools wget'
320
+ ]
321
+ },
291
322
  :vmpooler => {
292
323
  'template' => 'debian-8-x86_64'
293
324
  }
@@ -306,6 +337,13 @@ module BeakerHostGenerator
306
337
  'platform' => 'debian-9-amd64',
307
338
  'packaging_platform' => 'debian-9-amd64'
308
339
  },
340
+ :docker => {
341
+ 'docker_image_commands' => [
342
+ 'rm -f /usr/sbin/policy-rc.d',
343
+ 'systemctl mask getty@tty1.service getty-static.service',
344
+ 'apt-get update && apt-get install -y cron locales-all net-tools wget systemd-sysv'
345
+ ]
346
+ },
309
347
  :vmpooler => {
310
348
  'template' => 'debian-9-x86_64'
311
349
  }
@@ -877,6 +915,12 @@ module BeakerHostGenerator
877
915
  :general => {
878
916
  'platform' => 'ubuntu-12.04-amd64'
879
917
  },
918
+ :docker => {
919
+ 'docker_image_commands' => [
920
+ 'apt-get install -y net-tools wget',
921
+ 'locale-gen en_US.UTF-8'
922
+ ]
923
+ },
880
924
  :vmpooler => {
881
925
  'template' => 'ubuntu-1204-x86_64'
882
926
  }
@@ -895,6 +939,15 @@ module BeakerHostGenerator
895
939
  'platform' => 'ubuntu-14.04-amd64',
896
940
  'packaging_platform' => 'ubuntu-14.04-amd64'
897
941
  },
942
+ :docker => {
943
+ 'docker_image_commands' => [
944
+ 'rm /usr/sbin/policy-rc.d',
945
+ 'rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl',
946
+ 'apt-get install -y net-tools wget apt-transport-https',
947
+ 'locale-gen en_US.UTF-8',
948
+ 'echo LANG=en_US.UTF-8 > /etc/default/locale'
949
+ ]
950
+ },
898
951
  :vmpooler => {
899
952
  'template' => 'ubuntu-1404-x86_64'
900
953
  }
@@ -945,6 +998,13 @@ module BeakerHostGenerator
945
998
  'platform' => 'ubuntu-16.04-amd64',
946
999
  'packaging_platform' => 'ubuntu-16.04-amd64'
947
1000
  },
1001
+ :docker => {
1002
+ 'docker_image_commands' => [
1003
+ 'systemctl mask getty@tty1.service getty-static.service',
1004
+ 'apt-get install -y net-tools wget locales apt-transport-https',
1005
+ 'locale-gen en_US.UTF-8'
1006
+ ]
1007
+ },
948
1008
  :vmpooler => {
949
1009
  'template' => 'ubuntu-1604-x86_64'
950
1010
  }
@@ -46,6 +46,7 @@ module BeakerHostGenerator
46
46
  def self.builtin_hypervisors()
47
47
  {
48
48
  'vmpooler' => BeakerHostGenerator::Hypervisor::Vmpooler,
49
+ 'docker' => BeakerHostGenerator::Hypervisor::Docker,
49
50
  'abs' => BeakerHostGenerator::Hypervisor::ABS
50
51
  }
51
52
  end
@@ -95,4 +96,5 @@ end
95
96
  # hypervisor implementation files.
96
97
  require 'beaker-hostgenerator/hypervisor/unknown'
97
98
  require 'beaker-hostgenerator/hypervisor/vmpooler'
99
+ require 'beaker-hostgenerator/hypervisor/docker'
98
100
  require 'beaker-hostgenerator/hypervisor/abs'
@@ -0,0 +1,24 @@
1
+ require 'beaker-hostgenerator/data'
2
+ require 'beaker-hostgenerator/hypervisor'
3
+ require 'deep_merge'
4
+
5
+ module BeakerHostGenerator
6
+ module Hypervisor
7
+ class Docker < BeakerHostGenerator::Hypervisor::Interface
8
+ include BeakerHostGenerator::Data
9
+
10
+ def generate_node(node_info, base_config, bhg_version)
11
+ base_config['hypervisor'] = 'docker'
12
+ base_config['docker_cmd'] = ['/sbin/init']
13
+ base_config['image'] = node_info['ostype'].sub(/(\d)/, ':\1')
14
+ base_config['image'].sub!(/(\d{2})/, '\1.') if node_info['ostype'] =~ /^ubuntu/
15
+
16
+ platform = node_info['platform']
17
+ platform_info = get_platform_info(bhg_version, platform, :docker)
18
+ base_config.deep_merge! platform_info
19
+
20
+ return base_config
21
+ end
22
+ end
23
+ end
24
+ end
@@ -1,5 +1,5 @@
1
1
  module BeakerHostGenerator
2
2
  module Version
3
- STRING = '1.1.9'
3
+ STRING = '1.1.10'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-hostgenerator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Branan Purvine-Riley
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-03-29 00:00:00.000000000 Z
13
+ date: 2018-04-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: minitest
@@ -210,6 +210,7 @@ files:
210
210
  - lib/beaker-hostgenerator/generator.rb
211
211
  - lib/beaker-hostgenerator/hypervisor.rb
212
212
  - lib/beaker-hostgenerator/hypervisor/abs.rb
213
+ - lib/beaker-hostgenerator/hypervisor/docker.rb
213
214
  - lib/beaker-hostgenerator/hypervisor/unknown.rb
214
215
  - lib/beaker-hostgenerator/hypervisor/vmpooler.rb
215
216
  - lib/beaker-hostgenerator/parser.rb