add second job for more examples
This commit is contained in:
parent
96528a57bd
commit
850ac39e02
2 changed files with 55 additions and 3 deletions
|
@ -24,14 +24,14 @@ job "distro-vm" {
|
|||
|
||||
artifact {
|
||||
source = "https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-genericcloud-amd64.qcow2"
|
||||
destination = "local/debian.qcow2"
|
||||
destination = "local/distro-vm.qcow2"
|
||||
mode = "file"
|
||||
}
|
||||
|
||||
driver = "qemu"
|
||||
|
||||
config {
|
||||
image_path = "local/debian.qcow2"
|
||||
image_path = "local/distro-vm.qcow2"
|
||||
|
||||
accelerator = "kvm"
|
||||
|
||||
|
@ -43,7 +43,7 @@ job "distro-vm" {
|
|||
"-device",
|
||||
"virtio-net-pci,netdev=hn0,id=nic1",
|
||||
"-smbios",
|
||||
"type=1,serial=ds=nocloud-net;s=http://136.206.16.5:8000/",
|
||||
"type=1,serial=ds=nocloud-net;s=http://136.206.16.5:8000/distro-vm/",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
52
jobs/user-vms/mojito.hcl
Normal file
52
jobs/user-vms/mojito.hcl
Normal file
|
@ -0,0 +1,52 @@
|
|||
job "mojito-vm" {
|
||||
datacenters = ["aperture"]
|
||||
|
||||
group "mojito-vm" {
|
||||
|
||||
network {
|
||||
mode = "host"
|
||||
}
|
||||
|
||||
service {
|
||||
name = "mojito-vm"
|
||||
}
|
||||
|
||||
task "mojito-vm" {
|
||||
constraint {
|
||||
attribute = "${attr.unique.hostname}"
|
||||
value = "wheatley"
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 1000
|
||||
memory = 1024
|
||||
}
|
||||
|
||||
artifact {
|
||||
source = "https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-genericcloud-amd64.qcow2"
|
||||
destination = "local/mojito-vm.qcow2"
|
||||
mode = "file"
|
||||
}
|
||||
|
||||
driver = "qemu"
|
||||
|
||||
config {
|
||||
image_path = "local/mojito-vm.qcow2"
|
||||
|
||||
accelerator = "kvm"
|
||||
|
||||
drive_interface = "virtio"
|
||||
|
||||
args = [
|
||||
"-netdev",
|
||||
"bridge,id=hn0",
|
||||
"-device",
|
||||
"virtio-net-pci,netdev=hn0,id=nic1",
|
||||
"-smbios",
|
||||
"type=1,serial=ds=nocloud-net;s=http://136.206.16.5:8000/mojito-vm/",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue