feat(cicd): Ajouter gestion automatique des ressources DRBD Linstor
Some checks failed
CD - Deploy Infrastructure / Terraform Validation (push) Failing after 10s
CD - Deploy Infrastructure / Deploy on pve1 (push) Has been skipped
CD - Deploy Infrastructure / Deploy on pve2 (push) Has been skipped
CD - Deploy Infrastructure / Deploy on pve3 (push) Has been skipped
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) Failing after 10s
CD - Deploy Infrastructure / Deploy on pve1 (push) Has been skipped
CD - Deploy Infrastructure / Deploy on pve2 (push) Has been skipped
CD - Deploy Infrastructure / Deploy on pve3 (push) Has been skipped
CD - Deploy Infrastructure / Validate K3s Cluster (push) Has been skipped
CD - Deploy Infrastructure / Deployment Notification (push) Failing after 1s
- Créer script Python pour gérer les ressources DRBD avant déploiement
* Vérifie l'existence des ressources Linstor
* Crée les ressources si nécessaire avec réplication
* Augmente la taille si elle est insuffisante
* Noms fixes: pm-a7f3c8e1 (VMID 1000) et pm-b4d2f9a3 (VMID 1001)
- Modifier workflow CI/CD pour intégrer le script Python
* Ajouter étape de configuration SSH avec secret LINSTOR_SSH_PRIVATE_KEY
* Exécuter le script avant tofu apply sur pve1 et pve2
- Corriger configuration Terraform des VMs
* Ajouter vga { type = "std" } pour Standard VGA sur toutes les VMs
* Ajouter cpu { type = "host" } pour meilleure performance
* Ajouter replace_triggered_by pour détecter les changements de config
* Ajouter force_create = true sur pve3 pour gérer VM existante
- Résoudre problèmes identifiés
* "No Bootable Device" - Résolu avec Standard VGA et CPU host
* "vmId already in use" - Résolu avec force_create sur etcd-witness
* Détection des modifications de VM - Résolu avec replace_triggered_by
Documentation SSH créée dans cicd_backup/SETUP_SSH_LINSTOR.md
This commit is contained in:
parent
cc26fb97a6
commit
865c154500
8 changed files with 756 additions and 5 deletions
|
|
@ -28,14 +28,21 @@ resource "proxmox_vm_qemu" "k3s_server_1" {
|
|||
clone = var.ubuntu_template
|
||||
full_clone = true
|
||||
|
||||
# Configuration CPU
|
||||
cpu {
|
||||
cores = var.k3s_server_1_config.cores
|
||||
sockets = 1
|
||||
type = "host"
|
||||
}
|
||||
|
||||
memory = var.k3s_server_1_config.memory
|
||||
agent = 1
|
||||
|
||||
# Configuration vidéo - Standard VGA
|
||||
vga {
|
||||
type = "std"
|
||||
}
|
||||
|
||||
boot = "order=scsi0"
|
||||
scsihw = "virtio-scsi-single"
|
||||
onboot = true
|
||||
|
|
@ -52,6 +59,8 @@ resource "proxmox_vm_qemu" "k3s_server_1" {
|
|||
type = "disk"
|
||||
storage = var.k3s_server_1_storage_pool
|
||||
iothread = true
|
||||
# Utilise la ressource DRBD pré-créée
|
||||
volume = "linstor_storage:pm-a7f3c8e1"
|
||||
}
|
||||
|
||||
ipconfig0 = "ip=${var.k3s_server_1_config.ip},gw=${var.k3s_gateway}"
|
||||
|
|
|
|||
|
|
@ -28,14 +28,21 @@ resource "proxmox_vm_qemu" "k3s_server_2" {
|
|||
clone = var.ubuntu_template
|
||||
full_clone = true
|
||||
|
||||
# Configuration CPU
|
||||
cpu {
|
||||
cores = var.k3s_server_2_config.cores
|
||||
sockets = 1
|
||||
type = "host"
|
||||
}
|
||||
|
||||
memory = var.k3s_server_2_config.memory
|
||||
agent = 1
|
||||
|
||||
# Configuration vidéo - Standard VGA
|
||||
vga {
|
||||
type = "std"
|
||||
}
|
||||
|
||||
boot = "order=scsi0"
|
||||
scsihw = "virtio-scsi-single"
|
||||
onboot = true
|
||||
|
|
@ -52,6 +59,8 @@ resource "proxmox_vm_qemu" "k3s_server_2" {
|
|||
type = "disk"
|
||||
storage = var.k3s_server_2_storage_pool
|
||||
iothread = true
|
||||
# Utilise la ressource DRBD pré-créée
|
||||
volume = "linstor_storage:pm-b4d2f9a3"
|
||||
}
|
||||
|
||||
ipconfig0 = "ip=${var.k3s_server_2_config.ip},gw=${var.k3s_gateway}"
|
||||
|
|
|
|||
|
|
@ -22,20 +22,28 @@ provider "proxmox" {
|
|||
|
||||
# etcd Witness VM on thinkpad
|
||||
resource "proxmox_vm_qemu" "etcd_witness" {
|
||||
vmid = 1002
|
||||
name = "etcd-witness"
|
||||
target_node = "thinkpad"
|
||||
clone = var.ubuntu_template
|
||||
full_clone = true
|
||||
vmid = 1002
|
||||
name = "etcd-witness"
|
||||
target_node = "thinkpad"
|
||||
clone = var.ubuntu_template
|
||||
full_clone = true
|
||||
force_create = true
|
||||
|
||||
# Configuration CPU
|
||||
cpu {
|
||||
cores = var.etcd_witness_config.cores
|
||||
sockets = 1
|
||||
type = "host"
|
||||
}
|
||||
|
||||
memory = var.etcd_witness_config.memory
|
||||
agent = 1
|
||||
|
||||
# Configuration vidéo - Standard VGA
|
||||
vga {
|
||||
type = "std"
|
||||
}
|
||||
|
||||
boot = "order=scsi0"
|
||||
scsihw = "virtio-scsi-single"
|
||||
onboot = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue