generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 2404 targets to the OVA and RAW builder, also 2204 to the raw bui…
…lder
- Loading branch information
Showing
20 changed files
with
552 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
117 changes: 117 additions & 0 deletions
117
images/capi/packer/ova/linux/ubuntu/http/24.04.efi/user-data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
#cloud-config | ||
# Copyright 2022 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# For more information on how autoinstall is configured, please refer to | ||
# https://ubuntu.com/server/docs/install/autoinstall-reference | ||
autoinstall: | ||
version: 1 | ||
# Disable ssh server during installation, otherwise packer tries to connect and exceed max attempts | ||
early-commands: | ||
- systemctl stop ssh | ||
# Configure the locale | ||
locale: en_US.UTF-8 | ||
keyboard: | ||
layout: us | ||
grub: | ||
reorder_uefi: false | ||
replace_linux_default: false | ||
# For more information on how partitioning is configured, | ||
# please refer to https://curtin.readthedocs.io/en/latest/topics/storage.html. | ||
storage: | ||
swap: | ||
size: 0 | ||
grub: | ||
reorder_uefi: false | ||
replace_linux_default: false | ||
config: | ||
- ptable: gpt | ||
path: /dev/sda | ||
wipe: superblock-recursive | ||
preserve: false | ||
name: '' | ||
grub_device: false | ||
type: disk | ||
id: disk-sda | ||
- device: disk-sda | ||
# Create EFI partition of 512MB same as in Ubuntu 20.04 | ||
size: 536870912 | ||
wipe: superblock | ||
flag: boot | ||
number: 1 | ||
preserve: false | ||
grub_device: true | ||
type: partition | ||
id: partition-0 | ||
- fstype: fat32 | ||
volume: partition-0 | ||
preserve: false | ||
type: format | ||
id: format-0 | ||
- device: disk-sda | ||
size: -1 | ||
wipe: superblock | ||
flag: '' | ||
number: 2 | ||
preserve: false | ||
grub_device: false | ||
type: partition | ||
id: partition-1 | ||
- fstype: ext4 | ||
volume: partition-1 | ||
preserve: false | ||
type: format | ||
id: format-1 | ||
- path: / | ||
device: format-1 | ||
type: mount | ||
id: mount-1 | ||
- path: /boot/efi | ||
device: format-0 | ||
type: mount | ||
id: mount-0 | ||
updates: "all" | ||
ssh: | ||
install-server: true | ||
allow-pw: true | ||
# Customize the list of packages installed. | ||
packages: | ||
- open-vm-tools | ||
# Create the default user. | ||
# Ensures the "builder" user doesn't require a password to use sudo. | ||
user-data: | ||
users: | ||
- name: builder | ||
# openssl passwd -6 -stdin <<< builder | ||
passwd: $6$xyz$UtXVazU08Q5b8AW.TJ3MPYZglyXa3Ttf2RCel8MCUPlEYO1evWxeWBhZ2QqivU/Ij4tqYAxMCqc2ujEM4dMSe1 | ||
groups: [adm, cdrom, dip, plugdev, lxd, sudo] | ||
lock-passwd: false | ||
sudo: ALL=(ALL) NOPASSWD:ALL | ||
shell: /bin/bash | ||
|
||
# This command runs after all other steps; it: | ||
# 1. Disables swapfiles | ||
# 2. Removes the existing swapfile | ||
# 3. Removes the swapfile entry from /etc/fstab | ||
# 4. Removes snapd, https://bugs.launchpad.net/subiquity/+bug/1946609 | ||
# 5. Cleans up any packages that are no longer required | ||
# 6. Removes the cached list of packages | ||
late-commands: | ||
- curtin in-target --target=/target -- swapoff -a | ||
- curtin in-target --target=/target -- rm -f /swap.img | ||
- curtin in-target --target=/target -- sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab | ||
- chroot /target apt-get purge -y snapd | ||
- curtin in-target --target=/target -- apt-get purge --auto-remove -y | ||
- curtin in-target --target=/target -- apt-get clean | ||
- curtin in-target --target=/target -- rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"boot_command_prefix": "c<wait>linux /casper/vmlinuz ipv6.disable={{ user `boot_disable_ipv6` }} --- autoinstall ds='nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/24.04.efi/'<enter><wait>initrd /casper/initrd<enter><wait>boot<enter>", | ||
"boot_disable_ipv6": "0", | ||
"boot_media_path": "/media/HTTP", | ||
"build_name": "ubuntu-{{user `distro_version` | replace_all \".\" \"\" }}-efi", | ||
"distro_arch": "amd64", | ||
"distro_name": "ubuntu", | ||
"distro_version": "24.04", | ||
"firmware": "efi", | ||
"floppy_dirs": "./packer/ova/linux/{{user `distro_name`}}/http/", | ||
"guest_os_type": "ubuntu-64", | ||
"iso_checksum": "https://releases.ubuntu.com/noble/SHA256SUMS", | ||
"iso_checksum_type": "file", | ||
"iso_url": "https://releases.ubuntu.com/noble/ubuntu-24.04-live-server-amd64.iso", | ||
"os_display_name": "Ubuntu 24.04", | ||
"shutdown_command": "shutdown -P now", | ||
"vsphere_guest_os_type": "ubuntu64Guest" | ||
} |
Empty file.
111 changes: 111 additions & 0 deletions
111
images/capi/packer/raw/linux/ubuntu/http/22.04.efi/user-data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
#cloud-config | ||
# Copyright 2022 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# For more information on how autoinstall is configured, please refer to | ||
# https://ubuntu.com/server/docs/install/autoinstall-reference | ||
autoinstall: | ||
version: 1 | ||
# Disable ssh server during installation, otherwise packer tries to connect and exceed max attempts | ||
early-commands: | ||
- systemctl stop ssh | ||
# Configure the locale | ||
locale: en_US.UTF-8 | ||
keyboard: | ||
layout: us | ||
grub: | ||
reorder_uefi: false | ||
replace_linux_default: false | ||
# For more information on how partitioning is configured, | ||
# please refer to https://curtin.readthedocs.io/en/latest/topics/storage.html. | ||
storage: | ||
config: | ||
- ptable: gpt | ||
path: /dev/sda | ||
wipe: superblock-recursive | ||
preserve: false | ||
name: '' | ||
grub_device: false | ||
type: disk | ||
id: disk-sda | ||
- device: disk-sda | ||
# Create EFI partition of 512MB same as in Ubuntu 20.04 | ||
size: 536870912 | ||
wipe: superblock | ||
flag: boot | ||
number: 1 | ||
preserve: false | ||
grub_device: true | ||
type: partition | ||
id: partition-0 | ||
- fstype: fat32 | ||
volume: partition-0 | ||
preserve: false | ||
type: format | ||
id: format-0 | ||
- device: disk-sda | ||
size: -1 | ||
wipe: superblock | ||
flag: '' | ||
number: 2 | ||
preserve: false | ||
grub_device: false | ||
type: partition | ||
id: partition-1 | ||
- fstype: ext4 | ||
volume: partition-1 | ||
preserve: false | ||
type: format | ||
id: format-1 | ||
- path: / | ||
device: format-1 | ||
type: mount | ||
id: mount-1 | ||
- path: /boot/efi | ||
device: format-0 | ||
type: mount | ||
id: mount-0 | ||
updates: "all" | ||
ssh: | ||
install-server: true | ||
allow-pw: true | ||
# Create the default user. | ||
# Ensures the "builder" user doesn't require a password to use sudo. | ||
user-data: | ||
users: | ||
- name: builder | ||
# openssl passwd -6 -stdin <<< builder | ||
passwd: $6$xyz$UtXVazU08Q5b8AW.TJ3MPYZglyXa3Ttf2RCel8MCUPlEYO1evWxeWBhZ2QqivU/Ij4tqYAxMCqc2ujEM4dMSe1 | ||
groups: [adm, cdrom, dip, plugdev, lxd, sudo] | ||
lock-passwd: false | ||
sudo: ALL=(ALL) NOPASSWD:ALL | ||
shell: /bin/bash | ||
|
||
# This command runs after all other steps; it: | ||
# 1. Disables swapfiles | ||
# 2. Removes the existing swapfile | ||
# 3. Removes the swapfile entry from /etc/fstab | ||
# 4. Cleans up any packages that are no longer required | ||
# 5. Removes the cached list of packages | ||
late-commands: | ||
- | | ||
if [ -d /sys/firmware/efi ]; then | ||
apt-get install -y efibootmgr | ||
efibootmgr -o $(efibootmgr | perl -n -e '/Boot(.+)\* ubuntu/ && print $1') | ||
fi | ||
- swapoff -a | ||
- rm -f /swapfile | ||
- sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab | ||
- apt-get purge --auto-remove -y | ||
- rm -rf /var/lib/apt/lists/* |
Empty file.
Oops, something went wrong.