From 56d125a5b0142717eb83155400e53809380b911b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=E2=80=9CNiols=E2=80=9D=20Jeannerod?= Date: Thu, 14 Nov 2024 13:12:06 +0100 Subject: [PATCH] Rework and cleanup provisioning script --- deployment/proxmox/provision.sh | 264 +++++++++++++++++++------------- 1 file changed, 155 insertions(+), 109 deletions(-) diff --git a/deployment/proxmox/provision.sh b/deployment/proxmox/provision.sh index 39d74ac..30f5f6f 100755 --- a/deployment/proxmox/provision.sh +++ b/deployment/proxmox/provision.sh @@ -1,32 +1,42 @@ #!/usr/bin/env sh set -euC +################################################################################ +## Constants + +readonly apiurl=https://192.168.51.81:8006/api2/json + +## FIXME: There seems to be a problem with file upload where the task is +## registered to `node051` no matter what node we are actually uploading to? For +## now, let us just use `node051` everywhere. +readonly node=node051 + +readonly tmpdir=/tmp/proxmox-provision-$RANDOM$RANDOM +mkdir $tmpdir + ################################################################################ ## Parse arguments username= password= -iso=result/iso/installer.iso sockets=1 cores=1 memory=2048 -vmid= +vmids= help () { cat <