From 4643607a412956dc493f8a017add14b25cf8edd4 Mon Sep 17 00:00:00 2001 From: stb Date: Fri, 26 Jul 2024 19:34:21 +0200 Subject: [PATCH] WIP --- authorized_keys | 15 +++++++++++++++ build-forgejorunner-template.sh | 5 ++++- clone-forgejo-runner.sh | 5 +++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 authorized_keys create mode 100644 clone-forgejo-runner.sh diff --git a/authorized_keys b/authorized_keys new file mode 100644 index 0000000..b144374 --- /dev/null +++ b/authorized_keys @@ -0,0 +1,15 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGWXk9N9GoDyvaB0mnX448IvzKKsMv0eFZKvjqmsJ3In djerun@chaos.ferrum.local +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINQsu6WSAXsF45wGmw2spQUWopsgioUuFI8hKLBW/WVk djerun@chaos-noc.ferrum.local +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOqCxniUEAZAYqL5zbisFfYcQx+7iDRrMo4Pz4uWXq5b julian@01_id_ed25519 +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIBQgnQAq6FUSDK8bxtYPjx3oRCAKG+xy9J3Gas2ztJk jannik@Magrathea.local +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPZtJwNPEIfNsAxBfWgxAeoKX1ajORPvs6L5S+qipJ7J dario@ccchh +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdk3FLQRoCWxdOxg4kHcPqAu3QQOs/rY9na2Al2ilGl yuri@violet +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJEvM35w+UaSpDTuaG5pGPgfHcfwscr+wSZN9Z5Jle82 yuri@kiara +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINHNGDzZqmiFUH75oq1npZTyxV0B7eSJES/29UJxTXBc max@iridium +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMhWTkvLI/rp6eyTemuFZRbt2xxRtal7fu668nnb/ekU haegar@aurora +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEgVuX9phyXImxqvof+49UXhiSQ+VGizeU4LrPcZY1Hy stb@lassitu.de 20230418 +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBxujzHK49IBtYKPgnTCDQEiIxgzzlQ846tmU+6TcMIi hansenerd +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKvtvYCvesgZ9ajGFNHF6M9xQ08kdV7gj++djup5vPL1 hansenerd@melpomene +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOWWxkGFje1CJbZTB2Kv8hxZpvRR8qyw2IarRIHnQj3+ echtnurich@kessoku +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOgfWcCrsVSXvYEssbfMOy2DnfkGSx+ZRnPLtjVNSxbf c6ristian +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIKXtM0hl6eBa1Jcrc35MC2AsF2IrNiOm+/WlsqputWW echtnurich@sick-hack diff --git a/build-forgejorunner-template.sh b/build-forgejorunner-template.sh index 049abc7..288c8b9 100755 --- a/build-forgejorunner-template.sh +++ b/build-forgejorunner-template.sh @@ -20,6 +20,7 @@ vm_storage="local-zfs" #scp ${builder_host}:${runner_image} . #wget --output-document=forgejo_runner ${forgejo_runner_url} +wget -N https://git.hamburg.ccc.de/CCCHH/infrastructure-authorized-keys/raw/branch/trunk/authorized_keys virt-customize -a ${runner_image} \ --update \ @@ -38,6 +39,7 @@ qm create ${vm_id} --name "${vm_name}" --memory 2048 --net0 virtio,bridge=${vm_b qm importdisk ${vm_id} ${runner_image} ${vm_storage} +qm set ${vm_id} --scsihw virtio-scsi-pci --scsi0 ${vm_storage}:vm-${vm_id}-disk-0,ssd=1,discard=on qm set ${vm_id} --ide2 ${vm_storage}:cloudinit qm set ${vm_id} --boot c --bootdisk scsi0 qm set ${vm_id} --machine q35 @@ -49,7 +51,8 @@ qm set ${vm_id} --agent 1,fstrim_cloned_disks=1 qm set ${vm_id} --ciuser chaos qm set ${vm_id} --sshkeys ./authorized_keys qm set ${vm_id} --ipconfig0 ip=dhcp -qm set ${vm_id} --tags ubuntu2404 +qm set ${vm_id} --tags ubuntu24.04 qm cloudinit update ${vm_id} qm template ${vm_id} + echo "*** Done ***" diff --git a/clone-forgejo-runner.sh b/clone-forgejo-runner.sh new file mode 100644 index 0000000..7182a28 --- /dev/null +++ b/clone-forgejo-runner.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +# +# Clone the template VM and register the new VM as a Forgejo runner +#