From aa11e479718aaa79aceb76f4d9760f3e22c70fa8 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 29 Jan 2022 13:45:29 +0200 Subject: feat: allow start, stop, new, delete on multiple specs at once Sponsored-by: author --- vmadm.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) (limited to 'vmadm.md') diff --git a/vmadm.md b/vmadm.md index 8bfd476..aec706f 100644 --- a/vmadm.md +++ b/vmadm.md @@ -22,6 +22,10 @@ This section has some data files used by scenarios. smoke: {} ~~~ +~~~{#other.yaml .file .yaml} +other: {} +~~~ + ~~~{#ssh_key .file} -----BEGIN OPENSSH PRIVATE KEY----- b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcn @@ -271,6 +275,63 @@ when I run vmadm delete --config config.yaml smoke.yaml + +# Manage several specs at once + +This scenario verifies that vmadm can manage virtual machines from +several specifications at once. + +First some setup. + +~~~scenario +given an installed vmadm +given a Debian 10 OpenStack cloud image +given file smoke.yaml +given file other.yaml +given file config.yaml +given file ca_key +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 +given file .ssh/known_hosts from known_hosts +when I run chmod -R u=rwX,go= .ssh +~~~ + +Then we create the VMs. We don't verify that each works, beyond that +we can log in. + +~~~scenario +when I run vmadm new --config config.yaml smoke.yaml other.yaml +when I run ssh -F .ssh/config debian@smoke hostname +then stdout contains "smoke" +when I run ssh -F .ssh/config debian@other hostname +then stdout contains "other" +~~~ + +Then we shut them all down. + +~~~scenario +when I run vmadm shutdown --config config.yaml smoke.yaml other.yaml +~~~ + +Then we start them back up again and verify we can log in. + +~~~scenario +when I run vmadm start --config config.yaml smoke.yaml other.yaml +when I run ssh -F .ssh/config debian@smoke hostname +when I run ssh -F .ssh/config debian@other hostname +~~~ + +Finally, we delete them. + +~~~scenario +when I run vmadm delete --config config.yaml smoke.yaml other.yaml +~~~ + + + + + # Give useful error if image for new VM already exists This scenario verifies that if the VM image file already exists, vmadm -- cgit v1.2.1