From 8db08882d84ef9fd2d690e5df404546ed7f84718 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 11 Apr 2024 23:40:33 +0200 Subject: [PATCH] fix: increase boot partition and harmonize lvm (#5) Reviewed-on: https://gitea.rknet.org/infra/packer-hcloud/pulls/5 Co-authored-by: Robert Kaussow Co-committed-by: Robert Kaussow --- rocky-9/data/init.ks.pkrtpl.hcl | 13 ++++++------- rocky-9/server.pkr.hcl | 9 +++++---- rocky-9/variables.pkr.hcl | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/rocky-9/data/init.ks.pkrtpl.hcl b/rocky-9/data/init.ks.pkrtpl.hcl index 8282f64..2d7b229 100644 --- a/rocky-9/data/init.ks.pkrtpl.hcl +++ b/rocky-9/data/init.ks.pkrtpl.hcl @@ -59,22 +59,21 @@ clearpart --all --initlabel ### Modify partition sizes for the virtual machine hardware. ### Create primary system partitions. -part /boot --fstype xfs --size=512 --label=BOOTFS +part /boot --fstype xfs --size=2048 --label=BOOTFS part /boot/efi --fstype vfat --size=512 --label=EFIFS -part pv.01 --size=19 --grow +part pv.01 --size=17 --grow ### Create a logical volume management (LVM) group. volgroup vg00 --pesize=4096 pv.01 ### Modify logical volume sizes for the virtual machine hardware. ### Create logical volumes. -logvol / --fstype xfs --name=lv_root --vgname=vg00 --size=6000 --label=ROOTFS -logvol /home --fstype xfs --name=lv_home --vgname=vg00 --size=3000 --label=HOMEFS --fsoptions="nodev" -logvol /opt --fstype xfs --name=lv_opt --vgname=vg00 --size=1000 --label=OPTFS +logvol / --fstype xfs --name=lv_root --vgname=vg00 --size=10240 --label=ROOTFS +logvol /home --fstype xfs --name=lv_home --vgname=vg00 --size=2048 --label=HOMEFS logvol /tmp --fstype xfs --name=lv_tmp --vgname=vg00 --size=512 --label=TMPFS --fsoptions="nosuid,noexec,nodev" -logvol /var --fstype xfs --name=lv_var --vgname=vg00 --size=3000 --label=VARFS --fsoptions="nosuid" +logvol /var --fstype xfs --name=lv_var --vgname=vg00 --size=2048 --label=VARFS --fsoptions="nosuid" logvol /var/tmp --fstype xfs --name=lv_vartmp --vgname=vg00 --size=512 --label=LOGFS --fsoptions="nosuid,noexec,nodev" -logvol /var/log --fstype xfs --name=lv_log --vgname=vg00 --size=1000 --label=LOGFS --fsoptions="nosuid,noexec,nodev" +logvol /var/log --fstype xfs --name=lv_log --vgname=vg00 --size=1024 --label=LOGFS --fsoptions="nosuid,noexec,nodev" logvol /var/log/audit --fstype xfs --name=lv_audit --vgname=vg00 --size=512 --label=AUDITFS --fsoptions="nosuid,noexec,nodev" ### Modifies the default set of services that will run under the default runlevel. diff --git a/rocky-9/server.pkr.hcl b/rocky-9/server.pkr.hcl index 471b9d2..69c8ac8 100644 --- a/rocky-9/server.pkr.hcl +++ b/rocky-9/server.pkr.hcl @@ -3,7 +3,7 @@ packer { required_plugins { hcloud = { version = "1.3.0" - source = "github.com/hashicorp/hcloud" + source = "github.com/hetznercloud/hcloud" } } } @@ -38,9 +38,10 @@ source "hcloud" "rocky-linux-9" { token = "${var.hcloud_token}" // Virtual Machine Settings - location = "${var.hcloud_location}" - server_type = "${var.hcloud_server_type}" - server_name = "${var.hcloud_server_name}" + location = "${var.hcloud_location}" + server_type = "cx11" + upgrade_server_type = "${var.hcloud_server_type}" + server_name = "${var.hcloud_server_name}" // Communicator Settings and Credentials ssh_username = "root" diff --git a/rocky-9/variables.pkr.hcl b/rocky-9/variables.pkr.hcl index e1e7206..25cb1ec 100644 --- a/rocky-9/variables.pkr.hcl +++ b/rocky-9/variables.pkr.hcl @@ -26,7 +26,7 @@ variable "hcloud_location" { variable "hcloud_server_type" { type = string - default = "cx11" + default = "cx21" } variable "hcloud_server_name" {