Commit 1f4b1b3
authored
Enable parallel CI execution with cluster isolation and local testing support (#24)
* feat: Enable parallel CI execution with isolated infrastructure
Add atomic subnet allocation and cluster-specific resource isolation to
allow multiple CI jobs to run simultaneously without conflicts.
Key changes:
- Atomic subnet allocation with file locking (100.64.X.0/24 ranges)
- Cluster-specific BMC emulator ports (8000 + subnet_id)
- Unique storage pool paths per cluster
- Network isolation (bridges, libvirt networks)
- Comprehensive network diagnostics for troubleshooting
- Orphaned bridge cleanup and conflict detection
- Storage pool activation and management improvements
- Container lifecycle fixes for sushy-tools
Infrastructure reliability improvements:
- Handle "already active" storage pools gracefully
- Remove orphaned bridges from previous runs
- Add layer 2 network diagnostics (ebtables, arptables, nftables)
- Network initialization wait for ARP resolution
- Bridge IP assignment timeout handling
- Clean up dev-scripts -1 suffix pools
- Firewall rules for BMC endpoints
This enables parallel PR testing and nightly runs without resource
conflicts or cross-contamination between jobs.
* refactor: Standardize working directory handling across all scripts
Refactor all scripts to auto-construct WORKING_DIR from BASE_WORKING_DIR
when not explicitly set, enabling cluster-specific working directories.
This supports:
- Parallel CI execution (each cluster gets own directory)
- Local testing (explicit WORKING_DIR)
- CI environment (BASE_WORKING_DIR set, auto-construct path)
- Workflow steps with if: always() (work even if setup-working-dir failed)
Scripts updated with auto-construction pattern:
- get_landing_zone_ip.sh - Find Landing Zone IP from environment file
- generate_environment_json.sh - Create environment metadata
- generate_enclave_vars.sh - Generate Ansible variables
- install_enclave.sh - Enclave installation
- verify_landing_zone.sh - Landing Zone verification
- collect_ci_artifacts.sh - Artifact collection
Pattern: Auto-construct from BASE_WORKING_DIR + ENCLAVE_CLUSTER_NAME,
with appropriate fallbacks or errors for each script's needs.
* refactor: Move CI logic to Makefile and scripts for local testing
Refactor GitHub Actions workflows to use Makefile targets and scripts,
enabling full CI flow to run locally for development and debugging.
New scripts (dual-mode: local terminal + GitHub Actions):
- verify_cluster.sh - Cluster deployment verification
- verify_cleanup.sh - Infrastructure cleanup verification
- verify_networks.sh - Network infrastructure validation
- setup_working_dir.sh - Working directory setup
- collect_step_logs.sh - Log collection
- preflight_checks.sh - Environment validation
- generate_cluster_name.sh - Unique cluster naming
New Makefile targets:
- verify-cluster, verify-cleanup, verify-networks
- setup-working-dir, collect-step-logs
- preflight-checks, ci-flow-connected, ci-flow-disconnected
Workflow changes:
- Inline bash → make targets (e2e-deployment, infra-verify, nightlies)
- Remove setup-infrastructure action (direct make calls instead)
- Refactor preflight-checks action (delegate to script)
- Add allocate-subnet action usage
- Restore check-e2e-needed to pr-validation runner (intentional change)
- Restore e2e-deployment to enclave-large runner
- Restore infra-verify to enclave-small runner
- Un-comment "Clean existing infrastructure" step
Benefits:
- Run full CI locally: make ci-flow-connected
- Debug individual steps: make verify-cluster
- Test changes before CI: make environment && make provision-landing-zone
- Consistent logic: same code for CI and local
Documentation:
- docs/LOCAL_TESTING.md - Comprehensive local testing guide
- README.md - New Makefile targets section1 parent 997e4ce commit 1f4b1b3
28 files changed
Lines changed: 3112 additions & 524 deletions
File tree
- .github
- actions
- allocate-subnet
- preflight-checks
- setup-infrastructure
- workflows
- docs
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 32 | + | |
| 33 | + | |
54 | 34 | | |
55 | 35 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 36 | + | |
62 | 37 | | |
63 | 38 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | 39 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 40 | + | |
81 | 41 | | |
82 | 42 | | |
83 | | - | |
84 | 43 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 44 | + | |
93 | 45 | | |
94 | 46 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 47 | + | |
| 48 | + | |
105 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
This file was deleted.
0 commit comments