Skip to content

Commit

Permalink
updated amz builds
Browse files Browse the repository at this point in the history
Signed-off-by: Corey Hemminger <[email protected]>
  • Loading branch information
Stromweld committed Mar 20, 2024
1 parent b5e2ea6 commit 69ffc0e
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 31 deletions.
2 changes: 1 addition & 1 deletion amazonlinux-2-x86_64-virtualbox_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ echo Deleting the VM
vboxmanage unregistervm $VM --delete

echo starting packer build of amazonlinux
if packer build -timestamp-ui -only=virtualbox-ovf.vm -var "vbox_source_path=$AMZDIR/amazon2_x86_64.ovf" -var "vbox_checksum=null" -var-file="$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl "$AMZDIR"/../../packer_templates; then
if packer build -timestamp-ui -var "vbox_source_path=$AMZDIR/amazon2_x86_64.ovf" -var "vbox_checksum=null" -var-file="$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2-x86_64.pkrvars.hcl "$AMZDIR"/../../packer_templates; then
echo "Cleaning up files"
rm -f "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.iso
else
Expand Down
5 changes: 3 additions & 2 deletions amazonlinux-2023-aarch64-virtualbox-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ VBoxManage createvm --name $VM --ostype "Fedora_64" --register
VBoxManage storagectl $VM --name "SATA Controller" --add sata --controller IntelAHCI
VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$AMZDIR"/amazon2023_arm64.vdi
VBoxManage storageattach $VM --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium "$AMZDIR"/seed.iso
VBoxManage modifyvm $VM --chipset ich9
VBoxManage modifyvm $VM --firmware efi
VBoxManage modifyvm $VM --memory 2048
VBoxManage modifyvm $VM --cpus 2
VBoxManage modifyvm $VM --nat-localhostreachable1 on
VBoxManage modifyvm $VM --vram 10
VBoxManage modifyvm $VM --vram 33
VBoxManage modifyvm $VM --graphicscontroller vmsvga
VBoxManage modifyvm $VM --vrde off
VBoxManage modifyvm $VM --audio-driver none
Expand All @@ -66,7 +67,7 @@ echo "Deleting the VM"
vboxmanage unregistervm $VM --delete

echo "starting packer build of amazonlinux"
if packer build -timestamp-ui -only=virtualbox-ovf.vm -var "vbox_source_path=$AMZDIR/amazon2023_arm64.ovf" -var "vbox_checksum=null" -var-file="$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2023-aarch64.pkrvars.hcl "$AMZDIR"/../../packer_templates; then
if packer build -timestamp-ui -var "vbox_source_path=$AMZDIR/amazon2023_arm64.ovf" -var "vbox_checksum=null" -var-file="$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2023-aarch64.pkrvars.hcl "$AMZDIR"/../../packer_templates; then
echo "Cleaning up files"
rm -f "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.iso "$AMZDIR"/*.vdi "$AMZDIR"/*.qcow2
else
Expand Down
2 changes: 1 addition & 1 deletion amazonlinux-2023-x86_64-virtualbox-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ echo "Deleting the VM"
vboxmanage unregistervm $VM --delete

