Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates #1498

Merged
merged 16 commits into from
May 17, 2023
9 changes: 0 additions & 9 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pkr-bld-hyperv-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
# - windows-10
# - windows-10gen2
# - windows-11
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pkr-bld-parallels-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
- debian-11
- fedora-37
- fedora-38
- freebsd-12
- freebsd-13
- oraclelinux-7
- oraclelinux-8
- oraclelinux-9
Expand All @@ -27,6 +29,7 @@ jobs:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
provider:
- parallels-iso
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pkr-bld-parallels-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
# - windows-10
# - windows-11
# - windows-2012r2
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pkr-bld-qemu-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
- debian-11
- fedora-37
- fedora-38
- freebsd-12
- freebsd-13
- oraclelinux-7
- oraclelinux-8
- oraclelinux-9
Expand All @@ -27,6 +29,7 @@ jobs:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
provider:
- qemu
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pkr-bld-qemu-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
# - windows-10
# - windows-11
# - windows-2012r2
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pkr-bld-virtualbox-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
- debian-11
- fedora-37
- fedora-38
- freebsd-12
- freebsd-13
- oraclelinux-7
- oraclelinux-8
- oraclelinux-9
Expand All @@ -27,6 +29,7 @@ jobs:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
provider:
- virtualbox-iso
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pkr-bld-virtualbox-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
# - windows-10
# - windows-11
# - windows-2012r2
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pkr-bld-vmware-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
- debian-11
- fedora-37
- fedora-38
- freebsd-12
- freebsd-13
- oraclelinux-7
- oraclelinux-8
- oraclelinux-9
Expand All @@ -27,6 +29,7 @@ jobs:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
provider:
- vmware-iso
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pkr-bld-vmware-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-22.10
- ubuntu-23.04
# - windows-10
# - windows-11
# - windows-2012r2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ Berksfile.lock
.kitchen.yml
kitchen.yml
*.metadata.json
bento-*.gem
24 changes: 22 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Markdown table generated at <https://www.tablesgenerator.com/markdown_tables#>
| 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 |
Expand Down Expand Up @@ -50,12 +50,32 @@ Markdown table generated at <https://www.tablesgenerator.com/markdown_tables#>
| 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)

Expand Down
2 changes: 1 addition & 1 deletion bento.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
85 changes: 52 additions & 33 deletions builds.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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'
Expand All @@ -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
Expand All @@ -64,3 +72,14 @@ do_not_build:
- solaris
- rhel
- windows
# - almalinux
# - centos
# - debian
# - fedora
# - freebsd
# - opensuse-leap
# - oracle
# - rockylinux
# - scientificlinux
# - springdalelinux
# - ubuntu
7 changes: 6 additions & 1 deletion lib/bento/buildmetadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/bento/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand All @@ -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(' ')}'")
Expand Down
8 changes: 6 additions & 2 deletions lib/bento/upload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/bento/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Bento
VERSION = '3.0.0'.freeze
VERSION = '3.1.0'.freeze
end
2 changes: 1 addition & 1 deletion os_pkrvars/debian/debian-10-aarch64.pkrvars.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion os_pkrvars/debian/debian-10-x86_64.pkrvars.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion os_pkrvars/debian/debian-11-aarch64.pkrvars.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion os_pkrvars/debian/debian-11-x86_64.pkrvars.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading