Skip to content

Commit 4adfd51

Browse files
committed
docs(azure): fix FreeIPA web UI expected HTTP status 302 -> 301
Actual FreeIPA web UI redirects with HTTP 301 (permanent redirect), not 302. Corrects expected output in Phase 1 lab test section.
1 parent 7adfcad commit 4adfd51

File tree

1 file changed

+53
-28
lines changed

1 file changed

+53
-28
lines changed

docs/05-guides/18-azure-lab-deployment.md

Lines changed: 53 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@
22

33
> **Purpose:** Step-by-step instructions for deploying and running IT-Stack labs on Microsoft Azure using the provided PowerShell automation scripts.
44
> **Audience:** Engineers and students running IT-Stack labs from a Windows workstation.
5-
> **Prerequisites:** Azure subscription with sufficient credit (Azure Student works), Windows with PowerShell 7+, Azure CLI, SSH.
5+
> **Prerequisites:** Azure subscription with sufficient credit (Azure Student works), Windows with PowerShell 5.1+ (or 7+), Azure CLI, SSH.
66
77
---
88

99
## Overview: Three Deployment Profiles
1010

1111
| Profile | VM(s) | Size | RAM | Daily Cost | Labs | Use Case |
1212
|---------|--------|------|-----|-----------|------|----------|
13-
| **Phase1** | 1 VM | Standard_D8s_v4 | 32 GB | ~$3 / day | 01–03 | First-time setup, Azure Student start |
13+
| **Phase1** | 1 VM | Standard_D4s_v4 | 16 GB | ~$1.50 / day | 01–03 | First-time setup, Azure Student start |
1414
| **FullStack** | 1 VM | Standard_E16s_v4 | 128 GB | ~$8 / day | 01–05 | All 20 modules, integration testing |
1515
| **Lab06HA** | 8 VMs | per-server | varies | ~$16 / day | 01–06 | Production HA, Ansible playbooks, DR drills |
1616

1717
> **Azure Student ($100 credit):**
18-
> - Phase1 → ~33 days of 8-hour sessions
18+
> - Phase1 → ~65 days of 8-hour sessions
1919
> - FullStack → ~12 days of 8-hour sessions
2020
> - Lab06HA → use sparingly — 1–2 full sessions for Lab 06
21+
>
22+
> **Azure Student vCPU quota:** Student subscriptions in westus2 are typically limited to 6 vCPUs. Phase1 uses `Standard_D4s_v4` (4 vCPUs) to stay within this limit. Do not use `Standard_D8s_v4` (8 vCPUs) — deployment will fail with a quota error.
2123
2224
---
2325

@@ -75,7 +77,7 @@ cd it-stack-installer
7577
| Resource | Value |
7678
|----------|-------|
7779
| Resource Group | `rg-it-stack-phase1` |
78-
| VM | `lab-single` (Standard_D8s_v4, 64 GB disk) |
80+
| VM | `lab-single` (Standard_D4s_v4, 64 GB disk — 4 vCPU / 16 GB RAM) |
7981
| Private IP | `10.0.50.10` |
8082
| Public IP | Yes (assigned to lab-single) |
8183
| OS | Ubuntu 24.04 LTS |
@@ -108,33 +110,53 @@ ssh itstack@<PUBLIC_IP>
108110
After SSH-ing into the VM:
109111

110112
```bash
111-
# ── Step 1: Navigate to installer repo (pre-cloned) ──────────────────────────
112-
cd ~/it-stack-installer
113-
114-
# ── Step 2: Run Lab 01 (FreeIPA standalone) ───────────────────────────────────
115-
bash tests/labs/01-01-standalone.sh
116-
# Expected: FreeIPA container starts, LDAP health check passes
113+
# ── Upload and run the Phase 1 standalone lab suite ──────────────────────────
114+
# (from your Windows machine — run before SSH, or paste into a terminal)
115+
# scp path/to/it-stack-dev/scripts/testing/lab-phase1.sh itstack@<IP>:~/lab-phase1.sh
117116

118-
# ── Step 3: Run Lab 01 (Keycloak standalone) ──────────────────────────────────
119-
bash tests/labs/02-01-standalone.sh
120-
# Expected: Keycloak starts, admin UI accessible on port 8080
117+
# On the VM: run all 5 Phase 1 modules (without FreeIPA for a quick ~3-min run)
118+
bash ~/lab-phase1.sh --skip-freeipa
121119

122-
# ── Step 4: Run Lab 01 (PostgreSQL standalone) ────────────────────────────────
123-
bash tests/labs/03-01-standalone.sh
124-
# Expected: PostgreSQL starts, pg_isready passes
125-
126-
# ── Step 5: Run Lab 01 (Redis standalone) ─────────────────────────────────────
127-
bash tests/labs/04-01-standalone.sh
128-
# Expected: Redis starts, PONG response to PING
120+
# Run everything including FreeIPA (~20-25 min total — FreeIPA installs on first boot)
121+
bash ~/lab-phase1.sh
122+
```
129123

130-
# ── Step 6: Run Lab 01 (Traefik standalone) ───────────────────────────────────
131-
bash tests/labs/18-01-standalone.sh
132-
# Expected: Traefik dashboard accessible on port 8080
124+
**Expected output (all pass):**
133125

