diff options
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 |