From 458305fa48338de178739af2e3e86b85c0036a54 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 4 Mar 2021 10:40:21 +0200 Subject: feat: use configured defaults to unspecified machine attributes --- vmadm.md | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'vmadm.md') diff --git a/vmadm.md b/vmadm.md index d14fc3d..73b4a52 100644 --- a/vmadm.md +++ b/vmadm.md @@ -3,14 +3,7 @@ This section has some data files used by scenarios. ~~~{#smoke.yaml .file .yaml} -smoke: - ssh_key_files: - - .ssh/id_rsa.pub - base: base.qcow2 - image: smoke.qcow2 - image_size_gib: 5 - memory_mib: 2048 - cpus: 1 +smoke: {} ~~~ ~~~{#ssh_key .file} @@ -43,6 +36,16 @@ V4cecTlFJGBtUOUAAAAMbGl3QGV4b2xvYmUxAQIDBAUGBw== -----END OPENSSH PRIVATE KEY----- ~~~ +~~~{#config.yaml .file .yaml} +image_directory: images +default_base_image: base.qcow2 +default_image_gib: 5 +default_memory_mib: 2048 +default_cpus: 1 +authorized_keys: + - .ssh/id_rsa.pub +~~~ + ~~~{#ssh_key_pub .file} ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQChZ6mVuGLBpW7SarFU/Tu6TemquNxatbMUZuTk8RqVtbkvTKeWFZ5h5tntWPHgST8ykYFaIrr8eYuKQkKdBxHW7H8kejTNwRu/rDbRYX5wxTn4jw4RVopGTpxMlGrWeu5CkWPoLAhQtIzzUAnrDGp9sqG6P1G4ohI61wZMFQta9R2uNxXnnes+e2r4Y78GxmlQH/o0ouI8fBnsxRK0IoSfFs2LutO6wjyzR59FdC9TT7wufd5kXMRzxsmPGeXzNcaqvHGxBvRucGFclCkqSRwk3GNEpXZQhlCIoTIoRu0IPAp/430tlx9zJMhhwDlZsOOXRrFYpdWVMSTAAKECLSYx liw@exolobe1 ~~~ @@ -63,6 +66,7 @@ correctly. ~~~scenario given an installed vmadm given file init.yaml +given file config.yaml given file .ssh/id_rsa.pub from init_ssh_key_pub given file expected/init-test/meta-data from init-metadata given file expected/init-test/user-data from init-userdata @@ -70,10 +74,6 @@ when I invoke vmadm cloud-init --config config.yaml init.yaml actual then directories actual/init-test and expected/init-test are identical ~~~ -~~~{#config.yaml .file. yaml} -image_directory: images ---- - ~~~{#init.yaml .file .yaml} init-test: ssh_key_files: @@ -128,10 +128,11 @@ can be addressed by name. given an installed vmadm given a Debian 10 OpenStack cloud image given file smoke.yaml +given file config.yaml given file .ssh/id_rsa from ssh_key given file .ssh/id_rsa.pub from ssh_key_pub given file .ssh/config from ssh_config -when I invoke vmadm new smoke.yaml +when I invoke vmadm new --config config.yaml smoke.yaml when I invoke ssh -F .ssh/config debian@smoke hostname then stdout contains "smoke" when I invoke ssh -F .ssh/config debian@smoke df -h / -- cgit v1.2.1