echo "starting packer build of amazonlinux"
if packer build -timestamp-ui -only=virtualbox-ovf.vm -var "vbox_source_path=$AMZDIR/amazon2023_x86_64.ovf" -var "vbox_checksum=null" -var-file="$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2023-x86_64.pkrvars.hcl "$AMZDIR"/../../packer_templates; then
if packer build -timestamp-ui -var "vbox_source_path=$AMZDIR/amazon2023_x86_64.ovf" -var "vbox_checksum=null" -var-file="$AMZDIR"/../../os_pkrvars/amazonlinux/amazonlinux-2023-x86_64.pkrvars.hcl "$AMZDIR"/../../packer_templates; then
echo "Cleaning up files"
rm -f "$AMZDIR"/*.ovf "$AMZDIR"/*.vmdk "$AMZDIR"/*.iso "$AMZDIR"/*.vdi "$AMZDIR"/*.qcow2
else
Expand Down
2 changes: 2 additions & 0 deletions builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ default_architectures:
- 'amd64'

public:
- 'amazonlinux-2'
- 'amazonlinux-2023'
- 'almalinux-8'
- 'almalinux-9'
- 'amazon-2'
Expand Down
19 changes: 9 additions & 10 deletions os_pkrvars/amazonlinux/amazonlinux-2-aarch64.pkrvars.hcl
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
os_name = "amazonlinux"
os_version = "2"
os_arch = "aarch64"
iso_url = "https://cdn.amazonlinux.com/os-images/2.0.20240131.0/kvm-arm64/amzn2-kvm-2.0.20240131.0-arm64.xfs.gpt.qcow2"
iso_checksum = "file:https://cdn.amazonlinux.com/os-images/2.0.20240131.0/kvm-arm64/SHA256SUMS"
qemu_disk_image = true
os_name = "amazonlinux"
os_version = "2"
os_arch = "aarch64"
vbox_source_path = "https://cdn.amazonlinux.com/os-images/latest/kvm-arm64/amzn2-kvm-2.0.20240306.2-arm64.xfs.gpt.qcow2"
vbox_checksum = "file:https://cdn.amazonlinux.com/os-images/latest/kvm-arm64/SHA256SUMS"
parallels_guest_os_type = "fedora-core"
vbox_guest_os_type = "Fedora_64"
vmware_guest_os_type = "arm-fedora-64"
sources_enabled = [
"source.qemu.vm"
"source.virtualbox-ovf.vm"
]
parallels_guest_os_type = "centos"
vbox_guest_os_type = "RedHat_64"
vmware_guest_os_type = "arm-rhel9-64"
24 changes: 9 additions & 15 deletions os_pkrvars/amazonlinux/amazonlinux-2023-aarch64.pkrvars.hcl
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
os_name = "amazonlinux"
os_version = "2023"
os_arch = "aarch64"
iso_url = "https://cdn.amazonlinux.com/al2023/os-images/2023.3.20240131.0/kvm-arm64/al2023-kvm-2023.3.20240131.0-kernel-6.1-arm64.xfs.gpt.qcow2"
iso_checksum = "file:https://cdn.amazonlinux.com/al2023/os-images/2023.3.20240131.0/kvm-arm64/SHA256SUMS"
qemu_disk_image = true
cd_files = ["/Users/corey.hemminger/Documents/github/personal/chef/cookbooks/testing/bento/packer_templates/amz_seed_iso/*"]
qemu_efi_boot = true
qemu_efi_firmware_code = "/opt/homebrew/Cellar/qemu/8.2.1/share/qemu/edk2-arm-code.fd"
qemu_efi_firmware_vars = "/opt/homebrew/Cellar/qemu/8.2.1/share/qemu/edk2-arm-vars.fd"
qemu_efi_drop_efivars = null
os_name = "amazonlinux"
os_version = "2023"
os_arch = "aarch64"
vbox_source_path = "https://cdn.amazonlinux.com/al2023/os-images/2023.3.20240312.0/vmware/al2023-vmware_esx-2023.3.20240312.0-kernel-6.1-x86_64.xfs.gpt.ova"
vbox_checksum = "file:https://cdn.amazonlinux.com/al2023/os-images/2023.3.20240312.0/vmware/SHA256SUMS"
parallels_guest_os_type = "fedora-core"
vbox_guest_os_type = "Fedora_64"
vmware_guest_os_type = "arm-fedora-64"
sources_enabled = [
"source.qemu.vm"
"source.virtualbox-ovf.vm"
]
parallels_guest_os_type = "centos"
vbox_guest_os_type = "RedHat_64"
vmware_guest_os_type = "arm-rhel9-64"
4 changes: 2 additions & 2 deletions os_pkrvars/amazonlinux/amazonlinux-2023-x86_64.pkrvars.hcl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
os_name = "amazonlinux"
os_version = "2023"
os_arch = "x86_64"
vbox_source_path = "https://cdn.amazonlinux.com/al2023/os-images/2023.3.20240312.0/vmware/al2023-vmware_esx-2023.3.20240312.0-kernel-6.1-x86_64.xfs.gpt.ova"
vbox_checksum = "file:https://cdn.amazonlinux.com/al2023/os-images/2023.3.20240312.0/vmware/SHA256SUMS"
vbox_source_path = "https://cdn.amazonlinux.com/al2023/os-images/latest/vmware/al2023-vmware_esx-2023.3.20240312.0-kernel-6.1-x86_64.xfs.gpt.ova"
vbox_checksum = "file:https://cdn.amazonlinux.com/al2023/os-images/latest/vmware/SHA256SUMS"
parallels_guest_os_type = "fedora-core"
vbox_guest_os_type = "Fedora_64"
vmware_guest_os_type = "fedora-64"
Expand Down

0 comments on commit 69ffc0e

Please sign in to comment.