Big bang
This commit is contained in:
74
lab.env
Normal file
74
lab.env
Normal file
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env bash
|
||||
# Shared configuration for the local Proxmox VE test cluster.
|
||||
|
||||
# --- cluster identity ---
|
||||
CLUSTER_NAME="testlab"
|
||||
DOMAIN="lab.local"
|
||||
|
||||
# --- libvirt connection (system instance; needs sudo) ---
|
||||
export LIBVIRT_DEFAULT_URI="qemu:///system"
|
||||
VIRSH="sudo virsh"
|
||||
VIRTINSTALL="sudo virt-install"
|
||||
|
||||
# --- network ---
|
||||
NET_NAME="pve-net"
|
||||
NET_BRIDGE="pvebr0"
|
||||
NET_SUBNET="10.10.10.0"
|
||||
NET_PREFIX="24"
|
||||
NET_GW="10.10.10.1"
|
||||
NET_DHCP_START="10.10.10.100"
|
||||
NET_DHCP_END="10.10.10.200"
|
||||
|
||||
# --- nodes (name : ip : mac) ---
|
||||
PVE1_NAME="pve1"; PVE1_IP="10.10.10.11"; PVE1_MAC="52:54:00:00:10:11"
|
||||
PVE2_NAME="pve2"; PVE2_IP="10.10.10.12"; PVE2_MAC="52:54:00:00:10:12"
|
||||
STORE_NAME="pvestore"; STORE_IP="10.10.10.13"; STORE_MAC="52:54:00:00:10:13"
|
||||
|
||||
# --- credentials ---
|
||||
# Min length 8 for the PVE installer. Change if you like.
|
||||
ROOT_PASSWORD="ProxmoxLab123!"
|
||||
|
||||
# --- node VM sizing ---
|
||||
NODE_VCPU="4"
|
||||
NODE_RAM_MB="8192"
|
||||
NODE_DISK_GB="48"
|
||||
|
||||
# --- storage VM sizing ---
|
||||
STORE_VCPU="2"
|
||||
STORE_RAM_MB="2048"
|
||||
STORE_DATA_DISK_GB="60" # extra data disk on the storage VM (sparse)
|
||||
ISCSI_LUN_GB="50" # sparse backing file size for the iSCSI LUN
|
||||
ISCSI_IQN="iqn.2026-06.local.lab:store.lun0"
|
||||
|
||||
# --- Proxmox VE ISO ---
|
||||
ISO_VERSION="9.2-1"
|
||||
ISO_FILE="proxmox-ve_${ISO_VERSION}.iso"
|
||||
ISO_URL="https://enterprise.proxmox.com/iso/${ISO_FILE}"
|
||||
ISO_SHA256="4e88fe416df9b527624a175f24c9aa07c714d3332afb1ee3dbf3879573ef2c6c"
|
||||
|
||||
# --- Debian cloud image (storage VM base); 13 = trixie ---
|
||||
DEBIAN_IMG="debian-13-genericcloud-amd64.qcow2"
|
||||
DEBIAN_URL="https://cloud.debian.org/images/cloud/trixie/latest/${DEBIAN_IMG}"
|
||||
|
||||
# --- working directories ---
|
||||
# Scripts and small artifacts live with the repo; heavy images live in the
|
||||
# libvirt pool path so qemu:///system (qemu user + SELinux virt_image_t) can
|
||||
# read them without permission/labeling headaches.
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
LIB_DIR="/var/lib/libvirt/images/pve-lab" # ISOs, qcow2 disks, seed ISO (sudo-owned)
|
||||
BUILD_DIR="${SCRIPT_DIR}/build" # rendered answer files, logs (user-owned)
|
||||
|
||||
# --- automation SSH key (generated by 00-prereqs.sh) ---
|
||||
SSH_KEY="${SCRIPT_DIR}/.ssh/id_lab"
|
||||
SSH_PUB="${SSH_KEY}.pub"
|
||||
|
||||
# SSH helper: connect to a node as root with the lab key, no host-key fuss.
|
||||
lab_ssh() {
|
||||
ssh -i "$SSH_KEY" \
|
||||
-o IdentitiesOnly=yes \
|
||||
-o StrictHostKeyChecking=no \
|
||||
-o UserKnownHostsFile=/dev/null \
|
||||
-o ConnectTimeout=8 \
|
||||
-o LogLevel=ERROR \
|
||||
"root@$1" "${@:2}"
|
||||
}
|
||||
Reference in New Issue
Block a user