Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117749013
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/build/packer/kolab.pkr.hcl b/build/packer/kolab.pkr.hcl
index 55d3e9b..296f97a 100644
--- a/build/packer/kolab.pkr.hcl
+++ b/build/packer/kolab.pkr.hcl
@@ -1,52 +1,58 @@
packer {
required_plugins {
qemu = {
source = "github.com/hashicorp/qemu"
version = "~> 1.0"
}
}
}
source "qemu" "almalinux9" {
iso_url = "https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/AlmaLinux-9-GenericCloud-latest.x86_64.qcow2"
iso_checksum = "file:https://repo.almalinux.org/almalinux/9/cloud/x86_64/images/CHECKSUM"
disk_image = true
disk_compression = true
disk_size = "20G"
+ memory = 2048
format = "qcow2"
headless = true
accelerator = "kvm"
machine_type = "q35"
cpu_model = "host"
output_directory = "artifacts/"
ssh_username = "root"
ssh_timeout = "10m"
ssh_private_key_file = "./kolab-default-key"
cd_files = ["./cloudinit/meta-data", "./cloudinit/user-data"]
cd_label = "cidata"
shutdown_command = "sudo shutdown -P now"
}
build {
sources = ["source.qemu.almalinux9"]
provisioner "shell" {
script = "scripts/setup.sh"
}
provisioner "shell" {
script = "scripts/k3s.sh"
}
+ provisioner "shell" {
+ script = "scripts/drbd.sh"
+ timeout = "10m"
+ }
+
provisioner "shell" {
inline = [
"dnf clean all",
]
}
}
diff --git a/build/packer/scripts/drbd.sh b/build/packer/scripts/drbd.sh
new file mode 100644
index 0000000..9df2366
--- /dev/null
+++ b/build/packer/scripts/drbd.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+set -e
+
+dnf -y install epel-release
+dnf config-manager --set-enabled crb
+dnf -y install \
+ kernel \
+ kernel-devel \
+ make \
+ patch \
+ unzip \
+ tar
+
+dnf -y install \
+ drbd \
+ drbd-bash-completion \
+ drbd-selinux \
+ drbd-utils
+
+dnf -y install \
+ "dnf-command(versionlock)"
+
+DRBD_VERSION="9.2.14"
+curl -Lo drbd-${DRBD_VERSION}.tar.gz https://linbit.gateway.scarf.sh//downloads/drbd/9/drbd-${DRBD_VERSION}.tar.gz
+tar xzf drbd-${DRBD_VERSION}.tar.gz
+pushd drbd-${DRBD_VERSION}/
+make KDIR="/usr/src/kernels/$(rpm -q kernel-devel | sed 's/kernel-devel-//')"
+make install
+popd
+
+rm -rf drbd-${DRBD_VERSION}.tar.gz
+rm -rf drbd-${DRBD_VERSION}
+
+dnf -y remove \
+ kernel-devel
+
+echo "drbd" > /etc/modules-load.d/drbd.conf
+chmod 644 /etc/modules-load.d/drbd.conf
+
+dnf versionlock add kernel
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Apr 4, 1:19 AM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18821896
Default Alt Text
(2 KB)
Attached To
Mode
R114 kolab-infrastructure
Attached
Detach File
Event Timeline