Updated docs

This commit is contained in:
Francesco Zimbolo
2026-04-23 09:10:34 +00:00
parent 043a92ce86
commit 983688a388
6 changed files with 72 additions and 38 deletions

View File

@@ -2,20 +2,34 @@
Ensure you are operating within the `ansible/` directory inside the DevContainer.
## 1. Test Connectivity
Verify SSH access to the nodes before triggering the pipeline. Because SSH keys are not yet distributed, Ansible must prompt for the root password (`-k`).
## 1. Performance & Parallelism
This repository includes an `ansible.cfg` file configured for performance (`pipelining = True`) and high concurrency (`forks = 20`). If you are provisioning 10 independent servers concurrently in `standalone_mode`, Ansible will process them all simultaneously.
*(Warning: If your uplink bandwidth is limited, concurrent `apt dist-upgrade` tasks across 20 nodes may saturate the link. Lower the `forks` value if you experience APT timeouts).*
## 2. Test Connectivity
Verify SSH access to the nodes before triggering the pipeline.
**Authentication Flag (`-k`):** If you rely on root passwords, you must append `-k` (`--ask-pass`) to force Ansible to prompt you. If you have already deployed your SSH key to the nodes (e.g., via `ssh-copy-id`), omit the `-k` flag for seamless passwordless execution.
```bash
# With SSH Key deployed:
ansible all -i inventories/<customer_name>/hosts.yml -m ping -u root
# Without SSH Key (prompts for password):
ansible all -i inventories/<customer_name>/hosts.yml -m ping -u root -k
```
## 2. Execute the Playbook
Run the converged deployment playbook. You will be prompted for the SSH password once.
## 3. Execute the Playbook
Run the converged deployment playbook.
```bash
# With SSH Key deployed:
ansible-playbook -i inventories/<customer_name>/hosts.yml deploy.yml -u root
# Without SSH Key:
ansible-playbook -i inventories/<customer_name>/hosts.yml deploy.yml -u root -k
```
## Expected Behavior
* **Idempotency:** The playbook is declarative. If execution fails due to a transient network issue, re-running the exact command will bypass successful tasks and resume from the failure point.
* **Reboots:** If Phase 2 upgrades the running PVE kernel, the playbook forces a synchronized node reboot to ensure DRBD module compatibility against the active kernel headers. Ansible will pause and wait for the nodes to return online.
* **State-Driven Reboots:** If APT installs core libraries or a new PVE kernel, it generates `/var/run/reboot-required`. Ansible detects this, initiates a graceful system reboot, drops the SSH connection, and continuously polls port 22 up to 10 minutes, seamlessly resuming execution once the servers are back online.