gogetit 0.18.2 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/gogetit/cli.rb +0 -2
- data/lib/gogetit/version.rb +1 -1
- data/lib/providers/lxd.rb +18 -12
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: daf854e8f4d478ebf3e65b57eadc3e31e438cf879d80ff547397eaf618da64d1
|
|
4
|
+
data.tar.gz: 6dc5d664597f59dbec78653052ed86a1cce702662dec9c076058bdf558aef1b5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cb4e8cf72354ce5f34a08de27e533923574ff051f0b58bbcfddffba4e3cf2269764564b1e666d1a024cfefc369e80d99e73763400d03374e5547d36639df068a
|
|
7
|
+
data.tar.gz: 7b6a6bd0d4ce389538938dde03e289b9ecb7b12bd881f57397842ce757aaed6cde623afdb4f55b4bfbdd3cc1f73fede7713c7d1592aa1a25b95d3516d4d0ea73
|
data/README.md
CHANGED
|
@@ -79,6 +79,7 @@ gogetit create lxd01 --no-maas -f lxd_without_maas_vlans.yml
|
|
|
79
79
|
|
|
80
80
|
# to install MAAS on a lxc container using 'no-maas' option
|
|
81
81
|
gogetit create lxd01 --no-maas -f lxd_without_maas_vlans.yml --maas-on-lxc
|
|
82
|
+
# --maas-on-lxc can be used alone
|
|
82
83
|
|
|
83
84
|
gogetit destroy lxd01
|
|
84
85
|
|
data/lib/gogetit/cli.rb
CHANGED
|
@@ -85,8 +85,6 @@ module Gogetit
|
|
|
85
85
|
if options['no-maas'] and (options['vlans'] or options['ipaddresses'])
|
|
86
86
|
abort("'no-maas' and 'file' have to be set together.") \
|
|
87
87
|
if options['no-maas'] ^ !!options['file']
|
|
88
|
-
abort("'maas-on-lxc' has to be set with 'no-maas'.") \
|
|
89
|
-
if options['maas-on-lxc'] and !options['no-maas']
|
|
90
88
|
abort("'distro' has to be set with libvirt provider.") \
|
|
91
89
|
if options['distro'] and options['provider'] == 'lxd'
|
|
92
90
|
abort("'alias' has to be set with lxd provider.") \
|
data/lib/gogetit/version.rb
CHANGED
data/lib/providers/lxd.rb
CHANGED
|
@@ -53,9 +53,6 @@ module Gogetit
|
|
|
53
53
|
|
|
54
54
|
if options['no-maas']
|
|
55
55
|
args[:config][:"user.user-data"] = {}
|
|
56
|
-
if options['maas-on-lxc']
|
|
57
|
-
args[:config][:"security.privileged"] = "true"
|
|
58
|
-
end
|
|
59
56
|
else
|
|
60
57
|
sshkeys = maas.get_sshkeys
|
|
61
58
|
pkg_repos = maas.get_package_repos
|
|
@@ -76,6 +73,10 @@ module Gogetit
|
|
|
76
73
|
args[:config][:"user.user-data"]['maas'] = true
|
|
77
74
|
end
|
|
78
75
|
|
|
76
|
+
if options['maas-on-lxc']
|
|
77
|
+
args[:config][:"security.privileged"] = "true"
|
|
78
|
+
end
|
|
79
|
+
|
|
79
80
|
if options['lxd-in-lxd']
|
|
80
81
|
args[:config][:"security.nesting"] = "true"
|
|
81
82
|
end
|
|
@@ -283,14 +284,6 @@ echo \"RevokedKeys #{config[:cloud_init][:ssh_ca_public_key][:revocation_path]}\
|
|
|
283
284
|
if options['no-maas']
|
|
284
285
|
args[:devices] = YAML.load_file(options['file'])['devices']
|
|
285
286
|
|
|
286
|
-
# https://docs.maas.io/2.4/en/installconfig-lxd-install
|
|
287
|
-
for i in 0..7
|
|
288
|
-
i = i.to_s
|
|
289
|
-
args[:devices]["loop" + i] = {}
|
|
290
|
-
args[:devices]["loop" + i]["path"] = "/dev/loop" + i
|
|
291
|
-
args[:devices]["loop" + i]["type"] = "unix-block"
|
|
292
|
-
end
|
|
293
|
-
|
|
294
287
|
# Now, LXD API can handle integer as a value of a map
|
|
295
288
|
args[:devices].each do |k, v|
|
|
296
289
|
v.each do |kk, vv|
|
|
@@ -363,6 +356,16 @@ echo \"RevokedKeys #{config[:cloud_init][:ssh_ca_public_key][:revocation_path]}\
|
|
|
363
356
|
}
|
|
364
357
|
end
|
|
365
358
|
|
|
359
|
+
if options['maas-on-lxc']
|
|
360
|
+
# https://docs.maas.io/2.4/en/installconfig-lxd-install
|
|
361
|
+
for i in 0..7
|
|
362
|
+
i = i.to_s
|
|
363
|
+
args[:devices]["loop" + i] = {}
|
|
364
|
+
args[:devices]["loop" + i]["path"] = "/dev/loop" + i
|
|
365
|
+
args[:devices]["loop" + i]["type"] = "unix-block"
|
|
366
|
+
end
|
|
367
|
+
end
|
|
368
|
+
|
|
366
369
|
return args
|
|
367
370
|
end
|
|
368
371
|
|
|
@@ -405,6 +408,9 @@ echo \"RevokedKeys #{config[:cloud_init][:ssh_ca_public_key][:revocation_path]}\
|
|
|
405
408
|
def create(name, options = {})
|
|
406
409
|
logger.info("Calling <#{__method__.to_s}>")
|
|
407
410
|
|
|
411
|
+
# options from the kitchen driver have keys as symbol
|
|
412
|
+
Hashie.stringify_keys! options
|
|
413
|
+
|
|
408
414
|
abort("Container #{name} already exists!") \
|
|
409
415
|
if container_exists?(name)
|
|
410
416
|
|
|
@@ -432,7 +438,7 @@ echo \"RevokedKeys #{config[:cloud_init][:ssh_ca_public_key][:revocation_path]}\
|
|
|
432
438
|
|
|
433
439
|
# https://github.com/jeffshantz/hyperkit/blob/master/lib/hyperkit/client/containers.rb#L240
|
|
434
440
|
# Adding configurations that are necessary for shipping MAAS on lxc
|
|
435
|
-
if options['
|
|
441
|
+
if options['maas-on-lxc']
|
|
436
442
|
container.config = container.config.to_hash
|
|
437
443
|
# https://docs.maas.io/2.4/en/installconfig-lxd-install
|
|
438
444
|
container.config[:"raw.lxc"] = "\
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gogetit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.19.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Don Draper
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-06-
|
|
11
|
+
date: 2018-06-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|