From 40f951a3adbbba94942e007434946a2192eb8989 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 25 Jul 2021 10:45:27 +0300 Subject: feat: allow use to add a VM on virtual networks Sponsored-by: author --- vmadm.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) (limited to 'vmadm.md') diff --git a/vmadm.md b/vmadm.md index 34ba73f..8c29443 100644 --- a/vmadm.md +++ b/vmadm.md @@ -50,6 +50,8 @@ default_memory_mib: 2048 default_cpus: 1 default_generate_host_certificate: true default_autostart: true +default_networks: +- default ca_key: ca_key authorized_keys: - ~/.ssh/id_rsa.pub @@ -64,6 +66,9 @@ authorized_keys: "default_cpus": 1, "default_generate_host_certificate": true, "default_autostart": true, + "default_networks": [ + "default" + ], "ca_key": "ca_key", "authorized_keys": [ "~/.ssh/id_rsa.pub" @@ -71,6 +76,39 @@ authorized_keys: } ~~~ +~~~{#spec.yaml .file .yaml} +foo: + networks: ["lan", "wan"] +~~~ + +~~~{#fullspec.json .file .json} +[ + { + "name": "foo", + "ssh_keys": [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQChZ6mVuGLBpW7SarFU/Tu6TemquNxatbMUZuTk8RqVtbkvTKeWFZ5h5tntWPHgST8ykYFaIrr8eYuKQkKdBxHW7H8kejTNwRu/rDbRYX5wxTn4jw4RVopGTpxMlGrWeu5CkWPoLAhQtIzzUAnrDGp9sqG6P1G4ohI61wZMFQta9R2uNxXnnes+e2r4Y78GxmlQH/o0ouI8fBnsxRK0IoSfFs2LutO6wjyzR59FdC9TT7wufd5kXMRzxsmPGeXzNcaqvHGxBvRucGFclCkqSRwk3GNEpXZQhlCIoTIoRu0IPAp/430tlx9zJMhhwDlZsOOXRrFYpdWVMSTAAKECLSYx liw@exolobe1" + ], + "networks": ["lan", "wan"], + "rsa_host_key": null, + "rsa_host_cert": null, + "dsa_host_key": null, + "dsa_host_cert": null, + "ecdsa_host_key": null, + "ecdsa_host_cert": null, + "ed25519_host_key": null, + "ed25519_host_cert": null, + "base": "~/base.qcow2", + "image": "~/images/foo.qcow2", + "image_size_gib": 5, + "memory_mib": 2048, + "cpus": 1, + "generate_host_certificate": true, + "autostart": true, + "ca_key": "ca_key" + } +] +~~~ + ~~~{#ssh_key_pub .file} ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQChZ6mVuGLBpW7SarFU/Tu6TemquNxatbMUZuTk8RqVtbkvTKeWFZ5h5tntWPHgST8ykYFaIrr8eYuKQkKdBxHW7H8kejTNwRu/rDbRYX5wxTn4jw4RVopGTpxMlGrWeu5CkWPoLAhQtIzzUAnrDGp9sqG6P1G4ohI61wZMFQta9R2uNxXnnes+e2r4Y78GxmlQH/o0ouI8fBnsxRK0IoSfFs2LutO6wjyzR59FdC9TT7wufd5kXMRzxsmPGeXzNcaqvHGxBvRucGFclCkqSRwk3GNEpXZQhlCIoTIoRu0IPAp/430tlx9zJMhhwDlZsOOXRrFYpdWVMSTAAKECLSYx liw@exolobe1 ~~~ @@ -231,6 +269,25 @@ when I run vmadm config then stdout, as JSON, matches file fullconfig.json with tilde expansion ~~~ +# Dump specification + +This scenario verifies that vmadm can show the actual specification it +will use. + +~~~scenario +given an installed vmadm +given a Debian 10 OpenStack cloud image +given file .config/vmadm/config.yaml from 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 +given file spec.yaml +given file fullspec.json +when I run vmadm spec spec.yaml +then stdout, as JSON, matches file fullspec.json with tilde expansion +~~~ # Colophon -- cgit v1.2.1