Commit 7789eef
committed
feat: Switch to bastion-hosted registry and consolidate architecture
BREAKING CHANGE: Replaced ACR with bastion-hosted podman registry for truly self-contained deployment
## Major Changes
### 1. Bastion-Hosted Container Registry
- Replace Azure Container Registry with podman registry on bastion (port 5000)
- Eliminates ACR, private endpoint, and private DNS complexity
- Truly self-contained: all images served from bastion
- Auto-configured by cloud-init (registry.service systemd unit)
- Storage: /var/cache/oc-mirror/registry/data (500GB data disk)
### 2. Maximum Terraform Automation
- Cloud-init now 100% self-contained (passes Azure creds, git URL via Terraform)
- Auto-generates SSH key on bastion
- Auto-clones pattern repository
- Auto-starts all three HTTP servers (registry, git, ignition)
- deploy-cluster.sh auto-runs mirroring if needed (eliminates manual step)
### 3. Network Security Updates
- Added AllowAzureCloudAPIs NSG rule for cluster VM provisioning
- Updated AllowBastionServices to include port 5000 (registry)
- Removed service endpoints (no longer using ACR or Azure Storage from cluster)
- Cluster: NO internet, YES Azure APIs, ALL content from bastion
### 4. Documentation Consolidation
- Created master ARCHITECTURE.md (single source of truth)
- Archived 7 iterative docs to docs/archive-20251113/
- Updated README.md to reference ARCHITECTURE.md
- Clear deployment flow with automation details
### 5. Terraform-First Refactoring
- Moved deprecated shell-heavy wrappers to deprecated-scripts-20251113/
- Created terraform-rhcos-image/ module for RHCOS prep
- Created terraform-upi-complete/ module for full UPI
- deploy-cluster.sh is minimal orchestration (247 lines vs 463)
## Files Changed
### Infrastructure (Terraform)
- terraform/main.tf: Remove ACR, add registry NSG rules, add AzureCloud API rule
- terraform/cloud-init.yaml: Add registry service, update .envrc for REGISTRY_URL
- terraform/variables.tf: Remove acr_sku, add git_remote_url/git_branch
- terraform/outputs.tf: Remove ACR outputs, add bastion_registry_url
### Scripts
- bastion/mirror.sh: Target localhost:5000 instead of ACR
- bastion/deploy-cluster.sh: Remove ACR_LOGIN_SERVER, add auto-mirroring, use REGISTRY_URL
- configure-bastion.sh: Remove ACR retrieval, add registry verification
- provision.sh: Auto-detect git remote/branch, pass to Terraform
### Documentation
- ARCHITECTURE.md: NEW - Comprehensive single-source architecture guide
- README.md: Link to ARCHITECTURE.md
- docs/archive-20251113/: Archived 7 iterative docs with README
### New Modules
- terraform-rhcos-image/: Terraform module for RHCOS image preparation
- terraform-upi-complete/: Complete UPI deployment with DNS, LBs, VMs
- deprecated-scripts-20251113/: Backup of old shell-heavy wrappers
## Fresh Deployment Flow (Simplified)
1. `./provision.sh eastasia` - Terraform creates infra, cloud-init configures bastion (15 min)
2. `scp ~/pull-secret.json azureuser@<bastion-ip>:~/` - Copy pull secret (instant)
3. `ssh azureuser@<bastion-ip> 'cd ~/coco-pattern && ./rhdp-isolated/bastion/deploy-cluster.sh eastasia'` - Deploy (2.5-5 hrs first time)
All configuration automated. No manual steps except pull secret copy.
## Verified Assumptions
1. ✅ Cluster cannot access internet (DenyInternetOutbound NSG)
2. ✅ Cluster CAN access Azure APIs (AllowAzureCloudAPIs NSG)
3. ✅ All images mirrored to bastion registry
4. ✅ Bastion runs oc-mirror (auto in deploy-cluster.sh)
5. ✅ Bastion hosts git (port 8080)
6. ✅ Bastion hosts ignition (port 8081)
7. ✅ Bastion hosts registry (port 5000)
8. ✅ Blob storage only used by bastion for RHCOS VHD (not by cluster)
9. ✅ NSG isolates cluster from internet, allows Azure APIs
## Benefits
- 37% code reduction (663 → 417 lines)
- Zero manual bastion configuration
- One-command deployment
- Bastion registry simpler than ACR
- Terraform state management
- Built-in idempotency
- Fresh deployments work automatically1 parent df54276 commit 7789eef
42 files changed
Lines changed: 7247 additions & 220 deletions
File tree
- docs/archive-20251113
- rhdp-isolated
- bastion
- deprecated-scripts-20251113
- terraform-upi
- terraform-rhcos-image
- terraform-upi-complete
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
| 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 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
0 commit comments