From d62ebc01ab025038d7b6786e0bd5fef806bbb503 Mon Sep 17 00:00:00 2001 From: James Hackett Date: Wed, 15 Mar 2023 00:24:58 +0000 Subject: [PATCH] add half working vm job --- jobs/user-vms/distro.hcl | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 jobs/user-vms/distro.hcl diff --git a/jobs/user-vms/distro.hcl b/jobs/user-vms/distro.hcl new file mode 100755 index 0000000..a85f32c --- /dev/null +++ b/jobs/user-vms/distro.hcl @@ -0,0 +1,55 @@ +job "distro-vm" { + datacenters = ["aperture"] + + group "distro-vm" { + + network { + port "ssh" { + to = -1 + } + + mode = "host" + } + + service { + name = "distro-vm" + } + + task "distro-vm" { + resources { + cpu = 1000 + memory = 1024 + } + + artifact { + source = "https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-genericcloud-amd64.qcow2" + destination = "local/debian.qcow2" + mode = "file" + } + + driver = "qemu" + + config { + image_path = "local/debian.qcow2" + + accelerator = "kvm" + + drive_interface = "virtio" + + port_map { + ssh = 22 + } + + args = [ + "-net", + "nic,model=virtio", + "-net", + "user", + "-smbios", + "type=1,serial=ds=nocloud-net;s=http://10.10.0.4:8000/", + ] + } + } + } +} +