fix(cicd): Execute LINSTOR script in Docker container via SSH
Some checks failed
CD - Deploy Infrastructure / Terraform Validation (push) Successful in 17s
CD - Deploy Infrastructure / Deploy on pve1 (push) Failing after 8s
CD - Deploy Infrastructure / Deploy on pve2 (push) Failing after 8s
CD - Deploy Infrastructure / Deploy on pve3 (push) Successful in 1m53s
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 17s
CD - Deploy Infrastructure / Deploy on pve1 (push) Failing after 8s
CD - Deploy Infrastructure / Deploy on pve2 (push) Failing after 8s
CD - Deploy Infrastructure / Deploy on pve3 (push) Successful in 1m53s
CD - Deploy Infrastructure / Validate K3s Cluster (push) Has been skipped
CD - Deploy Infrastructure / Deployment Notification (push) Failing after 1s
- Modifie le script Python pour supporter l'exécution via SSH - Ajoute paramètre --remote-host pour spécifier l'hôte LINSTOR - Installe Python3 dans le container Docker (sans sudo) - Le script s'exécute dans le container et communique avec LINSTOR via SSH - Résout l'erreur 'sudo: command not found' dans les containers Docker
This commit is contained in:
parent
f33af51c4c
commit
10e61edbc7
2 changed files with 33 additions and 22 deletions
|
|
@ -83,13 +83,11 @@ jobs:
|
|||
fi
|
||||
- name: Setup Python
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y python3
|
||||
apt-get update && 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"
|
||||
# Exécute le script dans le container, qui utilisera SSH pour communiquer avec LINSTOR
|
||||
python3 scripts/manage_linstor_resources.py --terraform-dir terraform --remote-host thinkpad --verbose
|
||||
- name: Terraform Apply on pve1
|
||||
run: |
|
||||
cd terraform/pve1
|
||||
|
|
@ -127,13 +125,11 @@ jobs:
|
|||
fi
|
||||
- name: Setup Python
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y python3
|
||||
apt-get update && 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"
|
||||
# Exécute le script dans le container, qui utilisera SSH pour communiquer avec LINSTOR
|
||||
python3 scripts/manage_linstor_resources.py --terraform-dir terraform --remote-host thinkpad --verbose
|
||||
- name: Terraform Apply on pve2
|
||||
run: |
|
||||
cd terraform/pve2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue