fix(terraform): Use local-lvm storage for VM disks
Some checks failed
CD - Deploy Infrastructure / Terraform Validation (push) Successful in 16s
CD - Deploy Infrastructure / Deploy on pve1 (push) Failing after 2m23s
CD - Deploy Infrastructure / Deploy on pve2 (push) Failing after 2m35s
CD - Deploy Infrastructure / Deploy on pve3 (push) Failing after 10s
CD - Deploy Infrastructure / Validate K3s Cluster (push) Has been skipped
CD - Deploy Infrastructure / Deployment Notification (push) Failing after 1s
Some checks failed
CD - Deploy Infrastructure / Terraform Validation (push) Successful in 16s
CD - Deploy Infrastructure / Deploy on pve1 (push) Failing after 2m23s
CD - Deploy Infrastructure / Deploy on pve2 (push) Failing after 2m35s
CD - Deploy Infrastructure / Deploy on pve3 (push) Failing after 10s
CD - Deploy Infrastructure / Validate K3s Cluster (push) Has been skipped
CD - Deploy Infrastructure / Deployment Notification (push) Failing after 1s
LINSTOR ne supporte pas le clonage de VMs (ni full ni linked clone). Solution: utiliser local-lvm pour les disques des VMs. - Ajout variables k3s_server_X_storage_pool avec default local-lvm - Mise à jour du workflow deploy.yml - Retour à full_clone = true
This commit is contained in:
parent
3cc79b75dd
commit
67d46bceac
6 changed files with 40 additions and 26 deletions
|
|
@ -90,14 +90,15 @@ jobs:
|
|||
ssh_public_key = "${{ secrets.SSH_PUBLIC_KEY }}"
|
||||
forgejo_token = "${{ secrets.GIT_TOKEN }}"
|
||||
forgejo_repo_url = "${{ secrets.GIT_REPO_URL }}"
|
||||
k3s_version = "v1.28.5+k3s1"
|
||||
ubuntu_template = "ubuntu-2404-cloudinit"
|
||||
storage_pool = "linstor_storage"
|
||||
snippets_storage = "local"
|
||||
k3s_network_bridge = "k3s"
|
||||
k3s_gateway = "10.100.20.1"
|
||||
k3s_dns = ["10.100.20.1", "1.1.1.1"]
|
||||
k3s_server_1_config = { ip = "10.100.20.10/24", cores = 6, memory = 12288, disk_size = "100G" }
|
||||
k3s_version = "v1.28.5+k3s1"
|
||||
ubuntu_template = "ubuntu-2404-cloudinit"
|
||||
storage_pool = "linstor_storage"
|
||||
k3s_server_1_storage_pool = "local-lvm"
|
||||
snippets_storage = "local"
|
||||
k3s_network_bridge = "k3s"
|
||||
k3s_gateway = "10.100.20.1"
|
||||
k3s_dns = ["10.100.20.1", "1.1.1.1"]
|
||||
k3s_server_1_config = { ip = "10.100.20.10/24", cores = 6, memory = 12288, disk_size = "100G" }
|
||||
EOF
|
||||
tofu init
|
||||
tofu apply -auto-approve
|
||||
|
|
@ -119,19 +120,20 @@ jobs:
|
|||
run: |
|
||||
cd terraform/pve2
|
||||
cat > terraform.tfvars <<EOF
|
||||
proxmox_token_id = "${{ secrets.PROXMOX_TOKEN_ID }}"
|
||||
proxmox_token_secret = "${{ secrets.PROXMOX_TOKEN_SECRET }}"
|
||||
ssh_public_key = "${{ secrets.SSH_PUBLIC_KEY }}"
|
||||
forgejo_token = "${{ secrets.GIT_TOKEN }}"
|
||||
forgejo_repo_url = "${{ secrets.GIT_REPO_URL }}"
|
||||
k3s_version = "v1.28.5+k3s1"
|
||||
ubuntu_template = "ubuntu-2404-cloudinit"
|
||||
storage_pool = "linstor_storage"
|
||||
snippets_storage = "local"
|
||||
k3s_network_bridge = "k3s"
|
||||
k3s_gateway = "10.100.20.1"
|
||||
k3s_dns = ["10.100.20.1", "1.1.1.1"]
|
||||
k3s_server_2_config = { ip = "10.100.20.20/24", cores = 6, memory = 12288, disk_size = "100G" }
|
||||
proxmox_token_id = "${{ secrets.PROXMOX_TOKEN_ID }}"
|
||||
proxmox_token_secret = "${{ secrets.PROXMOX_TOKEN_SECRET }}"
|
||||
ssh_public_key = "${{ secrets.SSH_PUBLIC_KEY }}"
|
||||
forgejo_token = "${{ secrets.GIT_TOKEN }}"
|
||||
forgejo_repo_url = "${{ secrets.GIT_REPO_URL }}"
|
||||
k3s_version = "v1.28.5+k3s1"
|
||||
ubuntu_template = "ubuntu-2404-cloudinit"
|
||||
storage_pool = "linstor_storage"
|
||||
k3s_server_2_storage_pool = "local-lvm"
|
||||
snippets_storage = "local"
|
||||
k3s_network_bridge = "k3s"
|
||||
k3s_gateway = "10.100.20.1"
|
||||
k3s_dns = ["10.100.20.1", "1.1.1.1"]
|
||||
k3s_server_2_config = { ip = "10.100.20.20/24", cores = 6, memory = 12288, disk_size = "100G" }
|
||||
EOF
|
||||
tofu init
|
||||
tofu apply -auto-approve
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ resource "proxmox_vm_qemu" "k3s_server_1" {
|
|||
name = "k3s-server-1"
|
||||
target_node = "acemagician"
|
||||
clone = var.ubuntu_template
|
||||
full_clone = false
|
||||
full_clone = true
|
||||
|
||||
cpu {
|
||||
cores = var.k3s_server_1_config.cores
|
||||
|
|
@ -49,7 +49,7 @@ resource "proxmox_vm_qemu" "k3s_server_1" {
|
|||
slot = "scsi0"
|
||||
size = var.k3s_server_1_config.disk_size
|
||||
type = "disk"
|
||||
storage = var.storage_pool
|
||||
storage = var.k3s_server_1_storage_pool
|
||||
iothread = true
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,12 @@ variable "storage_pool" {
|
|||
type = string
|
||||
}
|
||||
|
||||
variable "k3s_server_1_storage_pool" {
|
||||
description = "Storage pool for k3s-server-1 disk (use local-lvm since template must be local)"
|
||||
type = string
|
||||
default = "local-lvm"
|
||||
}
|
||||
|
||||
variable "snippets_storage" {
|
||||
description = "Proxmox storage for cloud-init snippets"
|
||||
type = string
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ resource "proxmox_vm_qemu" "k3s_server_2" {
|
|||
name = "k3s-server-2"
|
||||
target_node = "elitedesk"
|
||||
clone = var.ubuntu_template
|
||||
full_clone = false
|
||||
full_clone = true
|
||||
|
||||
cpu {
|
||||
cores = var.k3s_server_2_config.cores
|
||||
|
|
@ -49,7 +49,7 @@ resource "proxmox_vm_qemu" "k3s_server_2" {
|
|||
slot = "scsi0"
|
||||
size = var.k3s_server_2_config.disk_size
|
||||
type = "disk"
|
||||
storage = var.storage_pool
|
||||
storage = var.k3s_server_2_storage_pool
|
||||
iothread = true
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,12 @@ variable "storage_pool" {
|
|||
type = string
|
||||
}
|
||||
|
||||
variable "k3s_server_2_storage_pool" {
|
||||
description = "Storage pool for k3s-server-2 disk (use local-lvm since template must be local)"
|
||||
type = string
|
||||
default = "local-lvm"
|
||||
}
|
||||
|
||||
variable "snippets_storage" {
|
||||
description = "Proxmox storage for cloud-init snippets"
|
||||
type = string
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ resource "proxmox_vm_qemu" "etcd_witness" {
|
|||
name = "etcd-witness"
|
||||
target_node = "thinkpad"
|
||||
clone = var.ubuntu_template
|
||||
full_clone = false
|
||||
full_clone = true
|
||||
|
||||
cpu {
|
||||
cores = var.etcd_witness_config.cores
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue