feat: Automatisation gestion ressources LINSTOR et améliorations VMs
All checks were successful
CI - Validation / Terraform Validation (push) Successful in 12s
CI - Validation / Ansible Validation (push) Successful in 1m2s
CI - Validation / Kubernetes Validation (push) Successful in 8s
CI - Validation / Security Scan (push) Successful in 15s

- Ajout script Python (v1.0) pour gestion automatique des ressources LINSTOR
  * Vérifie et crée les ressources si nécessaires
  * Redimensionne les volumes (augmentation uniquement)
  * Lecture automatique depuis fichiers Terraform
  * Opérations idempotentes

- Intégration dans pipeline CI/CD pour pve1 et pve2
  * Copie et exécution du script sur chaque noeud
  * Lecture dynamique de la config Terraform

- Améliorations configuration Terraform pour toutes les VMs
  * Ajout Standard VGA (résout "No Bootable Device")
  * Configuration CPU type "host" pour meilleures performances
  * BIOS et boot order explicites
  * Gestion VMs existantes (force_create approprié)
  * Lifecycle simplifié pour permettre mises à jour

Auteur script: BENE Maël
This commit is contained in:
Tellsanguis 2025-11-27 12:31:26 +01:00
parent a818aab4be
commit e1082d996b
5 changed files with 505 additions and 6 deletions

View file

@ -81,6 +81,15 @@ jobs:
if ! command -v tofu &> /dev/null; then
curl -fsSL https://get.opentofu.org/install-opentofu.sh | bash -s -- --install-method standalone --opentofu-version 1.10.7
fi
- name: Setup Python
run: |
sudo apt-get update && sudo apt-get install -y python3
- name: Prepare LINSTOR resources for pve1
run: |
# Copie le script sur le noeud et exécute avec lecture automatique depuis Terraform
scp scripts/manage_linstor_resources.py root@acemagician:/tmp/
scp -r terraform root@acemagician:/tmp/
ssh root@acemagician "python3 /tmp/manage_linstor_resources.py --terraform-dir /tmp/terraform --verbose"
- name: Terraform Apply on pve1
run: |
cd terraform/pve1
@ -116,6 +125,15 @@ jobs:
if ! command -v tofu &> /dev/null; then
curl -fsSL https://get.opentofu.org/install-opentofu.sh | bash -s -- --install-method standalone --opentofu-version 1.10.7
fi
- name: Setup Python
run: |
sudo apt-get update && sudo apt-get install -y python3
- name: Prepare LINSTOR resources for pve2
run: |
# Copie le script sur le noeud et exécute avec lecture automatique depuis Terraform
scp scripts/manage_linstor_resources.py root@elitedesk:/tmp/
scp -r terraform root@elitedesk:/tmp/
ssh root@elitedesk "python3 /tmp/manage_linstor_resources.py --terraform-dir /tmp/terraform --verbose"
- name: Terraform Apply on pve2
run: |
cd terraform/pve2