docs: add DNS og infrastruktur guide med IAP-regler og subdomene-prosedyre
This commit is contained in:
parent
a316f34c35
commit
b1e5dc2f18
125
docs/DNS-OG-INFRASTRUKTUR.md
Normal file
125
docs/DNS-OG-INFRASTRUKTUR.md
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
# DNS & INFRASTRUKTUR — Vauco OS
|
||||
**Versjon:** 2026-05-30 | **Eier:** Chris Christiansen | **Status:** Autoritativ
|
||||
|
||||
---
|
||||
|
||||
## KRITISK: Slik er infrastrukturen bygget
|
||||
|
||||
### Load Balancer — Hoved-IP
|
||||
```
|
||||
34.98.77.173 ← ALLE subdomener som skal ha IAP må peke hit (A-record)
|
||||
```
|
||||
|
||||
### Forwarding rules
|
||||
| Navn | IP | Target proxy |
|
||||
|------|-----|-------------|
|
||||
| `osvauco-agent-forwarding-rule` | `34.98.77.173` | `osvauco-agent-https-proxy` |
|
||||
| `vauco-os-https` | `34.144.224.45` | `vauco-os-https-proxy` |
|
||||
| `vauco-tui-bridge-forwarding-rule` | `34.117.108.44` | `vauco-tui-bridge-https-proxy` |
|
||||
|
||||
### URL maps
|
||||
| Navn | Backend | IAP |
|
||||
|------|---------|-----|
|
||||
| `osvauco-agent-url-map` | `osvauco-agent-iap-backend` | ✅ JA |
|
||||
| `vauco-os-urlmap` | `vauco-os-backend` | ❌ NEI |
|
||||
| `vauco-tui-bridge-url-map` | `vauco-tui-bridge-backend` | ❌ NEI |
|
||||
|
||||
---
|
||||
|
||||
## REGEL: Nytt subdomene = gjør dette
|
||||
|
||||
### Steg 1 — GCP (én gang per subdomene, kan skriptes)
|
||||
```bash
|
||||
# Legg til SSL-sertifikat for nytt subdomene
|
||||
gcloud compute ssl-certificates create NAVN-cert \
|
||||
--domains=subdomene.vauco.no \
|
||||
--project=propane-will-491900-m5
|
||||
|
||||
# Oppdater target proxy til å inkludere nytt sertifikat
|
||||
gcloud compute target-https-proxies update osvauco-agent-https-proxy \
|
||||
--ssl-certificates=osvauco-agent-ssl-cert,NAVN-cert \
|
||||
--project=propane-will-491900-m5
|
||||
|
||||
# Legg til url-map regel for nytt subdomene (om nødvendig)
|
||||
```
|
||||
|
||||
### Steg 2 — DNS hos Proisp (manuelt, én gang)
|
||||
```
|
||||
Type: A
|
||||
Navn: subdomene.vauco.no
|
||||
Verdi: 34.98.77.173
|
||||
TTL: 300
|
||||
```
|
||||
|
||||
> ⚠️ ALDRI bruk CNAME til ghs.googlehosted.com for IAP-beskyttede tjenester.
|
||||
> CNAME til ghs = Cloud Run domain mapping = bypasser Load Balancer = ingen IAP.
|
||||
|
||||
---
|
||||
|
||||
## DAGENS SUBDOMENER — Status
|
||||
|
||||
| Subdomene | DNS type | Peker til | IAP | Status |
|
||||
|-----------|----------|-----------|-----|--------|
|
||||
| `opax.vauco.no` | A | `34.98.77.173` | ✅ | ✅ Fikset 2026-05-30 |
|
||||
| `costguard.oss.vauco.no` | A | `34.98.77.173` | ✅ | ✅ Fungerer |
|
||||
| `oss.vauco.no` | - | - | - | 🔮 Fase C |
|
||||
| `os.vauco.no` | - | - | - | 🔮 Fase C |
|
||||
| `threadstone.vauco.no` | CNAME | GitHub Pages | ❌ (ikke nødvendig) | ✅ |
|
||||
| `app.threadstone.vauco.no` | CNAME | GitHub Pages | ❌ (ikke nødvendig) | ✅ |
|
||||
|
||||
---
|
||||
|
||||
## OAUTH / IAP — Konfigurasjon
|
||||
|
||||
| Parameter | Verdi |
|
||||
|-----------|-------|
|
||||
| OAuth brand | `projects/357036551735/brands/357036551735` |
|
||||
| Publishing status | **Testing** (ikke publiser til Production) |
|
||||
| User type | **External** |
|
||||
| Test-brukere | `chris.christiansen@vauco.no` |
|
||||
| IAP IAM | `chris.christiansen@vauco.no` → `roles/iap.httpsResourceAccessor` |
|
||||
|
||||
> Testing-status med External er korrekt og trygt for intern bruk.
|
||||
> Maks 100 test-brukere — mer enn nok for Vauco OS.
|
||||
|
||||
---
|
||||
|
||||
## GCP PROSJEKT
|
||||
|
||||
| Parameter | Verdi |
|
||||
|-----------|-------|
|
||||
| Project ID | `propane-will-491900-m5` |
|
||||
| Project number | `357036551735` |
|
||||
| Region (hoved) | `us-central1` |
|
||||
| Cloud Run service | `osvauco-agent` |
|
||||
| Cloud Run URL | `https://osvauco-agent-357036551735.us-central1.run.app` |
|
||||
|
||||
---
|
||||
|
||||
## FREMTIDIG: Flytt DNS til Google Cloud DNS
|
||||
|
||||
Når tid tillater — flytt `vauco.no` nameservere til Google Cloud DNS.
|
||||
Da kan alle DNS-endringer gjøres med `gcloud`-kommandoer.
|
||||
|
||||
```bash
|
||||
# Opprett zone
|
||||
gcloud dns managed-zones create vauco-no \
|
||||
--dns-name=vauco.no. \
|
||||
--description="Vauco DNS zone" \
|
||||
--project=propane-will-491900-m5
|
||||
|
||||
# Nytt subdomene = én kommando
|
||||
gcloud dns record-sets create subdomene.vauco.no. \
|
||||
--zone=vauco-no \
|
||||
--type=A \
|
||||
--ttl=300 \
|
||||
--rrdatas=34.98.77.173 \
|
||||
--project=propane-will-491900-m5
|
||||
```
|
||||
|
||||
**Prosessen:** Hent NS-records fra GCP → lim inn hos Proisp → propagering 24-48t.
|
||||
**Trigger:** Gjør dette etter CG3 er live og første kunde er onboardet.
|
||||
|
||||
---
|
||||
|
||||
*Opprettet: 2026-05-30 | OSVauco | propane-will-491900-m5*
|
||||
Loading…
Reference in New Issue
Block a user