diff options
author | Alex Auvolat <alex@adnab.me> | 2022-05-30 16:36:17 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-05-30 16:36:17 +0200 |
commit | 4ec5cc43d4111150fc0b44b6a0afec2e07f8cc8d (patch) | |
tree | c9619903c6e326c150f3c2ef29760849a3fbb106 /app/drone-ci/deploy/runner-vm.hcl | |
parent | d47d4e93ab8682710e80eec8c7c9d6a7d2f14202 (diff) | |
download | nixcfg-4ec5cc43d4111150fc0b44b6a0afec2e07f8cc8d.tar.gz nixcfg-4ec5cc43d4111150fc0b44b6a0afec2e07f8cc8d.zip |
Drone runner VM almost works
Diffstat (limited to 'app/drone-ci/deploy/runner-vm.hcl')
-rw-r--r-- | app/drone-ci/deploy/runner-vm.hcl | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/app/drone-ci/deploy/runner-vm.hcl b/app/drone-ci/deploy/runner-vm.hcl index 28beeb8..5271b05 100644 --- a/app/drone-ci/deploy/runner-vm.hcl +++ b/app/drone-ci/deploy/runner-vm.hcl @@ -4,7 +4,15 @@ job "drone-runner" { group "runner-vm" { network { - port "ssh" { } + port "ssh" { + static = 22544 + } + } + + constraint { + attribute = "${attr.unique.hostname}" + operator = "=" + value = "caribou" } task "drone-runner-vm" { @@ -14,7 +22,9 @@ job "drone-runner" { image_path = "local/drone-runner.qcow2" accelerator = "kvm" args = [ - "-object", "secret,id=dronesecret0,file=secrets/secret_env" + "-drive", "index=1,file=fat:rw:/var/lib/nomad/alloc/${NOMAD_ALLOC_ID}/${NOMAD_TASK_NAME}/secrets,format=raw,media=disk", + "-device", "e1000,netdev=user.0", + "-netdev", "user,id=user.0,hostfwd=tcp::${NOMAD_PORT_ssh}-:22", ] port_map { ssh = 22 |