kitchen-lxd_cli 0.1.0 → 0.1.1
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 -1
- data/lib/kitchen/driver/lxd_cli.rb +3 -15
- data/lib/kitchen/driver/lxd_cli_version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52485f02dbbda394899978f838d672451bdde23b
|
4
|
+
data.tar.gz: 47b30148b6eea206fee2e933479273d00f1aac3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3993508b35e822506216eeb85e61414712548c2450417f3f9a1cef4835e08f2f1eaf2fdb06f0b9a86d2bf6d5a11e47c22e7e49d2470476b8b8a16ee360dd8afb
|
7
|
+
data.tar.gz: aa25788d28a0d516d311f11b21569ae28c7726b7cc4bee8372899d5d5161a676b33642ac3793486f2aaa0bfe89b23c70c10f095076c30426b2858765a6dea462
|
data/README.md
CHANGED
@@ -144,7 +144,7 @@ Default is Nil. See LXC documentation but a lxc profile can be specified. Whic
|
|
144
144
|
|
145
145
|
config:
|
146
146
|
|
147
|
-
Default is Nil. See LXC documentation but a lxc config container key/value can be specified. [LXC Container Config Options](https://github.com/lxc/lxd/blob/master/specs/configuration.md#keyvalue-configuration-1)
|
147
|
+
Default is Nil. See LXC documentation but a lxc config container key/value can be specified. [LXC Container Config Options](https://github.com/lxc/lxd/blob/master/specs/configuration.md#keyvalue-configuration-1). Again option is passed to "lxc init" command. NOTE: I haven't successfully set more than 1 config option via "lxc init" command, so still need to figure that out, or rewrite this piece.
|
148
148
|
|
149
149
|
domain_name:
|
150
150
|
|
@@ -97,10 +97,12 @@ module Kitchen
|
|
97
97
|
if $?.to_i == 0
|
98
98
|
debug("Image #{image_name} exists")
|
99
99
|
else
|
100
|
-
info("Image #{image_name} doesn't exist, creating now.
|
100
|
+
info("Image #{image_name} doesn't exist, creating now.")
|
101
101
|
image = get_image_info
|
102
102
|
image_os = config[:image_os] ||= image[:os]
|
103
103
|
image_release = config[:image_release] ||= image[:release]
|
104
|
+
info("This may take a little while. If image fails, or you want to see progress bar, stop this and run the following command manually:")
|
105
|
+
info("lxd-images import #{image_os} #{image_release} --alias #{image_name}")
|
104
106
|
run_local_command("lxd-images import #{image_os} #{image_release} --alias #{image_name}")
|
105
107
|
end
|
106
108
|
return image_name
|
@@ -254,20 +256,6 @@ module Kitchen
|
|
254
256
|
debug("Found #{path}")
|
255
257
|
end
|
256
258
|
|
257
|
-
def setup_ssh_access
|
258
|
-
info("Setting up public key #{config[:public_key_path]} on #{instance.name}")
|
259
|
-
wait_for_path("/root/.ssh")
|
260
|
-
|
261
|
-
begin
|
262
|
-
debug("Uploading public key...")
|
263
|
-
`lxc file push #{config[:public_key_path]} #{instance.name}/root/.ssh/authorized_keys 2> /dev/null`
|
264
|
-
break if $?.to_i == 0
|
265
|
-
sleep 0.3
|
266
|
-
end while true
|
267
|
-
|
268
|
-
debug("Finished Copying public key from #{config[:public_key_path]} to #{instance.name}")
|
269
|
-
end
|
270
|
-
|
271
259
|
def run_lxc_command(cmd)
|
272
260
|
run_local_command("lxc #{cmd}") if cmd
|
273
261
|
end
|