From b9e409e39035dbdba6f4a56680fd63dc736c11b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guszt=C3=A1v=20Varga?= Date: Sat, 8 Jun 2024 22:00:16 +0200 Subject: [PATCH 1/4] Update core components --- build.cake | 2 +- lib/gusztavvargadr/chef | 2 +- samples/ubuntu-desktop/images.pkrvars.hcl | 2 +- samples/ubuntu-server/images.pkrvars.hcl | 3 +-- .../gusztavvargadr_packer_ubuntu/recipes/initialize.rb | 2 +- src/windows/boot/autounattend-first-logon.ps1 | 2 +- src/windows/boot/autounattend.xml | 2 +- .../gusztavvargadr_packer_windows/recipes/initialize.rb | 2 +- 8 files changed, 8 insertions(+), 9 deletions(-) diff --git a/build.cake b/build.cake index 2e4430109..b95bec008 100644 --- a/build.cake +++ b/build.cake @@ -2,7 +2,7 @@ var configuration = Argument("configuration", string.Empty); var target = Argument("target", "default"); var author = Argument("author", "gusztavvargadr"); -var version = Argument("version", "2404"); +var version = Argument("version", "2405"); var configurationParts = configuration.Split('/', StringSplitOptions.RemoveEmptyEntries); var sample = configurationParts.ElementAtOrDefault(0) ?? Argument("sample"); diff --git a/lib/gusztavvargadr/chef b/lib/gusztavvargadr/chef index fa1666370..dc7180f22 160000 --- a/lib/gusztavvargadr/chef +++ b/lib/gusztavvargadr/chef @@ -1 +1 @@ -Subproject commit fa1666370eed5969b471534628f6bdea659948b6 +Subproject commit dc7180f22759c6d8193bdd504b5de7657ccca01a diff --git a/samples/ubuntu-desktop/images.pkrvars.hcl b/samples/ubuntu-desktop/images.pkrvars.hcl index 4cbb65fb1..6c384cef2 100644 --- a/samples/ubuntu-desktop/images.pkrvars.hcl +++ b/samples/ubuntu-desktop/images.pkrvars.hcl @@ -38,7 +38,7 @@ images = { native = { source_iso_url_local = "xubuntu-24.04-desktop-amd64.iso" - source_iso_url_remote = "https://nl.archive.ubuntu.com/ubuntu-cdimage-xubuntu/releases/24.04/release/xubuntu-24.04-desktop-amd64.iso" + source_iso_url_remote = "https://cdimage.ubuntu.com/xubuntu/releases/24.04/release/xubuntu-24.04-desktop-amd64.iso" source_iso_checksum = "sha256:8c47b15c4089473bcc58e369a472cabf83d137c7bf8ad7d9465ad086e7bd5272" chef_attributes = "xubuntu" diff --git a/samples/ubuntu-server/images.pkrvars.hcl b/samples/ubuntu-server/images.pkrvars.hcl index 5c2e83c1c..4fdd394cf 100644 --- a/samples/ubuntu-server/images.pkrvars.hcl +++ b/samples/ubuntu-server/images.pkrvars.hcl @@ -7,7 +7,7 @@ images = { native = { source_iso_url_local = "ubuntu-24.04-live-server-amd64.iso" - source_iso_url_remote = "https://releases.ubuntu.com/24.04/ubuntu-24.04-live-server-amd64.iso" + source_iso_url_remote = "https://app.vagrantup.com/gusztavvargadr-iso/boxes/ubuntu-server/versions/2404.0.2404/providers/iso/amd64/vagrant.box" source_iso_checksum = "sha256:8762f7e74e4d64d72fceb5f70682e6b069932deedb4949c6975d0f0fe0a91be3" } @@ -20,7 +20,6 @@ images = { } } - "2204-lts" = { core = { image_description = "Ubuntu Server 22.04 LTS" diff --git a/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/initialize.rb b/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/initialize.rb index 45c153629..b70fd0e5a 100644 --- a/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/initialize.rb +++ b/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/initialize.rb @@ -5,7 +5,7 @@ if vbox? vbox_version = (shell_out('VBoxControl -v').stdout rescue '').strip - unless vbox_version.include?('6.') + unless vbox_version.include?('7.') apt_package [ 'build-essential', 'cryptsetup', 'libssl-dev', 'libreadline-dev', 'zlib1g-dev', 'linux-source', 'dkms', 'linux-headers-generic' ] do action :upgrade notifies :run, 'bash[guest-additions]', :immediately diff --git a/src/windows/boot/autounattend-first-logon.ps1 b/src/windows/boot/autounattend-first-logon.ps1 index c86fb9ace..9d906fc84 100644 --- a/src/windows/boot/autounattend-first-logon.ps1 +++ b/src/windows/boot/autounattend-first-logon.ps1 @@ -3,7 +3,7 @@ $ProgressPreference = 'SilentlyContinue' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Write-Host "Install Chocolatey" -%{ for chocolatey_version in compact([lookup(boot, "boot_chocolatey_version", "2.2.2")]) ~} +%{ for chocolatey_version in compact([lookup(boot, "boot_chocolatey_version", "2.3.0")]) ~} $env:chocolateyVersion = '${chocolatey_version}' %{ endfor ~} Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-WebRequest https://chocolatey.org/install.ps1 -UseBasicParsing | Invoke-Expression diff --git a/src/windows/boot/autounattend.xml b/src/windows/boot/autounattend.xml index eb14875f7..418ff1531 100644 --- a/src/windows/boot/autounattend.xml +++ b/src/windows/boot/autounattend.xml @@ -26,7 +26,7 @@ 1 - 1000 + 500 Primary diff --git a/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/initialize.rb b/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/initialize.rb index f9a38f41d..e88a83fcd 100644 --- a/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/initialize.rb +++ b/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/initialize.rb @@ -75,7 +75,7 @@ if vbox? vbox_version = (powershell_out('& "C:/Program Files/Oracle/VirtualBox Guest Additions/VBoxControl.exe" -v').stdout rescue '').strip - unless vbox_version.include?('6.') + unless vbox_version.include?('7.') vbox_version = powershell_out('cat $env:HOME/.vbox_version').stdout.strip vbox_guest_additions_path = "#{Chef::Config['file_cache_path']}/VBoxGuestAdditions.iso" vbox_guest_additions_source = "https://download.virtualbox.org/virtualbox/#{vbox_version}/VBoxGuestAdditions_#{vbox_version}.iso" From 8b09ab8b449db88b3e96b367d33149eef61376f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guszt=C3=A1v=20Varga?= Date: Sun, 9 Jun 2024 18:12:36 +0200 Subject: [PATCH 2/4] Consolidate VirtualBox versions --- .../gusztavvargadr_packer_ubuntu/recipes/initialize.rb | 2 +- .../gusztavvargadr_packer_windows/recipes/initialize.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/initialize.rb b/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/initialize.rb index b70fd0e5a..c530924ff 100644 --- a/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/initialize.rb +++ b/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/initialize.rb @@ -5,7 +5,7 @@ if vbox? vbox_version = (shell_out('VBoxControl -v').stdout rescue '').strip - unless vbox_version.include?('7.') + unless vbox_version.include?('6.') || vbox_version.include?('7.') apt_package [ 'build-essential', 'cryptsetup', 'libssl-dev', 'libreadline-dev', 'zlib1g-dev', 'linux-source', 'dkms', 'linux-headers-generic' ] do action :upgrade notifies :run, 'bash[guest-additions]', :immediately diff --git a/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/initialize.rb b/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/initialize.rb index e88a83fcd..f40e7a9d6 100644 --- a/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/initialize.rb +++ b/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/initialize.rb @@ -75,7 +75,7 @@ if vbox? vbox_version = (powershell_out('& "C:/Program Files/Oracle/VirtualBox Guest Additions/VBoxControl.exe" -v').stdout rescue '').strip - unless vbox_version.include?('7.') + unless vbox_version.include?('6.') || vbox_version.include?('7.') vbox_version = powershell_out('cat $env:HOME/.vbox_version').stdout.strip vbox_guest_additions_path = "#{Chef::Config['file_cache_path']}/VBoxGuestAdditions.iso" vbox_guest_additions_source = "https://download.virtualbox.org/virtualbox/#{vbox_version}/VBoxGuestAdditions_#{vbox_version}.iso" From 1fd390aa6023ac34d9ea844d83368f788df0c442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guszt=C3=A1v=20Varga?= Date: Sun, 9 Jun 2024 22:16:56 +0200 Subject: [PATCH 3/4] Update Docker Linux --- .../docker-linux/community-ubuntu-server/hyperv.yml | 2 +- .../docker-linux/community-ubuntu-server/virtualbox.yml | 2 +- .../docker-linux/community-ubuntu-server/vmware.yml | 2 +- samples/docker-linux/README.md | 2 +- samples/docker-linux/images.pkrvars.hcl | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/docker-linux/community-ubuntu-server/hyperv.yml b/.azure-pipelines/docker-linux/community-ubuntu-server/hyperv.yml index aa6e5d739..c7d1fb24e 100644 --- a/.azure-pipelines/docker-linux/community-ubuntu-server/hyperv.yml +++ b/.azure-pipelines/docker-linux/community-ubuntu-server/hyperv.yml @@ -4,7 +4,7 @@ pr: none resources: pipelines: - pipeline: source - source: ubuntu-server.2204-lts.hyperv + source: ubuntu-server.2404-lts.hyperv stages: - template: ../../stages.yml diff --git a/.azure-pipelines/docker-linux/community-ubuntu-server/virtualbox.yml b/.azure-pipelines/docker-linux/community-ubuntu-server/virtualbox.yml index 3c57afe49..ab73f09b3 100644 --- a/.azure-pipelines/docker-linux/community-ubuntu-server/virtualbox.yml +++ b/.azure-pipelines/docker-linux/community-ubuntu-server/virtualbox.yml @@ -4,7 +4,7 @@ pr: none resources: pipelines: - pipeline: source - source: ubuntu-server.2204-lts.virtualbox + source: ubuntu-server.2404-lts.virtualbox stages: - template: ../../stages.yml diff --git a/.azure-pipelines/docker-linux/community-ubuntu-server/vmware.yml b/.azure-pipelines/docker-linux/community-ubuntu-server/vmware.yml index 275a600b8..6f2176e65 100644 --- a/.azure-pipelines/docker-linux/community-ubuntu-server/vmware.yml +++ b/.azure-pipelines/docker-linux/community-ubuntu-server/vmware.yml @@ -4,7 +4,7 @@ pr: none resources: pipelines: - pipeline: source - source: ubuntu-server.2204-lts.vmware + source: ubuntu-server.2404-lts.vmware stages: - template: ../../stages.yml diff --git a/samples/docker-linux/README.md b/samples/docker-linux/README.md index 43653b7ff..c158805ba 100644 --- a/samples/docker-linux/README.md +++ b/samples/docker-linux/README.md @@ -14,5 +14,5 @@ See the links below for the details of the available images: The template has the following settings: -- [**Ubuntu Server 22.04 LTS**](../ubuntu-server/README.md#2204-lts) +- [**Ubuntu Server 24.04 LTS**](../ubuntu-server/README.md#2404-lts) - [**Docker Engine**](https://docs.docker.com/engine/) diff --git a/samples/docker-linux/images.pkrvars.hcl b/samples/docker-linux/images.pkrvars.hcl index 42300b81e..19e4bee56 100644 --- a/samples/docker-linux/images.pkrvars.hcl +++ b/samples/docker-linux/images.pkrvars.hcl @@ -2,11 +2,11 @@ images = { "community-ubuntu-server" = { core = { image_description = "Docker Community on Ubuntu Server" - image_version = "2600.2204" + image_version = "2600.2404" } native = { - source_image = "ubuntu-server/2204-lts" + source_image = "ubuntu-server/2404-lts" } vagrant = { From 348fb09344d2c8ac838a7f4192f4ea25e843a305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guszt=C3=A1v=20Varga?= Date: Sun, 9 Jun 2024 22:21:23 +0200 Subject: [PATCH 4/4] Update Ubuntu default versions --- samples/ubuntu-desktop/README.md | 4 ++-- samples/ubuntu-desktop/Vagrantfile | 2 +- samples/ubuntu-desktop/images.pkrvars.hcl | 2 +- samples/ubuntu-server/README.md | 4 ++-- samples/ubuntu-server/Vagrantfile | 2 +- samples/ubuntu-server/images.pkrvars.hcl | 8 ++++---- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/samples/ubuntu-desktop/README.md b/samples/ubuntu-desktop/README.md index 30b9a9b9a..822f47f1b 100644 --- a/samples/ubuntu-desktop/README.md +++ b/samples/ubuntu-desktop/README.md @@ -15,7 +15,7 @@ See the links below for the details of the available images: ## 24.04 LTS Ubuntu -[Vagrant box](https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-desktop-2404-lts) +[Vagrant box](https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-desktop-2404-lts) | [Vagrant alias](https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-desktop) The template has the following settings: @@ -41,7 +41,7 @@ The template has the following settings: ## 22.04 LTS Ubuntu -[Vagrant box](https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-desktop-2204-lts) | [Vagrant alias](https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-desktop) +[Vagrant box](https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-desktop-2204-lts) The template has the following settings: diff --git a/samples/ubuntu-desktop/Vagrantfile b/samples/ubuntu-desktop/Vagrantfile index c6b6a978d..ac2bfa0d6 100644 --- a/samples/ubuntu-desktop/Vagrantfile +++ b/samples/ubuntu-desktop/Vagrantfile @@ -2,9 +2,9 @@ load "#{File.dirname(__FILE__)}/../core.Vagrantfile" Vagrant.configure("2") do |config| config_vm_define config, "2404-lts-ubuntu", "ubuntu-desktop-2404-lts" + config_vm_define config, "2404-lts-ubuntu-alias", "ubuntu-desktop" config_vm_define config, "2404-lts-xubuntu", "xubuntu-desktop-2404-lts" config_vm_define config, "2204-lts-ubuntu", "ubuntu-desktop-2204-lts" - config_vm_define config, "2204-lts-ubuntu-alias", "ubuntu-desktop" config_vm_define config, "2204-lts-xubuntu", "xubuntu-desktop-2204-lts" config_vm_define config, "2004-lts-ubuntu", "ubuntu-desktop-2004-lts" config_vm_define config, "2004-lts-xubuntu", "ubuntu-desktop-2004-lts-xfce" diff --git a/samples/ubuntu-desktop/images.pkrvars.hcl b/samples/ubuntu-desktop/images.pkrvars.hcl index 6c384cef2..5d289fb7a 100644 --- a/samples/ubuntu-desktop/images.pkrvars.hcl +++ b/samples/ubuntu-desktop/images.pkrvars.hcl @@ -18,6 +18,7 @@ images = { memory = "4096" ports = "3389" box_name = "ubuntu-desktop-2404-lts" + box_alias = "ubuntu-desktop" } virtualbox = { @@ -76,7 +77,6 @@ images = { memory = "4096" ports = "3389" box_name = "ubuntu-desktop-2204-lts" - box_alias = "ubuntu-desktop" } } diff --git a/samples/ubuntu-server/README.md b/samples/ubuntu-server/README.md index dd4a82676..245153593 100644 --- a/samples/ubuntu-server/README.md +++ b/samples/ubuntu-server/README.md @@ -12,7 +12,7 @@ See the links below for the details of the available images: ## 24.04 LTS -[Vagrant box](https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-server-2404-lts) +[Vagrant box](https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-server-2404-lts) | [Vagrant alias](https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-server) The template has the following settings: @@ -25,7 +25,7 @@ The template has the following settings: ## 22.04 LTS -[Vagrant box](https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-server-2204-lts) | [Vagrant alias](https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-server) +[Vagrant box](https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-server-2204-lts) The template has the following settings: diff --git a/samples/ubuntu-server/Vagrantfile b/samples/ubuntu-server/Vagrantfile index 58dbd4ddf..1e2ec03b6 100644 --- a/samples/ubuntu-server/Vagrantfile +++ b/samples/ubuntu-server/Vagrantfile @@ -2,8 +2,8 @@ load "#{File.dirname(__FILE__)}/../core.Vagrantfile" Vagrant.configure("2") do |config| config_vm_define config, "2404-lts", "ubuntu-server-2404-lts" + config_vm_define config, "2404-lts-alias", "ubuntu-server" config_vm_define config, "2204-lts", "ubuntu-server-2204-lts" - config_vm_define config, "2204-lts-alias", "ubuntu-server" config_vm_define config, "2004-lts", "ubuntu-server-2004-lts" config.vm.provision "shell", inline: <<-EOH diff --git a/samples/ubuntu-server/images.pkrvars.hcl b/samples/ubuntu-server/images.pkrvars.hcl index 4fdd394cf..adf3f53eb 100644 --- a/samples/ubuntu-server/images.pkrvars.hcl +++ b/samples/ubuntu-server/images.pkrvars.hcl @@ -11,6 +11,10 @@ images = { source_iso_checksum = "sha256:8762f7e74e4d64d72fceb5f70682e6b069932deedb4949c6975d0f0fe0a91be3" } + vagrant = { + box_alias = "ubuntu-server" + } + virtualbox = { guest_os_type = "Ubuntu_64" } @@ -32,10 +36,6 @@ images = { source_iso_checksum = "sha256:a4acfda10b18da50e2ec50ccaf860d7f20b389df8765611142305c0e911d16fd" } - vagrant = { - box_alias = "ubuntu-server" - } - virtualbox = { guest_os_type = "Ubuntu_64" }