Standardized hardware config on templates to use better CPU and disk types; Updated Ubuntu 22, Rocky 9 and Almalinux 9 post-install stuff

This commit is contained in:
Gregory Ballantine 2024-04-20 22:05:11 -04:00
parent 86b8e70740
commit cb410f3dc5
9 changed files with 42 additions and 46 deletions

View File

@ -22,7 +22,9 @@ source "proxmox-iso" "almalinux-9" {
os = "l26"
cores = "2"
sockets = "1"
cpu_type = "host"
memory = "2048"
scsi_controller = "virtio-scsi-single"
disks {
disk_size = "30G"
storage_pool = "templates"

View File

@ -22,9 +22,11 @@ source "proxmox-iso" "debian-12" {
os = "l26"
cores = "2"
sockets = "1"
cpu_type = "host"
memory = "2048"
scsi_controller = "virtio-scsi-single"
disks {
disk_size = "10G"
disk_size = "30G"
storage_pool = "templates"
type = "scsi"
}

View File

@ -18,9 +18,11 @@ source "proxmox-iso" "freebsd-14" {
os = "other"
cores = "2"
sockets = "1"
cpu_type = "host"
memory = "2048"
scsi_controller = "virtio-scsi-single"
disks {
disk_size = "10G"
disk_size = "30G"
storage_pool = "templates"
type = "scsi"
}

View File

@ -20,11 +20,11 @@ source "proxmox-iso" "rocky-9" {
http_port_min = "8080"
os = "l26"
machine = "pc"
scsi_controller = "virtio-scsi-single"
cores = "2"
sockets = "1"
cpu_type = "host"
memory = "2048"
scsi_controller = "virtio-scsi-single"
disks {
disk_size = "30G"
storage_pool = "templates"
@ -39,7 +39,7 @@ source "proxmox-iso" "rocky-9" {
insecure_skip_tls_verify = true
username = "${var.proxmox_apiuser}"
password = "${var.proxmox_apitoken}"
node = "kamino"
node = "geonosis"
iso_url = "https://download.rockylinux.org/pub/rocky/9/isos/x86_64/Rocky-9.3-x86_64-boot.iso"
iso_checksum = "sha256:eb096f0518e310f722d5ebd4c69f0322df4fc152c6189f93c5c797dc25f3d2e1"

View File

@ -18,23 +18,15 @@ source "proxmox-iso" "ubuntu-22" {
"e<wait>",
# Go to the end of the boot command
"<down><down><down><down><down><wait>",
# Remove the kernel command-line that already exists
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs>",
"<down><down><down><down><left> <wait>",
# Add kernel command-line and start install
"linux ",
"/casper/vmlinuz ",
"--- ",
"autoinstall ",
"ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu-22/ ",
"<enter>"
"ds=\"nocloud-net;seedfrom=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ubuntu-22/\"",
"<leftCtrlOn>x<leftCtrlOff><wait>"
]
http_directory = "http"
@ -42,11 +34,11 @@ source "proxmox-iso" "ubuntu-22" {
http_port_min = "8080"
os = "l26"
machine = "pc"
scsi_controller = "virtio-scsi-single"
cores = "2"
sockets = "1"
cpu_type = "host"
memory = "2048"
scsi_controller = "virtio-scsi-single"
disks {
disk_size = "30G"
storage_pool = "templates"

View File

@ -14,7 +14,7 @@ rootpw --iscrypted $6$kkuIkd8S9gDUhK8g$1XbqJDCjt1zQAhxb9sC2mE5CGd.D0xV1efu0R8h1e
authselect --useshadow --passalgo=sha512
# Create my initial user :D
#user --disabled
user --name=xadmin --shell=/bin/bash --homedir=/home/xadmin --iscrypted --password=$6$y6lN/cfPPtlyaTXu$4QUYFl816sxWPuyR.eY6mCJ3ybYLNcF6Pw4ar4K7Dyy9LbedK3PjkTNZfWqSdoPRpJMjtrbpY1xQ.zDXxOTug.
user --name=xadmin --shell=/bin/bash --homedir=/home/xadmin --iscrypted --password=$6$8DdxHyrH6HfGZhDs$jEadYAMi3CTJivYgGjhG7S2C/ChZxv0w0L6AQ3Egn8K5xIA4OEqDngVfozfn.9kYxy.hWYpzwBE0qwytcU4BF0
network --device=eth0 --bootproto=dhcp --ipv6=auto --activate
@ -42,7 +42,6 @@ reboot --eject
@core
nfs-utils
sudo
qemu-guest-agent
%end
@ -50,13 +49,12 @@ qemu-guest-agent
# Update the system
yum -y update
# Istall the EPEL repository
yum -y install epel-release
dnf -y install epel-release
yum -y install wget vim yum-plugin-versionlock
dnf -y install wget vim yum-plugin-versionlock qemu-guest-agent
usermod -aG wheel xadmin
systemctl enable qemu-guest-agent
%end

View File

@ -14,7 +14,7 @@ rootpw --iscrypted $6$kkuIkd8S9gDUhK8g$1XbqJDCjt1zQAhxb9sC2mE5CGd.D0xV1efu0R8h1e
authselect --useshadow --passalgo=sha512
# Create my initial user :D
#user --disabled
user --name=xadmin --shell=/bin/bash --homedir=/home/xadmin --iscrypted --password=$6$y6lN/cfPPtlyaTXu$4QUYFl816sxWPuyR.eY6mCJ3ybYLNcF6Pw4ar4K7Dyy9LbedK3PjkTNZfWqSdoPRpJMjtrbpY1xQ.zDXxOTug.
user --name=xadmin --shell=/bin/bash --homedir=/home/xadmin --iscrypted --password=$6$8DdxHyrH6HfGZhDs$jEadYAMi3CTJivYgGjhG7S2C/ChZxv0w0L6AQ3Egn8K5xIA4OEqDngVfozfn.9kYxy.hWYpzwBE0qwytcU4BF0
network --device=eth0 --bootproto=dhcp --ipv6=auto --activate
@ -42,7 +42,6 @@ reboot --eject
@core
nfs-utils
sudo
qemu-guest-agent
%end
@ -50,13 +49,12 @@ qemu-guest-agent
# Update the system
yum -y update
# Istall the EPEL repository
yum -y install epel-release
dnf -y install epel-release
yum -y install wget vim yum-plugin-versionlock
dnf -y install wget vim yum-plugin-versionlock qemu-guest-agent
usermod -aG wheel xadmin
systemctl enable qemu-guest-agent
%end

0
http/ubuntu-22/meta-data Normal file
View File

View File

@ -1,24 +1,21 @@
#cloud-config
autoinstall:
version: 1
early-commands:
- systemctl stop ssh
locale: en_US.UTF-8
keyboard:
layout: us
network:
network:
version: 2
ethernets:
eth0:
dhcp4: yes
dhcp-identifier: mac
apt:
geoip: true
preserve_sources_list: false
primary:
- arches: [i386, amd64]
uri: "http://archive.ubuntu.com/ubuntu"
geoip: true
storage:
layout:
name: lvm
@ -28,15 +25,20 @@ autoinstall:
username: xadmin
password: $6$8DdxHyrH6HfGZhDs$jEadYAMi3CTJivYgGjhG7S2C/ChZxv0w0L6AQ3Egn8K5xIA4OEqDngVfozfn.9kYxy.hWYpzwBE0qwytcU4BF0
late-commands:
- "echo 'xadmin ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/xadmin"
- "chmod 440 /target/etc/sudoers.d/ubuntu"
- "apt install -y qemu-guest-agent"
- "systemctl enable qemu-guest-agent"
- "apt purge -y snapd"
user-data:
disable_root: true
package_upgrade: true
ssh:
allow-pw: true
authorized-keys: []
install-server: true
late-commands:
- "echo 'xadmin ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/xadmin"
- "chmod 440 /target/etc/sudoers.d/xadmin"
bootcmd:
- "apt install -y qemu-guest-agent"
- "systemctl enable qemu-guest-agent"
- "systemctl start qemu-guest-agent"