From 09ada2b6c812ee3e2c8c5349d1955307e83802d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guszt=C3=A1v=20Varga?= Date: Sun, 5 May 2024 09:48:22 +0200 Subject: [PATCH 1/2] Add initial version of Ubuntu Desktop images --- .../ubuntu-desktop/2404-lts-ubuntu/hyperv.yml | 9 +++ .../2404-lts-ubuntu/virtualbox.yml | 9 +++ .../ubuntu-desktop/2404-lts-ubuntu/vmware.yml | 9 +++ .../2404-lts-xubuntu/hyperv.yml | 9 +++ .../2404-lts-xubuntu/virtualbox.yml | 9 +++ .../2404-lts-xubuntu/vmware.yml | 9 +++ build.cake | 1 - samples/ubuntu-desktop/README.md | 28 +++++++++ samples/ubuntu-desktop/Vagrantfile | 2 + samples/ubuntu-desktop/images.pkrvars.hcl | 60 +++++++++++++++++++ src/ubuntu/chef/initialize.sh | 3 + 11 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 .azure-pipelines/ubuntu-desktop/2404-lts-ubuntu/hyperv.yml create mode 100644 .azure-pipelines/ubuntu-desktop/2404-lts-ubuntu/virtualbox.yml create mode 100644 .azure-pipelines/ubuntu-desktop/2404-lts-ubuntu/vmware.yml create mode 100644 .azure-pipelines/ubuntu-desktop/2404-lts-xubuntu/hyperv.yml create mode 100644 .azure-pipelines/ubuntu-desktop/2404-lts-xubuntu/virtualbox.yml create mode 100644 .azure-pipelines/ubuntu-desktop/2404-lts-xubuntu/vmware.yml diff --git a/.azure-pipelines/ubuntu-desktop/2404-lts-ubuntu/hyperv.yml b/.azure-pipelines/ubuntu-desktop/2404-lts-ubuntu/hyperv.yml new file mode 100644 index 000000000..7347ca428 --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2404-lts-ubuntu/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2404-lts-ubuntu + provider: hyperv diff --git a/.azure-pipelines/ubuntu-desktop/2404-lts-ubuntu/virtualbox.yml b/.azure-pipelines/ubuntu-desktop/2404-lts-ubuntu/virtualbox.yml new file mode 100644 index 000000000..04851628f --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2404-lts-ubuntu/virtualbox.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2404-lts-ubuntu + provider: virtualbox diff --git a/.azure-pipelines/ubuntu-desktop/2404-lts-ubuntu/vmware.yml b/.azure-pipelines/ubuntu-desktop/2404-lts-ubuntu/vmware.yml new file mode 100644 index 000000000..fda303713 --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2404-lts-ubuntu/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2404-lts-ubuntu + provider: vmware diff --git a/.azure-pipelines/ubuntu-desktop/2404-lts-xubuntu/hyperv.yml b/.azure-pipelines/ubuntu-desktop/2404-lts-xubuntu/hyperv.yml new file mode 100644 index 000000000..5acfd9875 --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2404-lts-xubuntu/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2404-lts-xubuntu + provider: hyperv diff --git a/.azure-pipelines/ubuntu-desktop/2404-lts-xubuntu/virtualbox.yml b/.azure-pipelines/ubuntu-desktop/2404-lts-xubuntu/virtualbox.yml new file mode 100644 index 000000000..d1fddf174 --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2404-lts-xubuntu/virtualbox.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2404-lts-xubuntu + provider: virtualbox diff --git a/.azure-pipelines/ubuntu-desktop/2404-lts-xubuntu/vmware.yml b/.azure-pipelines/ubuntu-desktop/2404-lts-xubuntu/vmware.yml new file mode 100644 index 000000000..fd1fdb632 --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2404-lts-xubuntu/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2404-lts-xubuntu + provider: vmware diff --git a/build.cake b/build.cake index 6edeb4a4e..2e4430109 100644 --- a/build.cake +++ b/build.cake @@ -59,7 +59,6 @@ void PackerInit() { var arguments = new ProcessArgumentBuilder(); arguments.Append("init"); - arguments.Append("-upgrade"); arguments.Append(platformDirectory); Packer(arguments); diff --git a/samples/ubuntu-desktop/README.md b/samples/ubuntu-desktop/README.md index 6870de822..1dca1ff62 100644 --- a/samples/ubuntu-desktop/README.md +++ b/samples/ubuntu-desktop/README.md @@ -6,11 +6,39 @@ This folder contains Packer templates for building `Ubuntu Desktop` images. See the links below for the details of the available images: +- [22.04 LTS Ubuntu](#2404-lts-ubuntu) +- [24.04 LTS Xubuntu](#2404-lts-xubuntu) - [22.04 LTS Ubuntu](#2204-lts-ubuntu) - [22.04 LTS Xubuntu](#2204-lts-xubuntu) - [20.04 LTS Ubuntu](#2004-lts-ubuntu) - [20.04 LTS Xubuntu](#2004-lts-xubuntu) +## 24.04 LTS Ubuntu + +[Vagrant box](https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-desktop-2404-lts) + +The template has the following settings: + +- **Ubuntu Desktop 24.04 LTS** + - OpenSSH Server +- **Vagrant** + - User `vagrant` with password `vagrant` and Vagrant's insecure key + - 2 vCPUs + - 4 GB RAM + +## 24.04 LTS Xubuntu + +[Vagrant box](https://app.vagrantup.com/gusztavvargadr/boxes/xubuntu-desktop-2404-lts) + +The template has the following settings: + +- **Xubuntu Desktop 24.04 LTS** + - OpenSSH Server +- **Vagrant** + - User `vagrant` with password `vagrant` and Vagrant's insecure key + - 2 vCPUs + - 4 GB RAM + ## 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) diff --git a/samples/ubuntu-desktop/Vagrantfile b/samples/ubuntu-desktop/Vagrantfile index b75aa562f..c6b6a978d 100644 --- a/samples/ubuntu-desktop/Vagrantfile +++ b/samples/ubuntu-desktop/Vagrantfile @@ -1,6 +1,8 @@ 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-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" diff --git a/samples/ubuntu-desktop/images.pkrvars.hcl b/samples/ubuntu-desktop/images.pkrvars.hcl index dfc8c45d6..4cbb65fb1 100644 --- a/samples/ubuntu-desktop/images.pkrvars.hcl +++ b/samples/ubuntu-desktop/images.pkrvars.hcl @@ -1,4 +1,64 @@ images = { + "2404-lts-ubuntu" = { + core = { + image_name = "ubuntu-desktop/2404-lts-ubuntu" + image_description = "Ubuntu Desktop 24.04 LTS" + image_version = "2404.0" + } + + native = { + source_iso_url_local = "ubuntu-24.04-desktop-amd64.iso" + source_iso_url_remote = "https://releases.ubuntu.com/noble/ubuntu-24.04-desktop-amd64.iso" + source_iso_checksum = "sha256:81fae9cc21e2b1e3a9a4526c7dad3131b668e346c580702235ad4d02645d9455" + + chef_attributes = "ubuntu" + } + + vagrant = { + memory = "4096" + ports = "3389" + box_name = "ubuntu-desktop-2404-lts" + } + + virtualbox = { + guest_os_type = "Ubuntu_64" + } + + vmware = { + guest_os_type = "ubuntu-64" + } + } + + "2404-lts-xubuntu" = { + core = { + image_name = "ubuntu-desktop/2404-lts-xubuntu" + image_description = "Xubuntu Desktop 24.04 LTS" + image_version = "2404.0" + } + + 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_checksum = "sha256:8c47b15c4089473bcc58e369a472cabf83d137c7bf8ad7d9465ad086e7bd5272" + + chef_attributes = "xubuntu" + } + + vagrant = { + memory = "4096" + ports = "3389" + box_name = "xubuntu-desktop-2404-lts" + } + + virtualbox = { + guest_os_type = "Ubuntu_64" + } + + vmware = { + guest_os_type = "ubuntu-64" + } + } + "2204-lts-ubuntu" = { core = { image_name = "ubuntu-desktop/2204-lts-ubuntu" diff --git a/src/ubuntu/chef/initialize.sh b/src/ubuntu/chef/initialize.sh index 0773fcd61..a2acbd653 100644 --- a/src/ubuntu/chef/initialize.sh +++ b/src/ubuntu/chef/initialize.sh @@ -2,6 +2,9 @@ set -euo pipefail +sudo apt-get update -y +sudo apt-get install -y curl + mkdir -p /var/tmp/packer-build/chef if ! [ -x "$(command -v chef-client)" ]; then From 4ba3d5562767fad7557108d201fea3d04c8ec8e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guszt=C3=A1v=20Varga?= Date: Sun, 5 May 2024 21:39:32 +0200 Subject: [PATCH 2/2] Fix Ubuntu Desktop documentation --- samples/ubuntu-desktop/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/ubuntu-desktop/README.md b/samples/ubuntu-desktop/README.md index 1dca1ff62..30b9a9b9a 100644 --- a/samples/ubuntu-desktop/README.md +++ b/samples/ubuntu-desktop/README.md @@ -6,7 +6,7 @@ This folder contains Packer templates for building `Ubuntu Desktop` images. See the links below for the details of the available images: -- [22.04 LTS Ubuntu](#2404-lts-ubuntu) +- [24.04 LTS Ubuntu](#2404-lts-ubuntu) - [24.04 LTS Xubuntu](#2404-lts-xubuntu) - [22.04 LTS Ubuntu](#2204-lts-ubuntu) - [22.04 LTS Xubuntu](#2204-lts-xubuntu)