134-
# ── Or run all Phase 1 labs at once ───────────────────────────────────────────
135-
bash scripts/run-phase1-labs.sh
126+
```
127+
>> Lab 02-01 — Keycloak Standalone
128+
[PASS] Keycloak HTTP endpoint responds (HTTP 302)
129+
[PASS] Keycloak admin login and OIDC token issued
130+
[PASS] Keycloak /health/ready: UP
131+
132+
>> Lab 03-01 — PostgreSQL Standalone
133+
[PASS] PostgreSQL pg_isready: accepting connections
134+
[PASS] PostgreSQL CRUD: CREATE TABLE + INSERT + SELECT
135+
[PASS] PostgreSQL multi-db: appdb and testdb created
136+
137+
>> Lab 04-01 — Redis Standalone
138+
[PASS] Redis PING: PONG
139+
[PASS] Redis SET/GET key-value
140+
[PASS] Redis LPUSH/LLEN list operations
141+
[PASS] Redis AOF persistence enabled
142+
143+
>> Lab 18-01 — Traefik Standalone
144+
[PASS] Traefik /ping: OK
145+
[PASS] Traefik dashboard API: HTTP 200
146+
[PASS] Traefik file provider: 'whoami' router loaded
147+
[PASS] Traefik reverse proxy: request routed to whoami backend
148+
149+
>> Lab 01-01 — FreeIPA Standalone
150+
[PASS] FreeIPA ipactl status: services running
151+
[PASS] FreeIPA LDAP bind: Directory Manager authenticated
152+
[PASS] FreeIPA Kerberos: admin kinit succeeded
153+
[PASS] FreeIPA web UI reachable (HTTP 301)
154+
155+
All Phase 1 standalone lab tests PASSED!
136156
```
137157

158+
> **Note — Traefik Docker provider (Docker 29.x):** Docker Engine 29.x raised the minimum accepted client API version from 1.24 to 1.40. Traefik v3.x defaults to API 1.24 for initial negotiation, causing Docker label discovery to fail on this VM. Lab 01 validates routing via the file provider instead (equivalent functionality). Docker label discovery is tested in Lab 02+ where the Docker daemon version is controlled.
159+
138160
For Labs 02 and 03, see the individual lab guides in `docs/labs/`.
139161

140162
### Cost Control
@@ -154,11 +176,13 @@ For Labs 02 and 03, see the individual lab guides in `docs/labs/`.
154176

155177
| Activity | Duration | Cost |
156178
|----------|----------|------|
157-
| Deploy + 8hr session | 1 day | ~$3.00 |
179+
| Deploy + 8hr session (D4s_v4) | 1 day | ~$1.55 |
158180
| Stop overnight (disk only) | 16 hrs | ~$0.05 |
159-
| 1 week (8hrs/day, stopped overnight) | 7 days | ~$21.35 |
181+
| 1 week (8hrs/day, stopped overnight) | 7 days | ~$11.20 |
160182
| Delete between sessions || $0.00 |
161183

184+
> **Standard_D4s_v4** (4 vCPU / 16 GB) costs ~$0.192/hr in westus2 as of 2026.
185+
162186
---
163187

164188
## Profile 2: FullStack — All 20 Modules (Labs 01–05)
@@ -571,12 +595,13 @@ az snapshot list --resource-group rg-it-stack-phase1 --output table
571595
| Symptom | Cause | Fix |
572596
|---------|-------|-----|
573597
| `az login` opens wrong account | Multiple accounts | `az account set --subscription <id>` |
574-
| VM creation fails with "quota exceeded" | Azure Student vCPU limits | Use a different region (`-Location westus2`) or request quota increase |
598+
| VM creation fails with "quota exceeded" | Azure Student limits to 6 vCPUs in westus2 | Script defaults to `Standard_D4s_v4` (4 vCPUs). Do NOT use D8s_v4 (8 vCPUs) on Student subs. |
575599
| SSH timeout | VM still starting | Wait 2–3 min and retry |
576600
| SSH "connection refused" | VM auto-shutdown triggered | `.\teardown-azure-lab.ps1 -StartAll` |
577601
| Docker not ready after SSH | Cloud-init still running | `journalctl -u cloud-final --no-pager -n 50` |
578602
| `ansible: command not found` on VM | Cloud-init incomplete | Wait 5 min, then `sudo apt-get install -y ansible-core` |
579603
| Lab test fails: "port 443 not open" | Traefik not running | `docker compose -f docker/docker-compose.standalone.yml up -d` |
604+
| Traefik Docker provider error: "client version 1.24 is too old" | Docker 29.x raised min API to 1.40; Traefik v3.x defaults to 1.24 | Use file provider for Lab 01 routing tests. Docker label discovery works in controlled environments (Docker ≤ 28.x or patched Traefik). |
580605
| Public IP shows `null` | Pip not yet assigned | Wait 2 min: `az network public-ip show -g <rg> -n pip-lab-single --query ipAddress -o tsv` |
581606
| Multi-VM: can't SSH to internal VMs | ~/.ssh/config not set up | See "SSH Access" section above |
582607
| Ansible ping fails for some nodes | VMs still booting | `az vm wait -g rg-it-stack-lab06 -n lab-id1 --created` |

0 commit comments

Comments
 (0)