From 87106652550f3d3d5961975ac62fb67434e955ed Mon Sep 17 00:00:00 2001 From: rblundon Date: Wed, 17 Sep 2025 22:48:49 -0500 Subject: [PATCH] updated packer files --- .../04-vm-templates/ubuntu-24.04.03/AGENTS.md | 32 +++++++++++++++++ ...proxmox.pkvars.hcl => proxmox.pkrvars.hcl} | 1 - .../ubuntu-24.04.03/ubuntu-24.04.pkrvars.hcl | 9 +++++ .../variables.pkrvars-xlarge.hcl | 35 ------------------- ....pkrvars.hcl => vm-large-plus.pkrvars.hcl} | 14 ++------ ...large.pkrvars.hcl => vm-large.pkrvars.hcl} | 14 ++------ ...dium.pkrvars.hcl => vm-medium.pkrvars.hcl} | 14 ++------ ...small.pkrvars.hcl => vm-small.pkrvars hcl} | 10 ------ ...pkrvars.hcl => vm-xlarge-plus.pkrvars.hcl} | 14 ++------ ...arge.pkrvars.hcl => vm-xlarge.pkrvars.hcl} | 14 ++------ 10 files changed, 51 insertions(+), 106 deletions(-) create mode 100644 infra-config/04-vm-templates/ubuntu-24.04.03/AGENTS.md rename infra-config/04-vm-templates/ubuntu-24.04.03/{proxmox.pkvars.hcl => proxmox.pkrvars.hcl} (94%) create mode 100755 infra-config/04-vm-templates/ubuntu-24.04.03/ubuntu-24.04.pkrvars.hcl delete mode 100755 infra-config/04-vm-templates/ubuntu-24.04.03/variables.pkrvars-xlarge.hcl rename infra-config/04-vm-templates/ubuntu-24.04.03/{fedora-42-large-plus.pkrvars.hcl => vm-large-plus.pkrvars.hcl} (54%) rename infra-config/04-vm-templates/ubuntu-24.04.03/{fedora-42-large.pkrvars.hcl => vm-large.pkrvars.hcl} (54%) rename infra-config/04-vm-templates/ubuntu-24.04.03/{fedora-42-medium.pkrvars.hcl => vm-medium.pkrvars.hcl} (54%) rename infra-config/04-vm-templates/ubuntu-24.04.03/{ubuntu-small.pkrvars.hcl => vm-small.pkrvars hcl} (62%) rename infra-config/04-vm-templates/ubuntu-24.04.03/{fedora-42-xlarge-plus.pkrvars.hcl => vm-xlarge-plus.pkrvars.hcl} (54%) rename infra-config/04-vm-templates/ubuntu-24.04.03/{fedora-42-xlarge.pkrvars.hcl => vm-xlarge.pkrvars.hcl} (54%) diff --git a/infra-config/04-vm-templates/ubuntu-24.04.03/AGENTS.md b/infra-config/04-vm-templates/ubuntu-24.04.03/AGENTS.md new file mode 100644 index 0000000..435fd6e --- /dev/null +++ b/infra-config/04-vm-templates/ubuntu-24.04.03/AGENTS.md @@ -0,0 +1,32 @@ +# AGENTS.md file + +## Project overview + +- Hashicorp Packer files to build Ubuntu 24.04.03 tmeplate VMs for Proxmox +- Cloudinit is used to configure the OS + +## Code style guidelines + +- Proxmox variables are set in proxmox.pkrvrs.hcl +- General OS variables are set in ubuntu-24.04.pkrvars.hcl +- VM specific variables are set in vm-[].pkrvars.hcl + +## Dev environment tips + +## Program excecution + +```bash +packer build -var-file ./ubuntu-24.04.pkrvars.hcl \ +-var-file ./proxmox.pkrvars.hcl \ +-var-file ./vm-small.pkrvars.hcl \ +-var 'ssh_password=' \ +-var 'proxmox_password=' . +``` + +## Testing instructions + +## PR instructions + +- Title format: [] + +## Security considerations diff --git a/infra-config/04-vm-templates/ubuntu-24.04.03/proxmox.pkvars.hcl b/infra-config/04-vm-templates/ubuntu-24.04.03/proxmox.pkrvars.hcl similarity index 94% rename from infra-config/04-vm-templates/ubuntu-24.04.03/proxmox.pkvars.hcl rename to infra-config/04-vm-templates/ubuntu-24.04.03/proxmox.pkrvars.hcl index b109202..63f5395 100644 --- a/infra-config/04-vm-templates/ubuntu-24.04.03/proxmox.pkvars.hcl +++ b/infra-config/04-vm-templates/ubuntu-24.04.03/proxmox.pkrvars.hcl @@ -5,7 +5,6 @@ # Credentials proxmox_username = "root@pam" -ssh_username = "wed" # Proxmox Objects proxmox_node = "fantasyland" diff --git a/infra-config/04-vm-templates/ubuntu-24.04.03/ubuntu-24.04.pkrvars.hcl b/infra-config/04-vm-templates/ubuntu-24.04.03/ubuntu-24.04.pkrvars.hcl new file mode 100755 index 0000000..49d440b --- /dev/null +++ b/infra-config/04-vm-templates/ubuntu-24.04.03/ubuntu-24.04.pkrvars.hcl @@ -0,0 +1,9 @@ +################################################################################## +# VARIABLES +################################################################################## + +# ISO Objects + +iso_file = "ubuntu-24.04.3-live-server-amd64.iso" +iso_checksum = "c3514bf0056180d09376462a7a1b4f213c1d6e8ea67fae5c25099c6fd3d8274b" +iso_checksum_type = "sha256" diff --git a/infra-config/04-vm-templates/ubuntu-24.04.03/variables.pkrvars-xlarge.hcl b/infra-config/04-vm-templates/ubuntu-24.04.03/variables.pkrvars-xlarge.hcl deleted file mode 100755 index 43b34ad..0000000 --- a/infra-config/04-vm-templates/ubuntu-24.04.03/variables.pkrvars-xlarge.hcl +++ /dev/null @@ -1,35 +0,0 @@ -################################################################################## -# VARIABLES -################################################################################## - -# HTTP Settings - -http_directory = "http" - -# Virtual Machine Settings - -vm_name = "centos9-large" -vm_guest_os_type = "centos8_64Guest" -vm_version = 19 -vm_firmware = "efi" -vm_cdrom_type = "sata" -vm_cpu_sockets = 1 -vm_cpu_cores = 1 -vm_mem_size = 2048 -vm_disk_size = 102400 -thin_provision = true -disk_eagerly_scrub = false -vm_disk_controller_type = ["pvscsi"] -vm_network_card = "vmxnet3" -vm_boot_wait = "5s" -ssh_username = "wed" -ssh_password = "1mag!ne3R" - -# ISO Objects - -iso_checksum = "ca03867ab88fbe565b91ae518e6f7f83debe6415234f29ff2cc5634052840ce8" -iso_checksum_type = "sha256" -iso_url = "https://mirror.rackspace.com/centos-stream/9-stream/BaseOS/x86_64/iso/CentOS-Stream-9-latest-x86_64-dvd1.iso" -# Scripts - -shell_scripts = ["scripts/cleanup.sh"] diff --git a/infra-config/04-vm-templates/ubuntu-24.04.03/fedora-42-large-plus.pkrvars.hcl b/infra-config/04-vm-templates/ubuntu-24.04.03/vm-large-plus.pkrvars.hcl similarity index 54% rename from infra-config/04-vm-templates/ubuntu-24.04.03/fedora-42-large-plus.pkrvars.hcl rename to infra-config/04-vm-templates/ubuntu-24.04.03/vm-large-plus.pkrvars.hcl index 3d63aa9..0e5a927 100755 --- a/infra-config/04-vm-templates/ubuntu-24.04.03/fedora-42-large-plus.pkrvars.hcl +++ b/infra-config/04-vm-templates/ubuntu-24.04.03/vm-large-plus.pkrvars.hcl @@ -5,8 +5,8 @@ # Virtual Machine Settings vm_boot_wait = "5s" -vm_name = "fedora-42-large-plus" -vm_id = "9104" +vm_name = "ubuntu-24.04-large-plus" +vm_id = "9204" vm_cpu_sockets = "1" vm_cpu_cores = "4" vm_mem_size = "4096" @@ -16,13 +16,3 @@ proxmox_bridge = "vmbr0" #proxmox_vlan = "71" ssh_username = "wed" - -# ISO Objects - -iso_file = "Fedora-Server-netinst-x86_64-42-1.1.iso" -iso_checksum = "231f3e0d1dc8f565c01a9f641b3d16c49cae44530074bc2047fe2373a721c82f" -iso_checksum_type = "sha256" - -# Scripts - -shell_scripts = ["scripts/cleanup.sh"] diff --git a/infra-config/04-vm-templates/ubuntu-24.04.03/fedora-42-large.pkrvars.hcl b/infra-config/04-vm-templates/ubuntu-24.04.03/vm-large.pkrvars.hcl similarity index 54% rename from infra-config/04-vm-templates/ubuntu-24.04.03/fedora-42-large.pkrvars.hcl rename to infra-config/04-vm-templates/ubuntu-24.04.03/vm-large.pkrvars.hcl index 3eb23e2..c7569c2 100755 --- a/infra-config/04-vm-templates/ubuntu-24.04.03/fedora-42-large.pkrvars.hcl +++ b/infra-config/04-vm-templates/ubuntu-24.04.03/vm-large.pkrvars.hcl @@ -5,8 +5,8 @@ # Virtual Machine Settings vm_boot_wait = "5s" -vm_name = "fedora-42-large" -vm_id = "9103" +vm_name = "ubuntu-24.04-large" +vm_id = "9203" vm_cpu_sockets = "1" vm_cpu_cores = "4" vm_mem_size = "4096" @@ -16,13 +16,3 @@ proxmox_bridge = "vmbr0" #proxmox_vlan = "71" ssh_username = "wed" - -# ISO Objects - -iso_file = "Fedora-Server-netinst-x86_64-42-1.1.iso" -iso_checksum = "231f3e0d1dc8f565c01a9f641b3d16c49cae44530074bc2047fe2373a721c82f" -iso_checksum_type = "sha256" - -# Scripts - -shell_scripts = ["scripts/cleanup.sh"] diff --git a/infra-config/04-vm-templates/ubuntu-24.04.03/fedora-42-medium.pkrvars.hcl b/infra-config/04-vm-templates/ubuntu-24.04.03/vm-medium.pkrvars.hcl similarity index 54% rename from infra-config/04-vm-templates/ubuntu-24.04.03/fedora-42-medium.pkrvars.hcl rename to infra-config/04-vm-templates/ubuntu-24.04.03/vm-medium.pkrvars.hcl index dfbc5e2..20e3cac 100755 --- a/infra-config/04-vm-templates/ubuntu-24.04.03/fedora-42-medium.pkrvars.hcl +++ b/infra-config/04-vm-templates/ubuntu-24.04.03/vm-medium.pkrvars.hcl @@ -5,8 +5,8 @@ # Virtual Machine Settings vm_boot_wait = "5s" -vm_name = "fedora-42-medium" -vm_id = "9102" +vm_name = "ubuntu-24.04-medium" +vm_id = "9202" vm_cpu_sockets = "1" vm_cpu_cores = "2" vm_mem_size = "4096" @@ -16,13 +16,3 @@ proxmox_bridge = "vmbr0" #proxmox_vlan = "71" ssh_username = "wed" - -# ISO Objects - -iso_file = "Fedora-Server-netinst-x86_64-42-1.1.iso" -iso_checksum = "231f3e0d1dc8f565c01a9f641b3d16c49cae44530074bc2047fe2373a721c82f" -iso_checksum_type = "sha256" - -# Scripts - -shell_scripts = ["scripts/cleanup.sh"] diff --git a/infra-config/04-vm-templates/ubuntu-24.04.03/ubuntu-small.pkrvars.hcl b/infra-config/04-vm-templates/ubuntu-24.04.03/vm-small.pkrvars hcl similarity index 62% rename from infra-config/04-vm-templates/ubuntu-24.04.03/ubuntu-small.pkrvars.hcl rename to infra-config/04-vm-templates/ubuntu-24.04.03/vm-small.pkrvars hcl index 95dc687..8f3a83b 100755 --- a/infra-config/04-vm-templates/ubuntu-24.04.03/ubuntu-small.pkrvars.hcl +++ b/infra-config/04-vm-templates/ubuntu-24.04.03/vm-small.pkrvars hcl @@ -15,13 +15,3 @@ vm_disk_size = "8" proxmox_bridge = "vmbr0" ssh_username = "wed" - -# ISO Objects - -iso_file = "ubuntu-24.04.3-live-server-amd64.iso" -iso_checksum = "c3514bf0056180d09376462a7a1b4f213c1d6e8ea67fae5c25099c6fd3d8274b" -iso_checksum_type = "sha256" - -# Scripts - -#shell_scripts = ["scripts/cleanup.sh"] diff --git a/infra-config/04-vm-templates/ubuntu-24.04.03/fedora-42-xlarge-plus.pkrvars.hcl b/infra-config/04-vm-templates/ubuntu-24.04.03/vm-xlarge-plus.pkrvars.hcl similarity index 54% rename from infra-config/04-vm-templates/ubuntu-24.04.03/fedora-42-xlarge-plus.pkrvars.hcl rename to infra-config/04-vm-templates/ubuntu-24.04.03/vm-xlarge-plus.pkrvars.hcl index 928f26a..3c788c9 100755 --- a/infra-config/04-vm-templates/ubuntu-24.04.03/fedora-42-xlarge-plus.pkrvars.hcl +++ b/infra-config/04-vm-templates/ubuntu-24.04.03/vm-xlarge-plus.pkrvars.hcl @@ -5,8 +5,8 @@ # Virtual Machine Settings vm_boot_wait = "5s" -vm_name = "fedora-42-xlarge-plus" -vm_id = "9106" +vm_name = "ubuntu-24.04-xlarge-plus" +vm_id = "9206" vm_cpu_sockets = "1" vm_cpu_cores = "4" vm_mem_size = "8192" @@ -16,13 +16,3 @@ proxmox_bridge = "vmbr0" #proxmox_vlan = "71" ssh_username = "wed" - -# ISO Objects - -iso_file = "Fedora-Server-netinst-x86_64-42-1.1.iso" -iso_checksum = "231f3e0d1dc8f565c01a9f641b3d16c49cae44530074bc2047fe2373a721c82f" -iso_checksum_type = "sha256" - -# Scripts - -shell_scripts = ["scripts/cleanup.sh"] diff --git a/infra-config/04-vm-templates/ubuntu-24.04.03/fedora-42-xlarge.pkrvars.hcl b/infra-config/04-vm-templates/ubuntu-24.04.03/vm-xlarge.pkrvars.hcl similarity index 54% rename from infra-config/04-vm-templates/ubuntu-24.04.03/fedora-42-xlarge.pkrvars.hcl rename to infra-config/04-vm-templates/ubuntu-24.04.03/vm-xlarge.pkrvars.hcl index d1ebd2f..2e00a4e 100755 --- a/infra-config/04-vm-templates/ubuntu-24.04.03/fedora-42-xlarge.pkrvars.hcl +++ b/infra-config/04-vm-templates/ubuntu-24.04.03/vm-xlarge.pkrvars.hcl @@ -5,8 +5,8 @@ # Virtual Machine Settings vm_boot_wait = "5s" -vm_name = "fedora-42-xlarge" -vm_id = "9105" +vm_name = "ubuntu-24.04-xlarge" +vm_id = "9205" vm_cpu_sockets = "1" vm_cpu_cores = "4" vm_mem_size = "8192" @@ -16,13 +16,3 @@ proxmox_bridge = "vmbr0" #proxmox_vlan = "71" ssh_username = "wed" - -# ISO Objects - -iso_file = "Fedora-Server-netinst-x86_64-42-1.1.iso" -iso_checksum = "231f3e0d1dc8f565c01a9f641b3d16c49cae44530074bc2047fe2373a721c82f" -iso_checksum_type = "sha256" - -# Scripts - -shell_scripts = ["scripts/cleanup.sh"]