From 2a4fd1578b7d96e48a20fceaf57884368f106652 Mon Sep 17 00:00:00 2001 From: Maximilian Rink Date: Thu, 4 Jul 2024 10:50:00 +0200 Subject: [PATCH] Add 2404 targets to the OVA and RAW builder, also 2204 to the raw builder --- .../ansible/roles/sysprep/tasks/debian.yml | 11 ++ .../ova/linux/ubuntu/http/24.04.efi/meta-data | 0 .../ova/linux/ubuntu/http/24.04.efi/user-data | 117 ++++++++++++++++++ images/capi/packer/ova/packer-node.json | 11 ++ images/capi/packer/ova/ubuntu-2404-efi.json | 18 +++ .../raw/linux/ubuntu/http/22.04.efi/meta-data | 0 .../raw/linux/ubuntu/http/22.04.efi/user-data | 111 +++++++++++++++++ .../raw/linux/ubuntu/http/22.04/meta-data | 0 .../raw/linux/ubuntu/http/22.04/user-data | 84 +++++++++++++ .../raw/linux/ubuntu/http/24.04.efi/meta-data | 0 .../raw/linux/ubuntu/http/24.04.efi/user-data | 111 +++++++++++++++++ images/capi/packer/raw/packer.json | 9 +- .../capi/packer/raw/raw-ubuntu-2004-efi.json | 2 + images/capi/packer/raw/raw-ubuntu-2004.json | 2 + .../capi/packer/raw/raw-ubuntu-2204-efi.json | 19 +++ images/capi/packer/raw/raw-ubuntu-2204.json | 18 +++ .../capi/packer/raw/raw-ubuntu-2404-efi.json | 19 +++ images/capi/packer/raw/raw-ubuntu-2404.json | 18 +++ 18 files changed, 549 insertions(+), 1 deletion(-) create mode 100644 images/capi/packer/ova/linux/ubuntu/http/24.04.efi/meta-data create mode 100644 images/capi/packer/ova/linux/ubuntu/http/24.04.efi/user-data create mode 100644 images/capi/packer/ova/ubuntu-2404-efi.json create mode 100644 images/capi/packer/raw/linux/ubuntu/http/22.04.efi/meta-data create mode 100644 images/capi/packer/raw/linux/ubuntu/http/22.04.efi/user-data create mode 100644 images/capi/packer/raw/linux/ubuntu/http/22.04/meta-data create mode 100644 images/capi/packer/raw/linux/ubuntu/http/22.04/user-data create mode 100644 images/capi/packer/raw/linux/ubuntu/http/24.04.efi/meta-data create mode 100644 images/capi/packer/raw/linux/ubuntu/http/24.04.efi/user-data create mode 100644 images/capi/packer/raw/raw-ubuntu-2204-efi.json create mode 100644 images/capi/packer/raw/raw-ubuntu-2204.json create mode 100644 images/capi/packer/raw/raw-ubuntu-2404-efi.json create mode 100644 images/capi/packer/raw/raw-ubuntu-2404.json diff --git a/images/capi/ansible/roles/sysprep/tasks/debian.yml b/images/capi/ansible/roles/sysprep/tasks/debian.yml index e6ad194773..c8c80971b3 100644 --- a/images/capi/ansible/roles/sysprep/tasks/debian.yml +++ b/images/capi/ansible/roles/sysprep/tasks/debian.yml @@ -144,3 +144,14 @@ path: /etc/cloud/cloud.cfg.d/90-installer-network.cfg state: absent when: ansible_distribution_version is version('22.04', '>=') + +- name: remove subiquity install logs + file: + path: "{{ item }}" + state: absent + when: ansible_distribution_version is version('22.04', '>=') + loop: + - /var/log/installer/subiquity-server-debug.log + - /var/log/installer/subiquity-server-info.log + - /var/log/installer/ + diff --git a/images/capi/packer/ova/linux/ubuntu/http/24.04.efi/meta-data b/images/capi/packer/ova/linux/ubuntu/http/24.04.efi/meta-data new file mode 100644 index 0000000000..e69de29bb2 diff --git a/images/capi/packer/ova/linux/ubuntu/http/24.04.efi/user-data b/images/capi/packer/ova/linux/ubuntu/http/24.04.efi/user-data new file mode 100644 index 0000000000..86d8d6c6d3 --- /dev/null +++ b/images/capi/packer/ova/linux/ubuntu/http/24.04.efi/user-data @@ -0,0 +1,117 @@ +#cloud-config +# Copyright 2022 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# For more information on how autoinstall is configured, please refer to +# https://ubuntu.com/server/docs/install/autoinstall-reference +autoinstall: + version: 1 + # Disable ssh server during installation, otherwise packer tries to connect and exceed max attempts + early-commands: + - systemctl stop ssh + # Configure the locale + locale: en_US.UTF-8 + keyboard: + layout: us + grub: + reorder_uefi: false + replace_linux_default: false + # For more information on how partitioning is configured, + # please refer to https://curtin.readthedocs.io/en/latest/topics/storage.html. + storage: + swap: + size: 0 + grub: + reorder_uefi: false + replace_linux_default: false + config: + - ptable: gpt + path: /dev/sda + wipe: superblock-recursive + preserve: false + name: '' + grub_device: false + type: disk + id: disk-sda + - device: disk-sda + # Create EFI partition of 512MB same as in Ubuntu 20.04 + size: 536870912 + wipe: superblock + flag: boot + number: 1 + preserve: false + grub_device: true + type: partition + id: partition-0 + - fstype: fat32 + volume: partition-0 + preserve: false + type: format + id: format-0 + - device: disk-sda + size: -1 + wipe: superblock + flag: '' + number: 2 + preserve: false + grub_device: false + type: partition + id: partition-1 + - fstype: ext4 + volume: partition-1 + preserve: false + type: format + id: format-1 + - path: / + device: format-1 + type: mount + id: mount-1 + - path: /boot/efi + device: format-0 + type: mount + id: mount-0 + updates: "all" + ssh: + install-server: true + allow-pw: true + # Customize the list of packages installed. + packages: + - open-vm-tools + # Create the default user. + # Ensures the "builder" user doesn't require a password to use sudo. + user-data: + users: + - name: builder + # openssl passwd -6 -stdin <<< builder + passwd: $6$xyz$UtXVazU08Q5b8AW.TJ3MPYZglyXa3Ttf2RCel8MCUPlEYO1evWxeWBhZ2QqivU/Ij4tqYAxMCqc2ujEM4dMSe1 + groups: [adm, cdrom, dip, plugdev, lxd, sudo] + lock-passwd: false + sudo: ALL=(ALL) NOPASSWD:ALL + shell: /bin/bash + + # This command runs after all other steps; it: + # 1. Disables swapfiles + # 2. Removes the existing swapfile + # 3. Removes the swapfile entry from /etc/fstab + # 4. Removes snapd, https://bugs.launchpad.net/subiquity/+bug/1946609 + # 5. Cleans up any packages that are no longer required + # 6. Removes the cached list of packages + late-commands: + - curtin in-target --target=/target -- swapoff -a + - curtin in-target --target=/target -- rm -f /swap.img + - curtin in-target --target=/target -- sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab + - chroot /target apt-get purge -y snapd + - curtin in-target --target=/target -- apt-get purge --auto-remove -y + - curtin in-target --target=/target -- apt-get clean + - curtin in-target --target=/target -- rm -rf /var/lib/apt/lists/* diff --git a/images/capi/packer/ova/packer-node.json b/images/capi/packer/ova/packer-node.json index 46e1b3a3a0..cf1c7071e0 100644 --- a/images/capi/packer/ova/packer-node.json +++ b/images/capi/packer/ova/packer-node.json @@ -39,6 +39,8 @@ "{{user `boot_command_suffix`}}" ], "boot_wait": "{{user `boot_wait`}}", + "cd_files": "{{user `cd_files`}}", + "cd_label": "{{user `cd_label`}}", "cdrom_adapter_type": "{{user `cdrom_adapter_type`}}", "communicator": "ssh", "cores": "{{user `cpu_cores`}}", @@ -90,6 +92,8 @@ "{{user `boot_command_suffix`}}" ], "boot_wait": "{{user `boot_wait`}}", + "cd_files": "{{user `cd_files`}}", + "cd_label": "{{user `cd_label`}}", "cdrom_adapter_type": "{{user `cdrom_adapter_type`}}", "communicator": "ssh", "cores": "{{user `cpu_cores`}}", @@ -140,6 +144,8 @@ "{{user `boot_command_suffix`}}" ], "boot_wait": "{{user `boot_wait`}}", + "cd_files": "{{user `cd_files`}}", + "cd_label": "{{user `cd_label`}}", "cdrom_type": "{{user `cdrom_type`}}", "cluster": "{{user `cluster`}}", "communicator": "ssh", @@ -199,6 +205,8 @@ "{{user `boot_command_suffix`}}" ], "boot_wait": "{{user `boot_wait`}}", + "cd_files": "{{user `cd_files`}}", + "cd_label": "{{user `cd_label`}}", "cdrom_type": "{{user `cdrom_type`}}", "cluster": "{{user `cluster`}}", "communicator": "ssh", @@ -234,6 +242,7 @@ "network_card": "{{user `network_card`}}" } ], + "notes": "Builddate: {{isotime \"2006-01-02T15:04\"}}, containerd_version: {{user `containerd_version`}} vsphere_guest_os_type: {{user `vsphere_guest_os_type`}} kubernetes_cni_semver: {{user `kubernetes_cni_semver`}} kubernetes_semver: {{user `kubernetes_semver`}} kubernetes_source_type: {{user `kubernetes_source_type`}} vm_version: {{user `vmx_version`}}", "password": "{{user `password`}}", "resource_pool": "{{user `resource_pool`}}", "shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S -E sh -c 'userdel -f -r {{user `ssh_username`}} && rm -f /etc/sudoers.d/{{user `ssh_username` }} && {{user `shutdown_command`}}'", @@ -257,6 +266,8 @@ { "CPUs": "{{user `cpu`}}", "RAM": "{{user `memory`}}", + "cd_files": "{{user `cd_files`}}", + "cd_label": "{{user `cd_label`}}", "cluster": "{{user `cluster`}}", "communicator": "ssh", "convert_to_template": "{{user `convert_to_template`}}", diff --git a/images/capi/packer/ova/ubuntu-2404-efi.json b/images/capi/packer/ova/ubuntu-2404-efi.json new file mode 100644 index 0000000000..bd1d2899e8 --- /dev/null +++ b/images/capi/packer/ova/ubuntu-2404-efi.json @@ -0,0 +1,18 @@ +{ + "boot_command_prefix": "clinux /casper/vmlinuz ipv6.disable={{ user `boot_disable_ipv6` }} --- autoinstall ds='nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/24.04.efi/'initrd /casper/initrdboot", + "boot_disable_ipv6": "0", + "boot_media_path": "/media/HTTP", + "build_name": "ubuntu-{{user `distro_version` | replace_all \".\" \"\" }}-efi", + "distro_arch": "amd64", + "distro_name": "ubuntu", + "distro_version": "24.04", + "firmware": "efi", + "floppy_dirs": "./packer/ova/linux/{{user `distro_name`}}/http/", + "guest_os_type": "ubuntu-64", + "iso_checksum": "https://releases.ubuntu.com/noble/SHA256SUMS", + "iso_checksum_type": "file", + "iso_url": "https://releases.ubuntu.com/noble/ubuntu-24.04-live-server-amd64.iso", + "os_display_name": "Ubuntu 24.04", + "shutdown_command": "shutdown -P now", + "vsphere_guest_os_type": "ubuntu64Guest" +} diff --git a/images/capi/packer/raw/linux/ubuntu/http/22.04.efi/meta-data b/images/capi/packer/raw/linux/ubuntu/http/22.04.efi/meta-data new file mode 100644 index 0000000000..e69de29bb2 diff --git a/images/capi/packer/raw/linux/ubuntu/http/22.04.efi/user-data b/images/capi/packer/raw/linux/ubuntu/http/22.04.efi/user-data new file mode 100644 index 0000000000..2795bfc62c --- /dev/null +++ b/images/capi/packer/raw/linux/ubuntu/http/22.04.efi/user-data @@ -0,0 +1,111 @@ +#cloud-config +# Copyright 2022 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# For more information on how autoinstall is configured, please refer to +# https://ubuntu.com/server/docs/install/autoinstall-reference +autoinstall: + version: 1 + # Disable ssh server during installation, otherwise packer tries to connect and exceed max attempts + early-commands: + - systemctl stop ssh + # Configure the locale + locale: en_US.UTF-8 + keyboard: + layout: us + grub: + reorder_uefi: false + replace_linux_default: false + # For more information on how partitioning is configured, + # please refer to https://curtin.readthedocs.io/en/latest/topics/storage.html. + storage: + config: + - ptable: gpt + path: /dev/sda + wipe: superblock-recursive + preserve: false + name: '' + grub_device: false + type: disk + id: disk-sda + - device: disk-sda + # Create EFI partition of 512MB same as in Ubuntu 20.04 + size: 536870912 + wipe: superblock + flag: boot + number: 1 + preserve: false + grub_device: true + type: partition + id: partition-0 + - fstype: fat32 + volume: partition-0 + preserve: false + type: format + id: format-0 + - device: disk-sda + size: -1 + wipe: superblock + flag: '' + number: 2 + preserve: false + grub_device: false + type: partition + id: partition-1 + - fstype: ext4 + volume: partition-1 + preserve: false + type: format + id: format-1 + - path: / + device: format-1 + type: mount + id: mount-1 + - path: /boot/efi + device: format-0 + type: mount + id: mount-0 + updates: "all" + ssh: + install-server: true + allow-pw: true + # Create the default user. + # Ensures the "builder" user doesn't require a password to use sudo. + user-data: + users: + - name: builder + # openssl passwd -6 -stdin <<< builder + passwd: $6$xyz$UtXVazU08Q5b8AW.TJ3MPYZglyXa3Ttf2RCel8MCUPlEYO1evWxeWBhZ2QqivU/Ij4tqYAxMCqc2ujEM4dMSe1 + groups: [adm, cdrom, dip, plugdev, lxd, sudo] + lock-passwd: false + sudo: ALL=(ALL) NOPASSWD:ALL + shell: /bin/bash + + # This command runs after all other steps; it: + # 1. Disables swapfiles + # 2. Removes the existing swapfile + # 3. Removes the swapfile entry from /etc/fstab + # 4. Cleans up any packages that are no longer required + # 5. Removes the cached list of packages + late-commands: + - | + if [ -d /sys/firmware/efi ]; then + apt-get install -y efibootmgr + efibootmgr -o $(efibootmgr | perl -n -e '/Boot(.+)\* ubuntu/ && print $1') + fi + - swapoff -a + - rm -f /swapfile + - sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab + - apt-get purge --auto-remove -y + - rm -rf /var/lib/apt/lists/* diff --git a/images/capi/packer/raw/linux/ubuntu/http/22.04/meta-data b/images/capi/packer/raw/linux/ubuntu/http/22.04/meta-data new file mode 100644 index 0000000000..e69de29bb2 diff --git a/images/capi/packer/raw/linux/ubuntu/http/22.04/user-data b/images/capi/packer/raw/linux/ubuntu/http/22.04/user-data new file mode 100644 index 0000000000..5d3093e701 --- /dev/null +++ b/images/capi/packer/raw/linux/ubuntu/http/22.04/user-data @@ -0,0 +1,84 @@ +#cloud-config +# Copyright 2022 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# For more information on how autoinstall is configured, please refer to +# https://ubuntu.com/server/docs/install/autoinstall-reference +autoinstall: + version: 1 + # Disable ssh server during installation, otherwise packer tries to connect and exceed max attempts + early-commands: + - systemctl stop ssh + # Configure the locale + locale: en_US.UTF-8 + keyboard: + layout: us + # Create a single-partition with no swap space. Kubernetes + # really dislikes the idea of anyone else managing memory. + # For more information on how partitioning is configured, + # please refer to https://curtin.readthedocs.io/en/latest/topics/storage.html. + storage: + config: + - type: disk + id: disk-0 + size: largest + grub_device: true + preserve: false + ptable: msdos + wipe: superblock + - type: partition + id: partition-0 + device: disk-0 + size: -1 + number: 1 + preserve: false + flag: boot + - type: format + id: format-0 + volume: partition-0 + fstype: ext4 + preserve: false + - type: mount + id: mount-0 + device: format-0 + path: / + updates: 'all' + ssh: + install-server: true + allow-pw: true + # Create the default user. + # Ensures the "builder" user doesn't require a password to use sudo. + user-data: + users: + - name: builder + # openssl passwd -6 -stdin <<< builder + passwd: $6$xyz$UtXVazU08Q5b8AW.TJ3MPYZglyXa3Ttf2RCel8MCUPlEYO1evWxeWBhZ2QqivU/Ij4tqYAxMCqc2ujEM4dMSe1 + groups: [adm, cdrom, dip, plugdev, lxd, sudo] + lock-passwd: false + sudo: ALL=(ALL) NOPASSWD:ALL + shell: /bin/bash + + # This command runs after all other steps; it: + # 1. Disables swapfiles + # 2. Removes the existing swapfile + # 3. Removes the swapfile entry from /etc/fstab + # 4. Cleans up any packages that are no longer required + # 5. Removes the cached list of packages + late-commands: + - swapoff -a + - rm -f /swapfile + - sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab + - apt-get purge --auto-remove -y + - rm -rf /var/lib/apt/lists/* diff --git a/images/capi/packer/raw/linux/ubuntu/http/24.04.efi/meta-data b/images/capi/packer/raw/linux/ubuntu/http/24.04.efi/meta-data new file mode 100644 index 0000000000..e69de29bb2 diff --git a/images/capi/packer/raw/linux/ubuntu/http/24.04.efi/user-data b/images/capi/packer/raw/linux/ubuntu/http/24.04.efi/user-data new file mode 100644 index 0000000000..02f57696ed --- /dev/null +++ b/images/capi/packer/raw/linux/ubuntu/http/24.04.efi/user-data @@ -0,0 +1,111 @@ +#cloud-config +# Copyright 2022 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# For more information on how autoinstall is configured, please refer to +# https://ubuntu.com/server/docs/install/autoinstall-reference +autoinstall: + version: 1 + # Disable ssh server during installation, otherwise packer tries to connect and exceed max attempts + early-commands: + - systemctl stop ssh + # Configure the locale + locale: en_US.UTF-8 + keyboard: + layout: us + grub: + reorder_uefi: false + replace_linux_default: false + # For more information on how partitioning is configured, + # please refer to https://curtin.readthedocs.io/en/latest/topics/storage.html. + storage: + config: + - ptable: gpt + path: /dev/sda + wipe: superblock-recursive + preserve: false + name: '' + grub_device: false + type: disk + id: disk-sda + - device: disk-sda + # Create EFI partition of 512MB same as in Ubuntu 20.04 + size: 536870912 + wipe: superblock + flag: boot + number: 1 + preserve: false + grub_device: true + type: partition + id: partition-0 + - fstype: fat32 + volume: partition-0 + preserve: false + type: format + id: format-0 + - device: disk-sda + size: -1 + wipe: superblock + flag: '' + number: 2 + preserve: false + grub_device: false + type: partition + id: partition-1 + - fstype: ext4 + volume: partition-1 + preserve: false + type: format + id: format-1 + - path: / + device: format-1 + type: mount + id: mount-1 + - path: /boot/efi + device: format-0 + type: mount + id: mount-0 + updates: "all" + ssh: + install-server: true + allow-pw: true + # Create the default user. + # Ensures the "builder" user doesn't require a password to use sudo. + user-data: + users: + - name: builder + # openssl passwd -6 -stdin <<< builder + passwd: $6$xyz$UtXVazU08Q5b8AW.TJ3MPYZglyXa3Ttf2RCel8MCUPlEYO1evWxeWBhZ2QqivU/Ij4tqYAxMCqc2ujEM4dMSe1 + groups: [adm, cdrom, dip, plugdev, lxd, sudo] + lock-passwd: false + sudo: ALL=(ALL) NOPASSWD:ALL + shell: /bin/bash + + # This command runs after all other steps; it: + # 1. Disables swapfiles + # 2. Removes the existing swapfile + # 3. Removes the swapfile entry from /etc/fstab + # 4. Cleans up any packages that are no longer required + # 5. Removes the cached list of packages + late-commands: + # - | + # if [ -d /sys/firmware/efi ]; then + # apt-get install -y efibootmgr + # efibootmgr -o $(efibootmgr | perl -n -e '/Boot(.+)\* ubuntu/ && print $1') + # fi + - swapoff -a + - rm -f /swapfile + - sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab + - apt-get purge --auto-remove -y + - rm -rf /var/lib/apt/lists/* diff --git a/images/capi/packer/raw/packer.json b/images/capi/packer/raw/packer.json index 1d52a5f983..d6d98bdd1e 100644 --- a/images/capi/packer/raw/packer.json +++ b/images/capi/packer/raw/packer.json @@ -24,6 +24,12 @@ "net_device": "virtio-net", "output_directory": "{{user `output_directory`}}", "qemu_binary": "{{user `qemu_binary`}}", + "qemuargs": [ + [ + "-vga", + "virtio" + ] + ], "shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S -E sh -c 'usermod -L {{user `ssh_username`}} && {{user `shutdown_command`}}'", "ssh_password": "{{user `ssh_password`}}", "ssh_timeout": "2h", @@ -86,7 +92,7 @@ }, { "ansible_env_vars": [ - "ANSIBLE_SSH_ARGS='{{user `existing_ansible_ssh_args`}} -o IdentitiesOnly=yes'" + "ANSIBLE_SSH_ARGS='{{user `existing_ansible_ssh_args`}} {{user `ansible_common_ssh_args`}}'" ], "extra_arguments": [ "--extra-vars", @@ -118,6 +124,7 @@ "vars_inline": { "ARCH": "amd64", "OS": "{{user `distro_name` | lower}}", + "OS_VERSION": "{{user `distro_version` | lower}}", "PROVIDER": "raw", "containerd_version": "{{user `containerd_version`}}", "kubernetes_cni_deb_version": "{{ user `kubernetes_cni_deb_version` }}", diff --git a/images/capi/packer/raw/raw-ubuntu-2004-efi.json b/images/capi/packer/raw/raw-ubuntu-2004-efi.json index 7ed3ac8a32..73f9ca2b67 100644 --- a/images/capi/packer/raw/raw-ubuntu-2004-efi.json +++ b/images/capi/packer/raw/raw-ubuntu-2004-efi.json @@ -3,7 +3,9 @@ "boot_command_suffix": "/20.04/preseed-efi.cfg -- initrd /install/initrd.gzboot", "build_name": "ubuntu-2004", "build_target": "raw", + "distro_arch": "amd64", "distro_name": "ubuntu", + "distro_version": "20.04", "firmware": "OVMF.fd", "guest_os_type": "ubuntu-64", "iso_checksum": "f11bda2f2caed8f420802b59f382c25160b114ccc665dbac9c5046e7fceaced2", diff --git a/images/capi/packer/raw/raw-ubuntu-2004.json b/images/capi/packer/raw/raw-ubuntu-2004.json index 9e78e63849..9cf4becabe 100644 --- a/images/capi/packer/raw/raw-ubuntu-2004.json +++ b/images/capi/packer/raw/raw-ubuntu-2004.json @@ -3,7 +3,9 @@ "boot_command_suffix": "/20.04/preseed.cfg -- ", "build_name": "ubuntu-2004", "build_target": "raw", + "distro_arch": "amd64", "distro_name": "ubuntu", + "distro_version": "20.04", "guest_os_type": "ubuntu-64", "iso_checksum": "f11bda2f2caed8f420802b59f382c25160b114ccc665dbac9c5046e7fceaced2", "iso_checksum_type": "sha256", diff --git a/images/capi/packer/raw/raw-ubuntu-2204-efi.json b/images/capi/packer/raw/raw-ubuntu-2204-efi.json new file mode 100644 index 0000000000..24ac6e8264 --- /dev/null +++ b/images/capi/packer/raw/raw-ubuntu-2204-efi.json @@ -0,0 +1,19 @@ +{ + "boot_command_prefix": "clinux /casper/vmlinuz ipv6.disable={{ user `boot_disable_ipv6` }} autoinstall ds='nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/22.04.efi/' ---initrd /casper/initrdboot", + "boot_disable_ipv6": "1", + "boot_media_path": "/media/HTTP", + "build_name": "ubuntu-2204-efi", + "build_target": "raw", + "distro_arch": "amd64", + "distro_name": "ubuntu", + "distro_version": "22.04", + "distro_version_slug": "2204", + "firmware": "OVMF.fd", + "guest_os_type": "ubuntu-64", + "iso_checksum": "45f873de9f8cb637345d6e66a583762730bbea30277ef7b32c9c3bd6700a32b2", + "iso_checksum_type": "sha256", + "iso_url": "https://releases.ubuntu.com/22.04/ubuntu-22.04.4-live-server-amd64.iso", + "os_display_name": "Ubuntu 22.04", + "shutdown_command": "shutdown -P now", + "unmount_iso": "true" +} diff --git a/images/capi/packer/raw/raw-ubuntu-2204.json b/images/capi/packer/raw/raw-ubuntu-2204.json new file mode 100644 index 0000000000..f700631845 --- /dev/null +++ b/images/capi/packer/raw/raw-ubuntu-2204.json @@ -0,0 +1,18 @@ +{ + "boot_command_prefix": "clinux /casper/vmlinuz ipv6.disable={{ user `boot_disable_ipv6` }} --- autoinstall ds='nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/22.04/'initrd /casper/initrdboot", + "boot_disable_ipv6": "1", + "boot_media_path": "/media/HTTP", + "build_name": "ubuntu-2204", + "build_target": "raw", + "distro_arch": "amd64", + "distro_name": "ubuntu", + "distro_version": "22.04", + "distro_version_slug": "2204", + "guest_os_type": "ubuntu-64", + "iso_checksum": "45f873de9f8cb637345d6e66a583762730bbea30277ef7b32c9c3bd6700a32b2", + "iso_checksum_type": "sha256", + "iso_url": "https://releases.ubuntu.com/22.04/ubuntu-22.04.4-live-server-amd64.iso", + "os_display_name": "Ubuntu 22.04", + "shutdown_command": "shutdown -P now", + "unmount_iso": "true" +} diff --git a/images/capi/packer/raw/raw-ubuntu-2404-efi.json b/images/capi/packer/raw/raw-ubuntu-2404-efi.json new file mode 100644 index 0000000000..1e3d010c13 --- /dev/null +++ b/images/capi/packer/raw/raw-ubuntu-2404-efi.json @@ -0,0 +1,19 @@ +{ + "boot_command_prefix": "clinux /casper/vmlinuz ipv6.disable={{ user `boot_disable_ipv6` }} autoinstall ds='nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/24.04.efi/' ---initrd /casper/initrdboot", + "boot_disable_ipv6": "1", + "boot_media_path": "/media/HTTP", + "build_name": "ubuntu-{{user `distro_version` | replace_all \".\" \"\" }}-efi", + "build_target": "raw", + "distro_arch": "amd64", + "distro_name": "ubuntu", + "distro_version": "24.04", + "distro_version_slug": "2404", + "firmware": "OVMF.fd", + "guest_os_type": "ubuntu-64", + "iso_checksum": "https://releases.ubuntu.com/noble/SHA256SUMS", + "iso_checksum_type": "file", + "iso_url": "https://releases.ubuntu.com/noble/ubuntu-24.04-live-server-amd64.iso", + "os_display_name": "Ubuntu 24.04", + "shutdown_command": "shutdown -P now", + "unmount_iso": "true" +} diff --git a/images/capi/packer/raw/raw-ubuntu-2404.json b/images/capi/packer/raw/raw-ubuntu-2404.json new file mode 100644 index 0000000000..f93ef91a9e --- /dev/null +++ b/images/capi/packer/raw/raw-ubuntu-2404.json @@ -0,0 +1,18 @@ +{ + "boot_command_prefix": "clinux /casper/vmlinuz ipv6.disable={{ user `boot_disable_ipv6` }} --- autoinstall ds='nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/24.04/'initrd /casper/initrdboot", + "boot_disable_ipv6": "1", + "boot_media_path": "/media/HTTP", + "build_name": "ubuntu-{{user `distro_version` | replace_all \".\" \"\" }}", + "build_target": "raw", + "distro_arch": "amd64", + "distro_name": "ubuntu", + "distro_version": "24.04", + "distro_version_slug": "2404", + "guest_os_type": "ubuntu-64", + "iso_checksum": "https://releases.ubuntu.com/noble/SHA256SUMS", + "iso_checksum_type": "file", + "iso_url": "https://releases.ubuntu.com/noble/ubuntu-24.04-live-server-amd64.iso", + "os_display_name": "Ubuntu 24.04", + "shutdown_command": "shutdown -P now", + "unmount_iso": "true" +}