Merge pull request 'stage' (#33) from stage into master
Some checks failed
Terraform Apply / Terraform Apply (push) Failing after 3m19s
Some checks failed
Terraform Apply / Terraform Apply (push) Failing after 3m19s
Reviewed-on: #33
This commit was merged in pull request #33.
This commit is contained in:
@@ -15,8 +15,8 @@ on:
|
|||||||
type: choice
|
type: choice
|
||||||
options:
|
options:
|
||||||
- all
|
- all
|
||||||
- alpacas
|
- control-planes
|
||||||
- llamas
|
- workers
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: terraform-global
|
group: terraform-global
|
||||||
@@ -77,11 +77,11 @@ jobs:
|
|||||||
all)
|
all)
|
||||||
terraform plan -destroy -out=tfdestroy
|
terraform plan -destroy -out=tfdestroy
|
||||||
;;
|
;;
|
||||||
alpacas)
|
control-planes)
|
||||||
terraform plan -destroy -target=proxmox_vm_qemu.alpacas -out=tfdestroy
|
terraform plan -destroy -target=proxmox_vm_qemu.control_planes -out=tfdestroy
|
||||||
;;
|
;;
|
||||||
llamas)
|
workers)
|
||||||
terraform plan -destroy -target=proxmox_vm_qemu.llamas -out=tfdestroy
|
terraform plan -destroy -target=proxmox_vm_qemu.workers -out=tfdestroy
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid destroy target: ${{ inputs.target }}"
|
echo "Invalid destroy target: ${{ inputs.target }}"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: https://gitea.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Create secrets.tfvars
|
- name: Create secrets.tfvars
|
||||||
working-directory: terraform
|
working-directory: terraform
|
||||||
@@ -51,6 +51,7 @@ jobs:
|
|||||||
uses: hashicorp/setup-terraform@v2
|
uses: hashicorp/setup-terraform@v2
|
||||||
with:
|
with:
|
||||||
terraform_version: 1.6.6
|
terraform_version: 1.6.6
|
||||||
|
terraform_wrapper: false
|
||||||
|
|
||||||
- name: Terraform Init
|
- name: Terraform Init
|
||||||
working-directory: terraform
|
working-directory: terraform
|
||||||
@@ -81,8 +82,7 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Upload Terraform Plan
|
# NOTE: Disabled artifact upload for now.
|
||||||
uses: actions/upload-artifact@v3
|
# On this Gitea/act runner, post-job hooks from artifact actions can
|
||||||
with:
|
# fail during "Complete job" even when all Terraform steps succeeded.
|
||||||
name: terraform-plan
|
# Re-enable once runner/action compatibility is confirmed.
|
||||||
path: terraform/tfplan
|
|
||||||
|
|||||||
42
nixos/kubeadm/README.md
Normal file
42
nixos/kubeadm/README.md
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# Kubeadm Cluster Layout (NixOS)
|
||||||
|
|
||||||
|
This folder defines role-based NixOS configs for a kubeadm cluster.
|
||||||
|
|
||||||
|
## Topology
|
||||||
|
|
||||||
|
- Control planes: `cp-1`, `cp-2`, `cp-3`
|
||||||
|
- Workers: `wk-1`, `wk-2`, `wk-3`
|
||||||
|
|
||||||
|
## What this provides
|
||||||
|
|
||||||
|
- Shared Kubernetes/node prerequisites in `modules/k8s-common.nix`
|
||||||
|
- Role-specific settings for control planes and workers
|
||||||
|
- Host configs for each node in `hosts/`
|
||||||
|
|
||||||
|
## Hardware config files
|
||||||
|
|
||||||
|
Each host file optionally imports `hosts/hardware/<host>.nix` if present.
|
||||||
|
Copy each node's generated hardware config into this folder:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo nixos-generate-config
|
||||||
|
sudo cp /etc/nixos/hardware-configuration.nix ./hosts/hardware/cp-1.nix
|
||||||
|
```
|
||||||
|
|
||||||
|
Repeat for each node (`cp-2`, `cp-3`, `wk-1`, `wk-2`, `wk-3`).
|
||||||
|
|
||||||
|
## Deploy approach
|
||||||
|
|
||||||
|
Start from one node at a time while experimenting:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo nixos-rebuild switch --flake .#cp-1
|
||||||
|
```
|
||||||
|
|
||||||
|
For remote target-host workflows, use your preferred deploy wrapper later
|
||||||
|
(`nixos-rebuild --target-host ...` or deploy-rs/colmena).
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- This does not run `kubeadm init/join` automatically.
|
||||||
|
- It prepares OS/runtime/kernel prerequisites so kubeadm bootstrapping is clean.
|
||||||
26
nixos/kubeadm/flake.nix
Normal file
26
nixos/kubeadm/flake.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
description = "NixOS kubeadm cluster configs";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
mkHost = hostModules:
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = hostModules;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
nixosConfigurations = {
|
||||||
|
cp-1 = mkHost [ ./hosts/cp-1.nix ];
|
||||||
|
cp-2 = mkHost [ ./hosts/cp-2.nix ];
|
||||||
|
cp-3 = mkHost [ ./hosts/cp-3.nix ];
|
||||||
|
wk-1 = mkHost [ ./hosts/wk-1.nix ];
|
||||||
|
wk-2 = mkHost [ ./hosts/wk-2.nix ];
|
||||||
|
wk-3 = mkHost [ ./hosts/wk-3.nix ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
14
nixos/kubeadm/hosts/cp-1.nix
Normal file
14
nixos/kubeadm/hosts/cp-1.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
../modules/k8s-common.nix
|
||||||
|
../modules/k8s-control-plane.nix
|
||||||
|
]
|
||||||
|
++ lib.optional (builtins.pathExists ./hardware/cp-1.nix) ./hardware/cp-1.nix;
|
||||||
|
|
||||||
|
networking.hostName = "cp-1";
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
}
|
||||||
14
nixos/kubeadm/hosts/cp-2.nix
Normal file
14
nixos/kubeadm/hosts/cp-2.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
../modules/k8s-common.nix
|
||||||
|
../modules/k8s-control-plane.nix
|
||||||
|
]
|
||||||
|
++ lib.optional (builtins.pathExists ./hardware/cp-2.nix) ./hardware/cp-2.nix;
|
||||||
|
|
||||||
|
networking.hostName = "cp-2";
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
}
|
||||||
14
nixos/kubeadm/hosts/cp-3.nix
Normal file
14
nixos/kubeadm/hosts/cp-3.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
../modules/k8s-common.nix
|
||||||
|
../modules/k8s-control-plane.nix
|
||||||
|
]
|
||||||
|
++ lib.optional (builtins.pathExists ./hardware/cp-3.nix) ./hardware/cp-3.nix;
|
||||||
|
|
||||||
|
networking.hostName = "cp-3";
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
}
|
||||||
0
nixos/kubeadm/hosts/hardware/.gitkeep
Normal file
0
nixos/kubeadm/hosts/hardware/.gitkeep
Normal file
14
nixos/kubeadm/hosts/wk-1.nix
Normal file
14
nixos/kubeadm/hosts/wk-1.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
../modules/k8s-common.nix
|
||||||
|
../modules/k8s-worker.nix
|
||||||
|
]
|
||||||
|
++ lib.optional (builtins.pathExists ./hardware/wk-1.nix) ./hardware/wk-1.nix;
|
||||||
|
|
||||||
|
networking.hostName = "wk-1";
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
}
|
||||||
14
nixos/kubeadm/hosts/wk-2.nix
Normal file
14
nixos/kubeadm/hosts/wk-2.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
../modules/k8s-common.nix
|
||||||
|
../modules/k8s-worker.nix
|
||||||
|
]
|
||||||
|
++ lib.optional (builtins.pathExists ./hardware/wk-2.nix) ./hardware/wk-2.nix;
|
||||||
|
|
||||||
|
networking.hostName = "wk-2";
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
}
|
||||||
14
nixos/kubeadm/hosts/wk-3.nix
Normal file
14
nixos/kubeadm/hosts/wk-3.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
../modules/k8s-common.nix
|
||||||
|
../modules/k8s-worker.nix
|
||||||
|
]
|
||||||
|
++ lib.optional (builtins.pathExists ./hardware/wk-3.nix) ./hardware/wk-3.nix;
|
||||||
|
|
||||||
|
networking.hostName = "wk-3";
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
}
|
||||||
35
nixos/kubeadm/modules/k8s-common.nix
Normal file
35
nixos/kubeadm/modules/k8s-common.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot.kernelModules = [ "overlay" "br_netfilter" ];
|
||||||
|
|
||||||
|
boot.kernel.sysctl = {
|
||||||
|
"net.ipv4.ip_forward" = 1;
|
||||||
|
"net.bridge.bridge-nf-call-iptables" = 1;
|
||||||
|
"net.bridge.bridge-nf-call-ip6tables" = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.containerd.enable = true;
|
||||||
|
|
||||||
|
services.openssh.enable = true;
|
||||||
|
services.openssh.settings = {
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
containerd
|
||||||
|
cri-tools
|
||||||
|
cni-plugins
|
||||||
|
kubernetes
|
||||||
|
kubectl
|
||||||
|
kubernetes-helm
|
||||||
|
conntrack-tools
|
||||||
|
socat
|
||||||
|
ethtool
|
||||||
|
ipvsadm
|
||||||
|
jq
|
||||||
|
curl
|
||||||
|
vim
|
||||||
|
];
|
||||||
|
}
|
||||||
14
nixos/kubeadm/modules/k8s-control-plane.nix
Normal file
14
nixos/kubeadm/modules/k8s-control-plane.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
6443
|
||||||
|
2379
|
||||||
|
2380
|
||||||
|
10250
|
||||||
|
10257
|
||||||
|
10259
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.firewall.allowedUDPPorts = [
|
||||||
|
8472
|
||||||
|
];
|
||||||
|
}
|
||||||
11
nixos/kubeadm/modules/k8s-worker.nix
Normal file
11
nixos/kubeadm/modules/k8s-worker.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
10250
|
||||||
|
30000
|
||||||
|
32767
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.firewall.allowedUDPPorts = [
|
||||||
|
8472
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,12 +1,33 @@
|
|||||||
data "template_file" "cloud_init_global" {
|
data "template_file" "control_plane_cloud_init" {
|
||||||
|
count = var.control_plane_count
|
||||||
template = file("${path.module}/files/cloud_init_global.tpl")
|
template = file("${path.module}/files/cloud_init_global.tpl")
|
||||||
|
|
||||||
vars = {
|
vars = {
|
||||||
|
hostname = "cp-${count.index + 1}"
|
||||||
|
domain = "home.arpa"
|
||||||
SSH_KEY_PUBLIC = var.SSH_KEY_PUBLIC
|
SSH_KEY_PUBLIC = var.SSH_KEY_PUBLIC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "local_file" "cloud_init_global" {
|
resource "local_file" "control_plane_cloud_init" {
|
||||||
content = data.template_file.cloud_init_global.rendered
|
count = var.control_plane_count
|
||||||
filename = "${path.module}/files/rendered/cloud_init_global.yaml"
|
content = data.template_file.control_plane_cloud_init[count.index].rendered
|
||||||
|
filename = "${path.module}/files/rendered/cp-${count.index + 1}.yaml"
|
||||||
|
}
|
||||||
|
|
||||||
|
data "template_file" "worker_cloud_init" {
|
||||||
|
count = var.worker_count
|
||||||
|
template = file("${path.module}/files/cloud_init_global.tpl")
|
||||||
|
|
||||||
|
vars = {
|
||||||
|
hostname = "wk-${count.index + 1}"
|
||||||
|
domain = "home.arpa"
|
||||||
|
SSH_KEY_PUBLIC = var.SSH_KEY_PUBLIC
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "local_file" "worker_cloud_init" {
|
||||||
|
count = var.worker_count
|
||||||
|
content = data.template_file.worker_cloud_init[count.index].rendered
|
||||||
|
filename = "${path.module}/files/rendered/wk-${count.index + 1}.yaml"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#cloud-config
|
#cloud-config
|
||||||
|
hostname: ${hostname}
|
||||||
manage_etc_hosts: true
|
manage_etc_hosts: true
|
||||||
resolv_conf:
|
resolv_conf:
|
||||||
nameservers:
|
nameservers:
|
||||||
@@ -6,6 +7,7 @@ resolv_conf:
|
|||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
|
|
||||||
preserve_hostname: false
|
preserve_hostname: false
|
||||||
|
fqdn: ${hostname}.${domain}
|
||||||
|
|
||||||
users:
|
users:
|
||||||
- name: micqdf
|
- name: micqdf
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ provider "proxmox" {
|
|||||||
pm_tls_insecure = true
|
pm_tls_insecure = true
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "proxmox_vm_qemu" "alpacas" {
|
resource "proxmox_vm_qemu" "control_planes" {
|
||||||
count = var.alpaca_vm_count
|
count = var.control_plane_count
|
||||||
name = "alpaca-${count.index + 1}"
|
name = "cp-${count.index + 1}"
|
||||||
vmid = 500 + count.index + 1
|
vmid = var.control_plane_vmid_start + count.index
|
||||||
target_node = var.target_node
|
target_node = var.target_node
|
||||||
clone = var.clone_template
|
clone = var.clone_template
|
||||||
full_clone = true
|
full_clone = true
|
||||||
@@ -27,22 +27,22 @@ resource "proxmox_vm_qemu" "alpacas" {
|
|||||||
agent = 1
|
agent = 1
|
||||||
|
|
||||||
cpu {
|
cpu {
|
||||||
sockets = var.sockets
|
sockets = 1
|
||||||
cores = var.cores
|
cores = var.control_plane_cores
|
||||||
}
|
}
|
||||||
memory = var.memory
|
memory = var.control_plane_memory_mb
|
||||||
scsihw = "virtio-scsi-pci"
|
scsihw = "virtio-scsi-pci"
|
||||||
boot = "order=scsi0"
|
boot = "order=scsi0"
|
||||||
bootdisk = "scsi0"
|
bootdisk = "scsi0"
|
||||||
ipconfig0 = "ip=dhcp"
|
ipconfig0 = "ip=dhcp"
|
||||||
cicustom = "user=local:snippets/cloud_init_global.yaml"
|
cicustom = "user=local:snippets/cp-${count.index + 1}.yaml"
|
||||||
|
|
||||||
|
|
||||||
disks {
|
disks {
|
||||||
scsi {
|
scsi {
|
||||||
scsi0 {
|
scsi0 {
|
||||||
disk {
|
disk {
|
||||||
size = var.disk_size
|
size = var.control_plane_disk_size
|
||||||
storage = var.storage
|
storage = var.storage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -65,10 +65,10 @@ resource "proxmox_vm_qemu" "alpacas" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
resource "proxmox_vm_qemu" "llamas" {
|
resource "proxmox_vm_qemu" "workers" {
|
||||||
count = var.llama_vm_count
|
count = var.worker_count
|
||||||
name = "llama-${count.index + 1}"
|
name = "wk-${count.index + 1}"
|
||||||
vmid = 600 + count.index + 1
|
vmid = var.worker_vmid_start + count.index
|
||||||
target_node = var.target_node
|
target_node = var.target_node
|
||||||
clone = var.clone_template
|
clone = var.clone_template
|
||||||
full_clone = true
|
full_clone = true
|
||||||
@@ -76,21 +76,21 @@ resource "proxmox_vm_qemu" "llamas" {
|
|||||||
agent = 1
|
agent = 1
|
||||||
|
|
||||||
cpu {
|
cpu {
|
||||||
sockets = var.sockets
|
sockets = 1
|
||||||
cores = var.cores
|
cores = var.worker_cores[count.index]
|
||||||
}
|
}
|
||||||
memory = var.memory
|
memory = var.worker_memory_mb[count.index]
|
||||||
scsihw = "virtio-scsi-pci"
|
scsihw = "virtio-scsi-pci"
|
||||||
boot = "order=scsi0"
|
boot = "order=scsi0"
|
||||||
bootdisk = "scsi0"
|
bootdisk = "scsi0"
|
||||||
ipconfig0 = "ip=dhcp"
|
ipconfig0 = "ip=dhcp"
|
||||||
cicustom = "user=local:snippets/cloud_init_global.yaml"
|
cicustom = "user=local:snippets/wk-${count.index + 1}.yaml"
|
||||||
|
|
||||||
disks {
|
disks {
|
||||||
scsi {
|
scsi {
|
||||||
scsi0 {
|
scsi0 {
|
||||||
disk {
|
disk {
|
||||||
size = var.disk_size
|
size = var.worker_disk_size
|
||||||
storage = var.storage
|
storage = var.storage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
output "alpaca_vm_ids" {
|
output "control_plane_vm_ids" {
|
||||||
value = {
|
value = {
|
||||||
for i in range(var.alpaca_vm_count) :
|
for i in range(var.control_plane_count) :
|
||||||
"alpaca-${i + 1}" => proxmox_vm_qemu.alpacas[i].vmid
|
"cp-${i + 1}" => proxmox_vm_qemu.control_planes[i].vmid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
output "alpaca_vm_names" {
|
output "control_plane_vm_names" {
|
||||||
value = [for vm in proxmox_vm_qemu.alpacas : vm.name]
|
value = [for vm in proxmox_vm_qemu.control_planes : vm.name]
|
||||||
}
|
}
|
||||||
|
|
||||||
output "llama_vm_ids" {
|
output "worker_vm_ids" {
|
||||||
value = {
|
value = {
|
||||||
for i in range(var.llama_vm_count) :
|
for i in range(var.worker_count) :
|
||||||
"llama-${i + 1}" => proxmox_vm_qemu.llamas[i].vmid
|
"wk-${i + 1}" => proxmox_vm_qemu.workers[i].vmid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
output "llama_vm_names" {
|
output "worker_vm_names" {
|
||||||
value = [for vm in proxmox_vm_qemu.llamas : vm.name]
|
value = [for vm in proxmox_vm_qemu.workers : vm.name]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
target_node = "flex"
|
target_node = "flex"
|
||||||
clone_template = "nixos-template"
|
clone_template = "nixos-template"
|
||||||
cores = 1
|
|
||||||
memory = 1024
|
|
||||||
disk_size = "15G"
|
|
||||||
sockets = 1
|
|
||||||
bridge = "vmbr0"
|
bridge = "vmbr0"
|
||||||
storage = "Flash"
|
storage = "Flash"
|
||||||
pm_api_url = "https://100.105.0.115:8006/api2/json"
|
pm_api_url = "https://100.105.0.115:8006/api2/json"
|
||||||
pm_api_token_id = "terraform-prov@pve!mytoken"
|
pm_api_token_id = "terraform-prov@pve!mytoken"
|
||||||
|
|
||||||
|
control_plane_count = 3
|
||||||
|
worker_count = 3
|
||||||
|
control_plane_vmid_start = 701
|
||||||
|
worker_vmid_start = 711
|
||||||
|
|
||||||
|
control_plane_cores = 1
|
||||||
|
control_plane_memory_mb = 4096
|
||||||
|
control_plane_disk_size = "40G"
|
||||||
|
|
||||||
|
worker_cores = [4, 4, 3]
|
||||||
|
worker_memory_mb = [12288, 12288, 12288]
|
||||||
|
worker_disk_size = "60G"
|
||||||
|
|||||||
@@ -27,20 +27,64 @@ variable "clone_template" {
|
|||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "cores" {
|
variable "control_plane_count" {
|
||||||
type = number
|
type = number
|
||||||
|
default = 3
|
||||||
|
description = "Number of control plane VMs"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "memory" {
|
variable "worker_count" {
|
||||||
type = number
|
type = number
|
||||||
|
default = 3
|
||||||
|
description = "Number of worker VMs"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "disk_size" {
|
variable "control_plane_vmid_start" {
|
||||||
type = string
|
type = number
|
||||||
|
default = 701
|
||||||
|
description = "Starting VMID for control plane VMs"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "sockets" {
|
variable "worker_vmid_start" {
|
||||||
type = number
|
type = number
|
||||||
|
default = 711
|
||||||
|
description = "Starting VMID for worker VMs"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "control_plane_cores" {
|
||||||
|
type = number
|
||||||
|
default = 1
|
||||||
|
description = "vCPU cores per control plane VM"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "control_plane_memory_mb" {
|
||||||
|
type = number
|
||||||
|
default = 4096
|
||||||
|
description = "Memory in MB per control plane VM"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "worker_cores" {
|
||||||
|
type = list(number)
|
||||||
|
default = [4, 4, 3]
|
||||||
|
description = "vCPU cores for each worker VM"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "worker_memory_mb" {
|
||||||
|
type = list(number)
|
||||||
|
default = [12288, 12288, 12288]
|
||||||
|
description = "Memory in MB for each worker VM"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "control_plane_disk_size" {
|
||||||
|
type = string
|
||||||
|
default = "40G"
|
||||||
|
description = "Disk size for control plane VMs"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "worker_disk_size" {
|
||||||
|
type = string
|
||||||
|
default = "60G"
|
||||||
|
description = "Disk size for worker VMs"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "bridge" {
|
variable "bridge" {
|
||||||
@@ -55,18 +99,6 @@ variable "pm_api_url" {
|
|||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "alpaca_vm_count" {
|
|
||||||
type = number
|
|
||||||
default = 1
|
|
||||||
description = "How many Alpaca VMs to create"
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "llama_vm_count" {
|
|
||||||
type = number
|
|
||||||
default = 1
|
|
||||||
description = "How many Llama VMs to create"
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "SSH_KEY_PUBLIC" {
|
variable "SSH_KEY_PUBLIC" {
|
||||||
type = string
|
type = string
|
||||||
description = "Public SSH key injected via cloud-init"
|
description = "Public SSH key injected via cloud-init"
|
||||||
|
|||||||
Reference in New Issue
Block a user