From 90afd8f0fac0f933b03016adc905a9abafb85c74 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Thu, 13 Apr 2023 09:58:11 -0700 Subject: [PATCH] packer: update board definitions --- packer/boards/cm4-cluster-ubuntu-22.04.2.json | 8 ++- packer/boards/rp4-cdev-ubuntu-22.04.2.json | 60 +++++++++++++++++++ packer/ubuntu-boards.yml | 15 ++++- 3 files changed, 79 insertions(+), 4 deletions(-) create mode 100644 packer/boards/rp4-cdev-ubuntu-22.04.2.json diff --git a/packer/boards/cm4-cluster-ubuntu-22.04.2.json b/packer/boards/cm4-cluster-ubuntu-22.04.2.json index 72a52de..77c0276 100644 --- a/packer/boards/cm4-cluster-ubuntu-22.04.2.json +++ b/packer/boards/cm4-cluster-ubuntu-22.04.2.json @@ -43,9 +43,15 @@ } ], "provisioners": [ + { + "destination": "/boot/firmware/user-data", + "source": "files/user-data", + "type": "file" + }, { "scripts": [ - "scripts/install-base.sh" + "scripts/install-base.sh", + "scripts/setup-ssh.sh" ], "type": "shell" } diff --git a/packer/boards/rp4-cdev-ubuntu-22.04.2.json b/packer/boards/rp4-cdev-ubuntu-22.04.2.json new file mode 100644 index 0000000..3e8993f --- /dev/null +++ b/packer/boards/rp4-cdev-ubuntu-22.04.2.json @@ -0,0 +1,60 @@ +{ + "variables": {}, + "builders": [ + { + "type": "arm", + "file_urls": [ + "build/ubuntu-22.04.2-preinstalled-server-arm64+raspi.img.xz", + "https://cdimage.ubuntu.com/releases/22.04.2/release/ubuntu-22.04.2-preinstalled-server-arm64+raspi.img.xz" + ], + "file_checksum_url": "http://cdimage.ubuntu.com/releases/22.04.2/release/SHA256SUMS", + "file_checksum_type": "sha256", + "file_target_extension": "xz", + "file_unarchive_cmd": [ + "xz", + "--decompress", + "$ARCHIVE_PATH" + ], + "image_build_method": "reuse", + "image_path": "build/rp4-cdev-ubuntu-22.04.2.img", + "image_size": "32G", + "image_type": "dos", + "image_partitions": [ + { + "name": "boot", + "type": "c", + "start_sector": 2048, + "size": "256M", + "mountpoint": "/boot/firmware" + }, + { + "name": "root", + "type": "83", + "start_sector": 526336, + "size": "31.7G", + "mountpoint": "/" + } + ], + "image_chroot_env": [ + "PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin" + ], + "qemu_binary_source_path": "/usr/bin/qemu-aarch64-static", + "qemu_binary_destination_path": "/usr/bin/qemu-aarch64-static" + } + ], + "provisioners": [ + { + "destination": "/boot/firmware/user-data", + "source": "files/user-data", + "type": "file" + }, + { + "scripts": [ + "scripts/install-base.sh", + "scripts/setup-ssh.sh" + ], + "type": "shell" + } + ], + "post-processors": null +} \ No newline at end of file diff --git a/packer/ubuntu-boards.yml b/packer/ubuntu-boards.yml index 775b08f..a871a04 100644 --- a/packer/ubuntu-boards.yml +++ b/packer/ubuntu-boards.yml @@ -3,8 +3,17 @@ boards: size: 32G name: cm4-cluster-ubuntu-22.04.2.img files: - - source: files/authorized-keys - destination: /tmp/authorized-keys + - source: files/user-data + destination: /boot/firmware/user-data scripts: - scripts/install-base.sh - - scripts/setup-ssh.sh \ No newline at end of file + - scripts/setup-ssh.sh + - version: 22.04.2 + size: 32G + name: rp4-cdev-ubuntu-22.04.2.img + files: + - source: files/user-data + destination: /boot/firmware/user-data + scripts: + - scripts/install-base.sh + - scripts/setup-ssh.sh