Enhance SSH configuration and security group management

- Added optional SSH security-group CIDR configuration in `env.example` to allow broader access if needed.
- Improved `guess_operator_cidr` function to support multiple IP retrieval services and allow overriding CIDR via environment variable.
- Refactored security group management to ensure idempotency and proper logging of security group rules.
- Introduced helper function `_get_volume_or_none` for better volume management and error handling.
- Updated `wait_ssh` function to enhance SSH connection handling with improved timeout settings and logging.
- Added state reset logic in `cmd_up` to handle scenarios where the server is not found in the cloud.
This commit is contained in:
Leonid Pershin
2026-08-21 04:12:38 +03:00
parent 28019d1d09
commit d6d247875b
4 changed files with 123 additions and 39 deletions
+3
View File
@@ -12,6 +12,9 @@ GPU_RENT_AZ=ru-7a
SSH_PRIVATE_KEY_PATH=
SSH_USER=ubuntu
# Optional: force SSH security-group CIDR (default = your public IP /32).
# If WARP/VPN and SSH hangs: GPU_RENT_SSH_CIDR=0.0.0.0/0
# GPU_RENT_SSH_CIDR=0.0.0.0/0
BOOT_VOLUME_ID=
DATA_VOLUME_ID=