diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index ef67f8635..842a872d2 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -28,13 +28,6 @@ jobs: powershell-lint: uses: chef/github-workflows/.github/workflows/powershell-lint.yml@main - packer-iso-check: - uses: chef/github-workflows/.github/workflows/packer-iso-url-checker.yml@main - - packer-lint: - uses: chef/github-workflows/.github/workflows/packer-lint.yml@main - secrets: inherit - pkr-bld-amazonlinux-x64: uses: ./.github/workflows/pkr-bld-amazonlinux-x64.yml secrets: inherit @@ -84,8 +77,6 @@ jobs: - xml-lint - powershell-lint - shellcheck-lint - - packer-iso-check - - packer-lint runs-on: Ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed diff --git a/.github/workflows/pkr-bld-hyperv-x64.yml b/.github/workflows/pkr-bld-hyperv-x64.yml index dcec258ad..87b53a489 100644 --- a/.github/workflows/pkr-bld-hyperv-x64.yml +++ b/.github/workflows/pkr-bld-hyperv-x64.yml @@ -34,6 +34,7 @@ jobs: - ubuntu-20.04 - ubuntu-22.04 - ubuntu-22.10 + - ubuntu-23.04 # - windows-10 # - windows-10gen2 # - windows-11 diff --git a/.github/workflows/pkr-bld-parallels-arm64.yml b/.github/workflows/pkr-bld-parallels-arm64.yml index 0defd2522..4cd4e3cf2 100644 --- a/.github/workflows/pkr-bld-parallels-arm64.yml +++ b/.github/workflows/pkr-bld-parallels-arm64.yml @@ -18,6 +18,8 @@ jobs: - debian-11 - fedora-37 - fedora-38 + - freebsd-12 + - freebsd-13 - oraclelinux-7 - oraclelinux-8 - oraclelinux-9 @@ -27,6 +29,7 @@ jobs: - ubuntu-20.04 - ubuntu-22.04 - ubuntu-22.10 + - ubuntu-23.04 provider: - parallels-iso steps: diff --git a/.github/workflows/pkr-bld-parallels-x64.yml b/.github/workflows/pkr-bld-parallels-x64.yml index 466e2b539..25c15e2c4 100644 --- a/.github/workflows/pkr-bld-parallels-x64.yml +++ b/.github/workflows/pkr-bld-parallels-x64.yml @@ -34,6 +34,7 @@ jobs: - ubuntu-20.04 - ubuntu-22.04 - ubuntu-22.10 + - ubuntu-23.04 # - windows-10 # - windows-11 # - windows-2012r2 diff --git a/.github/workflows/pkr-bld-qemu-arm64.yml b/.github/workflows/pkr-bld-qemu-arm64.yml index 17369edbd..c208295ba 100644 --- a/.github/workflows/pkr-bld-qemu-arm64.yml +++ b/.github/workflows/pkr-bld-qemu-arm64.yml @@ -18,6 +18,8 @@ jobs: - debian-11 - fedora-37 - fedora-38 + - freebsd-12 + - freebsd-13 - oraclelinux-7 - oraclelinux-8 - oraclelinux-9 @@ -27,6 +29,7 @@ jobs: - ubuntu-20.04 - ubuntu-22.04 - ubuntu-22.10 + - ubuntu-23.04 provider: - qemu steps: diff --git a/.github/workflows/pkr-bld-qemu-x64.yml b/.github/workflows/pkr-bld-qemu-x64.yml index e6c8ce6f3..8a1d0fcf4 100644 --- a/.github/workflows/pkr-bld-qemu-x64.yml +++ b/.github/workflows/pkr-bld-qemu-x64.yml @@ -34,6 +34,7 @@ jobs: - ubuntu-20.04 - ubuntu-22.04 - ubuntu-22.10 + - ubuntu-23.04 # - windows-10 # - windows-11 # - windows-2012r2 diff --git a/.github/workflows/pkr-bld-virtualbox-arm64.yml b/.github/workflows/pkr-bld-virtualbox-arm64.yml index 29ff88372..e07092212 100644 --- a/.github/workflows/pkr-bld-virtualbox-arm64.yml +++ b/.github/workflows/pkr-bld-virtualbox-arm64.yml @@ -18,6 +18,8 @@ jobs: - debian-11 - fedora-37 - fedora-38 + - freebsd-12 + - freebsd-13 - oraclelinux-7 - oraclelinux-8 - oraclelinux-9 @@ -27,6 +29,7 @@ jobs: - ubuntu-20.04 - ubuntu-22.04 - ubuntu-22.10 + - ubuntu-23.04 provider: - virtualbox-iso steps: diff --git a/.github/workflows/pkr-bld-virtualbox-x64.yml b/.github/workflows/pkr-bld-virtualbox-x64.yml index 4256b5d07..65afc1e86 100644 --- a/.github/workflows/pkr-bld-virtualbox-x64.yml +++ b/.github/workflows/pkr-bld-virtualbox-x64.yml @@ -34,6 +34,7 @@ jobs: - ubuntu-20.04 - ubuntu-22.04 - ubuntu-22.10 + - ubuntu-23.04 # - windows-10 # - windows-11 # - windows-2012r2 diff --git a/.github/workflows/pkr-bld-vmware-arm64.yml b/.github/workflows/pkr-bld-vmware-arm64.yml index 3d0c10ac4..094b69a3a 100644 --- a/.github/workflows/pkr-bld-vmware-arm64.yml +++ b/.github/workflows/pkr-bld-vmware-arm64.yml @@ -18,6 +18,8 @@ jobs: - debian-11 - fedora-37 - fedora-38 + - freebsd-12 + - freebsd-13 - oraclelinux-7 - oraclelinux-8 - oraclelinux-9 @@ -27,6 +29,7 @@ jobs: - ubuntu-20.04 - ubuntu-22.04 - ubuntu-22.10 + - ubuntu-23.04 provider: - vmware-iso steps: diff --git a/.github/workflows/pkr-bld-vmware-x64.yml b/.github/workflows/pkr-bld-vmware-x64.yml index 80f8e7625..47f2f8dd0 100644 --- a/.github/workflows/pkr-bld-vmware-x64.yml +++ b/.github/workflows/pkr-bld-vmware-x64.yml @@ -34,6 +34,7 @@ jobs: - ubuntu-20.04 - ubuntu-22.04 - ubuntu-22.10 + - ubuntu-23.04 # - windows-10 # - windows-11 # - windows-2012r2 diff --git a/.gitignore b/.gitignore index f357397f4..175b1f75c 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ Berksfile.lock .kitchen.yml kitchen.yml *.metadata.json +bento-*.gem diff --git a/CHANGELOG.md b/CHANGELOG.md index b27ca1daf..25bf51e21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,8 @@ Markdown table generated at | centos-stream-9 | | | | | | x | | x | | | debian-10 | | | x | | | x | | x | | | debian-11 | | x | x | | | x | | x | | -| fedora-36 | | x | x | x | | x | | x | | | fedora-37 | | x | x | x | | x | | x | | +| fedora-38 | | x | | x | | x | | x | | | freebsd-12 | | | na | | na | x | na | | na | | freebsd-13 | | | na | | na | x | na | | na | | opensuse-leap-15 | | | na | x | na | | na | x | na | @@ -50,12 +50,32 @@ Markdown table generated at | windows-2019 | x | x | na | | na | x | na | | na | | windows-2022 | x | x | na | | na | x | na | | na | -## [unreleased] (2023-03-16) +### Todo + +- Fix failing builds +- Finish removal of deprecated chef-solo provider to powershell provider for windows +- migrate from http directory for hosting files to cd_files in source templates + - This makes all builds compatable with hyper-v gen 2 which removes floppy disk capability + - This also makes things universal for Virtualbox 6.1 to 7.x due to latter requiring extra config for guests on NAT to be able to connect to host +- Update pipelines to only run on updated pkrvars files +- Look into making all build uefi default builds +- Create CD pipeline to upload vagrant boxes after PR is merged +- Create CD pipeline to build and upload new versions of vagrant boxes once every 3 months with the latest patches + +## [unreleased] (2023-04-24) - Updated VMware disk and cdrom adaptor type to sata for aarch64 build compatability - Added "arm-" to aarch64 pkrvars files vmware_guest_os_type - Fixed readme example for bento debian build - Added pkrvars file for amazon 2023, more work needed to build vagrant box if/when amazon releases images for providers +- Removed EOL Fedora 36 build +- Added Fedora 38 build +- Added Ubuntu 23.04 x86_64 and aarch64 +- Switched vmware plugin back to official one with fusion 13 arm64 guest additions fix +- Updated Bento app to support arm64 builds and upload to vagrant +- Added Freebsd aarch64 templates +- Added new default VMware hardware configuration settings +- Update Debian 11 to 11.7 ## [v3.0.0] (2023-03-16) diff --git a/bento.gemspec b/bento.gemspec index 75a387502..4a33dd3a8 100644 --- a/bento.gemspec +++ b/bento.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = 'bento' - s.version = '3.0.0' + s.version = '3.1.0' s.summary = 'Bento builds generic Vagrant boxes ' s.description = s.summary s.license = 'Apache-2.0' diff --git a/builds.yml b/builds.yml index f613bcdfd..bdd94cc7c 100644 --- a/builds.yml +++ b/builds.yml @@ -1,37 +1,32 @@ --- public: -- 'almalinux-8.7' -- 'almalinux-9.1' -- 'amazon-2' -- 'centos-7.9' -- 'centos-stream-8' -- 'centos-stream-9' -- 'debian-10.13-arm64' -- 'debian-10.13' -- 'debian-11.7-arm64' -- 'debian-11.7' -- 'fedora-36' -- 'fedora-37' -- 'freebsd-12.4' -- 'freebsd-13.1' -- 'opensuse-leap-15.4' -- 'oracle-7.9' -- 'oracle-8.7' -- 'oracle-9.1' -- 'rockylinux-8.7' -- 'rockylinux-9.1' -- 'scientific-7.9' -- 'springdalelinux-7.9' -- 'springdalelinux-8.7' -- 'springdalelinux-9.1' -- 'ubuntu-18.04' -- 'ubuntu-18.04-arm64' -- 'ubuntu-20.04' -- 'ubuntu-20.04-arm64' -- 'ubuntu-22.04' -- 'ubuntu-22.04-arm64' -- 'ubuntu-22.10' -- 'ubuntu-22.10-arm64' + - 'almalinux-8' + - 'almalinux-9' + - 'amazon-2' + - 'centos-7' + - 'centos-stream-8' + - 'centos-stream-9' + - 'debian-10' + - 'debian-11' + - 'fedora-37' + - 'fedora-38' + - 'freebsd-12' + - 'freebsd-13' + - 'opensuse-leap-15' + - 'oracle-7' + - 'oracle-8' + - 'oracle-9' + - 'rockylinux-8' + - 'rockylinux-9' + - 'scientific-7' + - 'springdalelinux-7' + - 'springdalelinux-8' + - 'springdalelinux-9' + - 'ubuntu-18.04' + - 'ubuntu-20.04' + - 'ubuntu-22.04' + - 'ubuntu-22.10' + - 'ubuntu-23.04' # slug box name: text string from standard box name to match (generally the same) slugs: @@ -43,7 +38,7 @@ slugs: 'centos-stream-9': 'centos-stream-9' 'debian-11': 'debian-11' 'debian-10': 'debian-10' - 'fedora-latest': 'fedora-37' + 'fedora-latest': 'fedora-38' 'freebsd-12': 'freebsd-12' 'freebsd-13': 'freebsd-13' 'opensuse-leap-15': 'opensuse-leap-15' @@ -56,6 +51,19 @@ slugs: 'springdalelinux-7': 'springdalelinux-7' 'springdalelinux-8': 'springdalelinux-8' 'springdalelinux-9': 'springdalelinux-9' + 'almalinux-8-arm64': 'almalinux-8' + 'almalinux-9-arm64': 'almalinux-9' + 'centos-7-arm64': 'centos-7' + 'centos-stream-8-arm64': 'centos-stream-8' + 'centos-stream-9-arm64': 'centos-stream-9' + 'debian-11-arm64': 'debian-11' + 'debian-10-arm64': 'debian-10' + 'fedora-latest-arm64': 'fedora-38' + 'oracle-7-arm64': 'oracle-7' + 'oracle-8-arm64': 'oracle-8' + 'oracle-9-arm64': 'oracle-9' + 'rockylinux-8-arm64': 'rockylinux-8' + 'rockylinux-9-arm64': 'rockylinux-9' do_not_build: - amazon @@ -64,3 +72,14 @@ do_not_build: - solaris - rhel - windows +# - almalinux +# - centos +# - debian +# - fedora +# - freebsd +# - opensuse-leap +# - oracle +# - rockylinux +# - scientificlinux +# - springdalelinux +# - ubuntu diff --git a/lib/bento/buildmetadata.rb b/lib/bento/buildmetadata.rb index 3b7144b21..1c7f6b8c0 100644 --- a/lib/bento/buildmetadata.rb +++ b/lib/bento/buildmetadata.rb @@ -53,7 +53,12 @@ def merged_vars end def name - merged_vars.fetch('name', template) + arch = merged_vars.fetch('arch', UNKNOWN).downcase + if arch == 'aarch64' || arch == 'arm64' + "#{merged_vars.fetch('name', template)}-arm64" + else + merged_vars.fetch('name', template) + end end def arch diff --git a/lib/bento/runner.rb b/lib/bento/runner.rb index ac91448b1..0d6637ed2 100644 --- a/lib/bento/runner.rb +++ b/lib/bento/runner.rb @@ -29,6 +29,8 @@ def initialize(opts) def start templates = config ? build_list : template_files banner('Starting build for templates:') + banner('Installing packer plugins') + shellout("packer init -upgrade #{File.dirname(templates.first)}/../../packer_templates") templates.each { |t| puts "- #{t}" } time = Benchmark.measure do templates.each { |template| build(template) } @@ -43,8 +45,6 @@ def build(file) dir = File.dirname(file) template = File.basename(file) Dir.chdir dir - banner('Installing packer plugins if needed') - system('packer init ../../packer_templates') for_packer_run_with(template) do |md_file, _var_file| cmd = packer_build_cmd(template, md_file.path) banner("[#{template}] Building: '#{cmd.join(' ')}'") diff --git a/lib/bento/upload.rb b/lib/bento/upload.rb index e6c303a2a..3437f1318 100644 --- a/lib/bento/upload.rb +++ b/lib/bento/upload.rb @@ -67,7 +67,11 @@ def upload_box(md_file) # def lookup_slug(name) builds_yml['slugs'].each_pair do |slug, match_string| - return slug if name.start_with?(match_string) && !(name.include?('i386') || name.include?('arm64')) + if name.include?('arm64') + return slug if name.start_with?(match_string) && slug.include?('arm64') + else + return slug if name.start_with?(match_string) && !slug.include?('arm64') + end end nil @@ -78,7 +82,7 @@ def box_desc(name) end def slug_desc(name) - "Vanilla #{name.tr('-', ' ').capitalize}.x Vagrant box created with Bento by Chef. This box will be updated with the latest releases of #{name.tr('-', ' ').capitalize} as they become available" + "Vanilla #{name.tr('-', ' ').capitalize} Vagrant box created with Bento by Chef. This box will be updated with the latest releases of #{name.tr('-', ' ').capitalize} as they become available" end def ver_desc(md_data) diff --git a/lib/bento/version.rb b/lib/bento/version.rb index 003a98f00..dfdcdfa2b 100644 --- a/lib/bento/version.rb +++ b/lib/bento/version.rb @@ -1,3 +1,3 @@ module Bento - VERSION = '3.0.0'.freeze + VERSION = '3.1.0'.freeze end diff --git a/os_pkrvars/debian/debian-10-aarch64.pkrvars.hcl b/os_pkrvars/debian/debian-10-aarch64.pkrvars.hcl index d35d79132..c1a92a298 100644 --- a/os_pkrvars/debian/debian-10-aarch64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-10-aarch64.pkrvars.hcl @@ -2,7 +2,7 @@ os_name = "debian" os_version = "10.13" os_arch = "aarch64" iso_url = "https://cdimage.debian.org/cdimage/archive/10.13.0/arm64/iso-dvd/debian-10.13.0-arm64-DVD-1.iso" -iso_checksum = "5c6f6df5febf691e95c08b630db3b1c13b9c5b3d19ea4b1515207f09385e186d" +iso_checksum = "file:https://cdimage.debian.org/cdimage/archive/10.13.0/arm64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" vmware_guest_os_type = "arm-debian-64" diff --git a/os_pkrvars/debian/debian-10-x86_64.pkrvars.hcl b/os_pkrvars/debian/debian-10-x86_64.pkrvars.hcl index fe00bae06..d7b46b054 100644 --- a/os_pkrvars/debian/debian-10-x86_64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-10-x86_64.pkrvars.hcl @@ -2,7 +2,7 @@ os_name = "debian" os_version = "10.13" os_arch = "x86_64" iso_url = "https://cdimage.debian.org/cdimage/archive/10.13.0/amd64/iso-dvd/debian-10.13.0-amd64-DVD-1.iso" -iso_checksum = "07d493c305aa5313e767181af5ef2c2b2758a4a3f57e78fb4a4fcba1dcefb198" +iso_checksum = "file:https://cdimage.debian.org/cdimage/archive/10.13.0/amd64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" vmware_guest_os_type = "debian-64" diff --git a/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl b/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl index 79194f0b3..9920c5fea 100644 --- a/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl @@ -2,7 +2,7 @@ os_name = "debian" os_version = "11.7" os_arch = "aarch64" iso_url = "https://cdimage.debian.org/debian-cd/current/arm64/iso-dvd/debian-11.7.0-arm64-DVD-1.iso" -iso_checksum = "3b0d304379b671d7b7091631765f87e1cbb96b9f03f8e9a595a2bf540c789f3f" +iso_checksum = "file:https://cdimage.debian.org/debian-cd/current/arm64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" vmware_guest_os_type = "arm-debian-64" diff --git a/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl b/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl index bfd935b8c..bf7474dfb 100644 --- a/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl +++ b/os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl @@ -2,7 +2,7 @@ os_name = "debian" os_version = "11.7" os_arch = "x86_64" iso_url = "https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-11.7.0-amd64-DVD-1.iso" -iso_checksum = "cfbb1387d92c83f49420eca06e2d11a23e5a817a21a5d614339749634709a32f" +iso_checksum = "file:https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/SHA256SUMS" parallels_guest_os_type = "debian" vbox_guest_os_type = "Debian_64" vmware_guest_os_type = "debian-64" diff --git a/os_pkrvars/freebsd/freebsd-12-aarch64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-12-aarch64.pkrvars.hcl new file mode 100644 index 000000000..b79ee2f48 --- /dev/null +++ b/os_pkrvars/freebsd/freebsd-12-aarch64.pkrvars.hcl @@ -0,0 +1,9 @@ +os_name = "freebsd" +os_version = "12.4" +os_arch = "aarch64" +iso_url = "https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/12.4/FreeBSD-12.4-RELEASE-arm64-aarch64-disc1.iso" +iso_checksum = "file:https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/12.4/CHECKSUM.SHA256-FreeBSD-12.4-RELEASE-arm64-aarch64" +parallels_guest_os_type = "freebsd" +vbox_guest_os_type = "FreeBSD_64" +vmware_guest_os_type = "arm-freebsd-64" +boot_command = ["boot -s/bin/shmdmfs -s 100m md1 /tmpmdmfs -s 100m md2 /mntdhclient -p /tmp/dhclient.em0.pid -l /tmp/dhclient.lease.em0 em0fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd/installerconfig \u0026\u0026 bsdinstall script /tmp/installerconfig"] diff --git a/os_pkrvars/freebsd/freebsd-12-x86_64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-12-x86_64.pkrvars.hcl index 4053f8bf1..41181b3a9 100644 --- a/os_pkrvars/freebsd/freebsd-12-x86_64.pkrvars.hcl +++ b/os_pkrvars/freebsd/freebsd-12-x86_64.pkrvars.hcl @@ -5,5 +5,5 @@ iso_url = "https://download.freebsd.org/releases/amd64/amd64/ISO iso_checksum = "606435637b76991f96df68f561badf03266f3d5452e9f72ed9b130d96b188800" parallels_guest_os_type = "freebsd" vbox_guest_os_type = "FreeBSD_64" -vmware_guest_os_type = "freedsd-64" +vmware_guest_os_type = "freebsd-64" boot_command = ["boot -s/bin/shmdmfs -s 100m md1 /tmpmdmfs -s 100m md2 /mntdhclient -p /tmp/dhclient.em0.pid -l /tmp/dhclient.lease.em0 em0fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd/installerconfig \u0026\u0026 bsdinstall script /tmp/installerconfig"] diff --git a/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl new file mode 100644 index 000000000..6c8ec883a --- /dev/null +++ b/os_pkrvars/freebsd/freebsd-13-aarch64.pkrvars.hcl @@ -0,0 +1,9 @@ +os_name = "freebsd" +os_version = "13.2" +os_arch = "x86_64" +iso_url = "https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/13.2/FreeBSD-13.2-RELEASE-arm64-aarch64-disc1.iso" +iso_checksum = "file:https://download.freebsd.org/releases/arm64/aarch64/ISO-IMAGES/13.2/CHECKSUM.SHA256-FreeBSD-13.2-RELEASE-arm64-aarch64" +parallels_guest_os_type = "freebsd" +vbox_guest_os_type = "FreeBSD_64" +vmware_guest_os_type = "arm-freebsd-64" +boot_command = ["boot -s/bin/shmdmfs -s 100m md1 /tmpmdmfs -s 100m md2 /mntdhclient -p /tmp/dhclient.em0.pid -l /tmp/dhclient.lease.em0 em0fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd/installerconfig && bsdinstall script /tmp/installerconfig"] diff --git a/os_pkrvars/freebsd/freebsd-13-x86_64.pkrvars.hcl b/os_pkrvars/freebsd/freebsd-13-x86_64.pkrvars.hcl index e7fc62048..74d59042e 100644 --- a/os_pkrvars/freebsd/freebsd-13-x86_64.pkrvars.hcl +++ b/os_pkrvars/freebsd/freebsd-13-x86_64.pkrvars.hcl @@ -1,9 +1,9 @@ os_name = "freebsd" -os_version = "13.1" +os_version = "13.2" os_arch = "x86_64" -iso_url = "https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/13.1/FreeBSD-13.1-RELEASE-amd64-disc1.iso" -iso_checksum = "697d81653fa246b921ddfcf1d15562c55249cc727b11fa3e47f470e2cf2b6a40" +iso_url = "https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/13.2/FreeBSD-13.2-RELEASE-amd64-disc1.iso" +iso_checksum = "file:https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/13.2/CHECKSUM.SHA256-FreeBSD-13.2-RELEASE-amd64" parallels_guest_os_type = "freebsd" vbox_guest_os_type = "FreeBSD_64" -vmware_guest_os_type = "freedsd-64" +vmware_guest_os_type = "freebsd-64" boot_command = ["boot -s/bin/shmdmfs -s 100m md1 /tmpmdmfs -s 100m md2 /mntdhclient -p /tmp/dhclient.em0.pid -l /tmp/dhclient.lease.em0 em0fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd/installerconfig && bsdinstall script /tmp/installerconfig"] diff --git a/os_pkrvars/oraclelinux/oraclelinux-7-aarch64.pkrvars.hcl b/os_pkrvars/oraclelinux/oracle-7-aarch64.pkrvars.hcl similarity index 93% rename from os_pkrvars/oraclelinux/oraclelinux-7-aarch64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oracle-7-aarch64.pkrvars.hcl index b44d97cc1..ec6471c14 100644 --- a/os_pkrvars/oraclelinux/oraclelinux-7-aarch64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oracle-7-aarch64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "oraclelinux" +os_name = "oracle" os_version = "7.9" os_arch = "aarch64" iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL7/u9/aarch64/OracleLinux-R7-U9-Server-aarch64-dvd.iso" diff --git a/os_pkrvars/oraclelinux/oraclelinux-7-x86_64.pkrvars.hcl b/os_pkrvars/oraclelinux/oracle-7-x86_64.pkrvars.hcl similarity index 92% rename from os_pkrvars/oraclelinux/oraclelinux-7-x86_64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oracle-7-x86_64.pkrvars.hcl index 6bd8977ad..49a1a6f40 100644 --- a/os_pkrvars/oraclelinux/oraclelinux-7-x86_64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oracle-7-x86_64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "oraclelinux" +os_name = "oracle" os_version = "7.9" os_arch = "x86_64" iso_url = "http://mirrors.dotsrc.org/oracle-linux/OL7/u9/x86_64/OracleLinux-R7-U9-Server-x86_64-dvd.iso" diff --git a/os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl b/os_pkrvars/oraclelinux/oracle-8-aarch64.pkrvars.hcl similarity index 93% rename from os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oracle-8-aarch64.pkrvars.hcl index a6658dffd..260bfe051 100644 --- a/os_pkrvars/oraclelinux/oraclelinux-8-aarch64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oracle-8-aarch64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "oraclelinux" +os_name = "oracle" os_version = "8.7" os_arch = "aarch64" iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL8/u7/aarch64/OracleLinux-R8-U7-aarch64-dvd.iso" diff --git a/os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl b/os_pkrvars/oraclelinux/oracle-8-x86_64.pkrvars.hcl similarity index 92% rename from os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oracle-8-x86_64.pkrvars.hcl index bbfea5fff..4bf455445 100644 --- a/os_pkrvars/oraclelinux/oraclelinux-8-x86_64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oracle-8-x86_64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "oraclelinux" +os_name = "oracle" os_version = "8.7" os_arch = "x86_64" iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL8/u7/x86_64/OracleLinux-R8-U7-x86_64-dvd.iso" diff --git a/os_pkrvars/oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl b/os_pkrvars/oraclelinux/oracle-9-aarch64.pkrvars.hcl similarity index 93% rename from os_pkrvars/oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oracle-9-aarch64.pkrvars.hcl index c237b0ad3..f7e44708b 100644 --- a/os_pkrvars/oraclelinux/oraclelinux-9-aarch64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oracle-9-aarch64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "oraclelinux" +os_name = "oracle" os_version = "9.1" os_arch = "aarch64" iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL9/u1/aarch64/OracleLinux-R9-U1-aarch64-dvd.iso" diff --git a/os_pkrvars/oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl b/os_pkrvars/oraclelinux/oracle-9-x86_64.pkrvars.hcl similarity index 92% rename from os_pkrvars/oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl rename to os_pkrvars/oraclelinux/oracle-9-x86_64.pkrvars.hcl index dd4cc14ce..483c1b5db 100644 --- a/os_pkrvars/oraclelinux/oraclelinux-9-x86_64.pkrvars.hcl +++ b/os_pkrvars/oraclelinux/oracle-9-x86_64.pkrvars.hcl @@ -1,4 +1,4 @@ -os_name = "oraclelinux" +os_name = "oracle" os_version = "9.1" os_arch = "x86_64" iso_url = "https://yum.oracle.com/ISOS/OracleLinux/OL9/u1/x86_64/OracleLinux-R9-U1-x86_64-dvd.iso" diff --git a/os_pkrvars/ubuntu/ubuntu-23.04-aarch64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-23.04-aarch64.pkrvars.hcl new file mode 100644 index 000000000..2fe67e0db --- /dev/null +++ b/os_pkrvars/ubuntu/ubuntu-23.04-aarch64.pkrvars.hcl @@ -0,0 +1,10 @@ +os_name = "ubuntu" +os_version = "23.04" +os_arch = "aarch64" +iso_url = "https://cdimage.ubuntu.com/releases/23.04/release/ubuntu-23.04-live-server-arm64.iso" +iso_checksum = "file:https://cdimage.ubuntu.com/releases/23.04/release/SHA256SUMS" +hyperv_generation = 2 +parallels_guest_os_type = "ubuntu" +vbox_guest_os_type = "Ubuntu_64" +vmware_guest_os_type = "arm-ubuntu-64" +boot_command = ["e autoinstall ds=nocloud-net\\;s=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu/"] diff --git a/os_pkrvars/ubuntu/ubuntu-23.04-x86_64.pkrvars.hcl b/os_pkrvars/ubuntu/ubuntu-23.04-x86_64.pkrvars.hcl new file mode 100644 index 000000000..8566f175c --- /dev/null +++ b/os_pkrvars/ubuntu/ubuntu-23.04-x86_64.pkrvars.hcl @@ -0,0 +1,10 @@ +os_name = "ubuntu" +os_version = "23.04" +os_arch = "x86_64" +iso_url = "https://releases.ubuntu.com/23.04/ubuntu-23.04-live-server-amd64.iso" +iso_checksum = "file:https://releases.ubuntu.com/23.04/SHA256SUMS" +hyperv_generation = 2 +parallels_guest_os_type = "ubuntu" +vbox_guest_os_type = "Ubuntu_64" +vmware_guest_os_type = "ubuntu-64" +boot_command = ["e autoinstall ds=nocloud-net\\;s=http://{{.HTTPIP}}:{{.HTTPPort}}/ubuntu/"] diff --git a/packer_templates/pkr-builder.pkr.hcl b/packer_templates/pkr-builder.pkr.hcl index c586f3ada..fea149913 100644 --- a/packer_templates/pkr-builder.pkr.hcl +++ b/packer_templates/pkr-builder.pkr.hcl @@ -22,8 +22,8 @@ packer { source = "github.com/hashicorp/virtualbox" } vmware = { - version = ">= 0.0.1" - source = "github.com/stromweld/vmware" # TODO: switching to stromweld repo for fix to vmware tools for fusion 13 till official fix is in place https://github.com/hashicorp/packer-plugin-vmware/issues/109 + version = ">= 1.0.8" + source = "github.com/hashicorp/vmware" } windows-update = { version = ">= 0.14.1" @@ -125,7 +125,7 @@ locals { ] : ( "${var.os_name}-${substr(var.os_version, 0, 1)}" == "amazonlinux-2" || "${var.os_name}-${substr(var.os_version, 0, 1)}" == "centos-7" || - "${var.os_name}-${substr(var.os_version, 0, 1)}" == "oraclelinux-7" || + "${var.os_name}-${substr(var.os_version, 0, 1)}" == "oracle-7" || "${var.os_name}-${substr(var.os_version, 0, 1)}" == "rhel-7" || "${var.os_name}-${substr(var.os_version, 0, 1)}" == "scientificlinux-7" || "${var.os_name}-${substr(var.os_version, 0, 1)}" == "springdalelinux-7" ? [ diff --git a/packer_templates/pkr-sources.pkr.hcl b/packer_templates/pkr-sources.pkr.hcl index 3ab89f5df..ca1904f2b 100644 --- a/packer_templates/pkr-sources.pkr.hcl +++ b/packer_templates/pkr-sources.pkr.hcl @@ -64,6 +64,8 @@ locals { var.os_name == "amazonlinux" ? "${path.root}/amz_working_files/amazon2.ovf" : null ) : var.vbox_source + # vmware-iso + # Source block common boot_wait = var.boot_wait == null ? ( var.is_windows ? "60s" : "10s" @@ -103,68 +105,74 @@ locals { # https://www.packer.io/docs/templates/hcl_templates/blocks/source source "hyperv-iso" "vm" { + # Hyper-v specific options enable_dynamic_memory = local.hyperv_enable_dynamic_memory enable_secure_boot = local.hyperv_enable_secure_boot generation = var.hyperv_generation guest_additions_mode = var.hyperv_guest_additions_mode switch_name = var.hyperv_switch_name - boot_command = var.boot_command - boot_wait = local.boot_wait - cpus = var.cpus - communicator = local.communicator - disk_size = var.disk_size - floppy_files = local.floppy_files - headless = var.headless - http_directory = local.http_directory - iso_checksum = var.iso_checksum - iso_url = var.iso_url - memory = local.memory - output_directory = "${local.output_directory}-hyperv" - shutdown_command = local.shutdown_command - shutdown_timeout = var.shutdown_timeout - ssh_password = var.ssh_password - ssh_port = var.ssh_port - ssh_timeout = var.ssh_timeout - ssh_username = var.ssh_username - winrm_password = var.winrm_password - winrm_timeout = var.winrm_timeout - winrm_username = var.winrm_username - vm_name = local.vm_name + # Source block common options + boot_command = var.boot_command + boot_wait = local.boot_wait + cpus = var.cpus + communicator = local.communicator + disk_size = var.disk_size + floppy_files = local.floppy_files + headless = var.headless + http_directory = local.http_directory + iso_checksum = var.iso_checksum + iso_url = var.iso_url + memory = local.memory + output_directory = "${local.output_directory}-hyperv" + shutdown_command = local.shutdown_command + shutdown_timeout = var.shutdown_timeout + ssh_password = var.ssh_password + ssh_port = var.ssh_port + ssh_timeout = var.ssh_timeout + ssh_username = var.ssh_username + winrm_password = var.winrm_password + winrm_timeout = var.winrm_timeout + winrm_username = var.winrm_username + vm_name = local.vm_name } source "parallels-iso" "vm" { + # Parallels specific options guest_os_type = var.parallels_guest_os_type parallels_tools_flavor = local.parallels_tools_flavor parallels_tools_mode = local.parallels_tools_mode prlctl = local.parallels_prlctl prlctl_version_file = var.parallels_prlctl_version_file - boot_command = var.boot_command - boot_wait = local.boot_wait - cpus = var.cpus - communicator = local.communicator - disk_size = var.disk_size - floppy_files = local.floppy_files - http_directory = local.http_directory - iso_checksum = var.iso_checksum - iso_url = var.iso_url - memory = local.memory - output_directory = "${local.output_directory}-parallels" - shutdown_command = local.shutdown_command - shutdown_timeout = var.shutdown_timeout - ssh_password = var.ssh_password - ssh_port = var.ssh_port - ssh_timeout = var.ssh_timeout - ssh_username = var.ssh_username - winrm_password = var.winrm_password - winrm_timeout = var.winrm_timeout - winrm_username = var.winrm_username - vm_name = local.vm_name + # Source block common options + boot_command = var.boot_command + boot_wait = local.boot_wait + cpus = var.cpus + communicator = local.communicator + disk_size = var.disk_size + floppy_files = local.floppy_files + http_directory = local.http_directory + iso_checksum = var.iso_checksum + iso_url = var.iso_url + memory = local.memory + output_directory = "${local.output_directory}-parallels" + shutdown_command = local.shutdown_command + shutdown_timeout = var.shutdown_timeout + ssh_password = var.ssh_password + ssh_port = var.ssh_port + ssh_timeout = var.ssh_timeout + ssh_username = var.ssh_username + winrm_password = var.winrm_password + winrm_timeout = var.winrm_timeout + winrm_username = var.winrm_username + vm_name = local.vm_name } source "qemu" "vm" { - accelerator = var.qemu_accelerator - display = var.headless ? "none" : var.qemu_display - machine_type = local.qemu_machine_type - qemu_binary = local.qemu_binary - qemuargs = local.qemuargs + # QEMU specific options + accelerator = var.qemu_accelerator + display = var.headless ? "none" : var.qemu_display + machine_type = local.qemu_machine_type + qemu_binary = local.qemu_binary + qemuargs = local.qemuargs + # Source block common options boot_command = var.boot_command boot_wait = local.boot_wait cd_files = local.cd_files @@ -190,6 +198,7 @@ source "qemu" "vm" { vm_name = local.vm_name } source "virtualbox-iso" "vm" { + # Virtualbox specific options gfx_controller = local.vbox_gfx_controller gfx_vram_size = local.vbox_gfx_vram_size guest_additions_path = var.vbox_guest_additions_path @@ -200,77 +209,82 @@ source "virtualbox-iso" "vm" { iso_interface = var.vbox_iso_interface vboxmanage = var.vboxmanage virtualbox_version_file = var.virtualbox_version_file - boot_command = var.boot_command - boot_wait = local.boot_wait - cpus = var.cpus - communicator = local.communicator - disk_size = var.disk_size - floppy_files = local.floppy_files - headless = var.headless - http_directory = local.http_directory - iso_checksum = var.iso_checksum - iso_url = var.iso_url - memory = local.memory - output_directory = "${local.output_directory}-virtualbox" - shutdown_command = local.shutdown_command - shutdown_timeout = var.shutdown_timeout - ssh_password = var.ssh_password - ssh_port = var.ssh_port - ssh_timeout = var.ssh_timeout - ssh_username = var.ssh_username - winrm_password = var.winrm_password - winrm_timeout = var.winrm_timeout - winrm_username = var.winrm_username - vm_name = local.vm_name + # Source block common options + boot_command = var.boot_command + boot_wait = local.boot_wait + cpus = var.cpus + communicator = local.communicator + disk_size = var.disk_size + floppy_files = local.floppy_files + headless = var.headless + http_directory = local.http_directory + iso_checksum = var.iso_checksum + iso_url = var.iso_url + memory = local.memory + output_directory = "${local.output_directory}-virtualbox" + shutdown_command = local.shutdown_command + shutdown_timeout = var.shutdown_timeout + ssh_password = var.ssh_password + ssh_port = var.ssh_port + ssh_timeout = var.ssh_timeout + ssh_username = var.ssh_username + winrm_password = var.winrm_password + winrm_timeout = var.winrm_timeout + winrm_username = var.winrm_username + vm_name = local.vm_name } source "virtualbox-ovf" "amazonlinux" { + # Virtualbox specific options guest_additions_path = var.vbox_guest_additions_path source_path = local.vbox_source vboxmanage = var.vboxmanage virtualbox_version_file = var.virtualbox_version_file - communicator = local.communicator - headless = var.headless - output_directory = "${local.output_directory}-virtualbox-ovf" - shutdown_command = local.shutdown_command - shutdown_timeout = var.shutdown_timeout - ssh_password = var.ssh_password - ssh_port = var.ssh_port - ssh_timeout = var.ssh_timeout - ssh_username = var.ssh_username - vm_name = local.vm_name + # Source block common options + communicator = local.communicator + headless = var.headless + output_directory = "${local.output_directory}-virtualbox-ovf" + shutdown_command = local.shutdown_command + shutdown_timeout = var.shutdown_timeout + ssh_password = var.ssh_password + ssh_port = var.ssh_port + ssh_timeout = var.ssh_timeout + ssh_username = var.ssh_username + vm_name = local.vm_name } source "vmware-iso" "vm" { + # VMware specific options cdrom_adapter_type = var.vmware_cdrom_adapter_type disk_adapter_type = var.vmware_disk_adapter_type guest_os_type = var.vmware_guest_os_type + network = var.vmware_network + network_adapter_type = var.vmware_network_adapter_type tools_upload_flavor = var.vmware_tools_upload_flavor tools_upload_path = var.vmware_tools_upload_path + usb = var.vmware_enable_usb version = var.vmware_version vmx_data = var.vmware_vmx_data vmx_remove_ethernet_interfaces = var.vmware_vmx_remove_ethernet_interfaces - boot_command = var.boot_command - boot_wait = local.boot_wait - cpus = var.cpus - communicator = local.communicator - disk_size = var.disk_size - floppy_files = local.floppy_files - headless = var.headless - http_directory = local.http_directory - iso_checksum = var.iso_checksum - iso_url = var.iso_url - memory = local.memory - output_directory = "${local.output_directory}-vmware" - shutdown_command = local.shutdown_command - shutdown_timeout = var.shutdown_timeout - ssh_password = var.ssh_password - ssh_port = var.ssh_port - ssh_timeout = var.ssh_timeout - ssh_username = var.ssh_username - winrm_password = var.winrm_password - winrm_timeout = var.winrm_timeout - winrm_username = var.winrm_username - vm_name = local.vm_name - usb = var.vmware_enable_usb - network = var.vmware_network - network_adapter_type = var.vmware_network_adapter_type + # Source block common options + boot_command = var.boot_command + boot_wait = local.boot_wait + cpus = var.cpus + communicator = local.communicator + disk_size = var.disk_size + floppy_files = local.floppy_files + headless = var.headless + http_directory = local.http_directory + iso_checksum = var.iso_checksum + iso_url = var.iso_url + memory = local.memory + output_directory = "${local.output_directory}-vmware" + shutdown_command = local.shutdown_command + shutdown_timeout = var.shutdown_timeout + ssh_password = var.ssh_password + ssh_port = var.ssh_port + ssh_timeout = var.ssh_timeout + ssh_username = var.ssh_username + winrm_password = var.winrm_password + winrm_timeout = var.winrm_timeout + winrm_username = var.winrm_username + vm_name = local.vm_name } diff --git a/packer_templates/pkr-variables.pkr.hcl b/packer_templates/pkr-variables.pkr.hcl index 534457253..6de55b7f4 100644 --- a/packer_templates/pkr-variables.pkr.hcl +++ b/packer_templates/pkr-variables.pkr.hcl @@ -225,6 +225,7 @@ variable "vmware_network" { type = string default = "nat" } + # Source block common variables variable "boot_command" { type = list(string)