Commit Graph
27 Commits
Author SHA1 Message Date
Shard e150e9a485 fix(admin-auth): use dedicated Keycloak secret key for sor-admin 2026-04-30 23:32:43 +00:00
Shard 54428a87df fix(website): explicitly inject Keycloak env from secret 2026-04-26 18:36:59 +00:00
d2a4639007 feat(website): add k8s deployment, service, ingress rules and CI for SOR.Website
- deployment-website.yaml + service-website.yaml: new ClusterIP deployment
  for sor-website image; injects only the three secrets it needs (Postgres,
  Redis, Cdn__PublicBaseUrl) — no NATS or ENABLED_SERVICES
- ingress.yaml: add TLS + rules for aeternalisgames.com and www.aeternalisgames.com
  pointing to sor-website service
- appsettings.json: remove localhost ConnectionStrings (dev defaults already
  live in appsettings.Development.json; prod values come from k8s secrets)
- build-push.yml: build and push sor-website image from Dockerfile.website
- build-push-client.yml: add paths filter so Godot export only runs on
  Client/** changes; add --network host to docker build

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-04-23 06:30:13 -04:00
Shard 4ead96be0c Adjust website deployment image, service port 443, and GoDaddy issuer 2026-04-23 01:47:02 +00:00
Shard afd595fcc8 Add SOR website deployment/service and ingress; align Argo revision 2026-04-23 00:13:06 +00:00
Shard 08ef638950 Add Argo website info and ingress OIDC header buffer tuning 2026-04-22 20:27:52 +00:00
3b711c8792 fix: AI pod ENABLED_SERVICES must include game to register AI handlers
The sor-ai deployment ran with ENABLED_SERVICES=ai, but AddAiService is
guarded by IsEnabled("game") in Program.cs. The AI handlers (GameAddAiHandler
etc.) were never registered, so game.ai.add fell through to NATS remote
dispatch, which timed out with "No internal service is available".

Fix: set ENABLED_SERVICES=game,ai so the AI pod registers AddGameService
(providing GameDbContext, IdentityDbContext, CollectionDbContext, CatalogDbContext
and all game message handlers) before AddAiService adds the AI-specific handlers
and session manager on top.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-04-12 22:14:49 -04:00
Shard bbe99d0685 deploy: add sor-ai deployment manifest 2026-04-12 19:42:41 +00:00
Shard 2ec14ebbe2 fix(admin): inject Keycloak client secret into sor-admin deployment 2026-04-04 13:51:51 +00:00
dingo 0d1a123a12 k8s: add sor-support deployment (ENABLED_SERVICES=support) 2026-03-07 03:20:33 +00:00
dingo 551610a8ee CDN Browser changes 2026-03-03 11:49:45 -05:00
dingo a3bcc71082 Client changes, admin portal, collection fixes. 2026-03-02 10:49:49 -05:00
dingo ad611ee4ca ops(argocd): enforce sync waves (nats first) and add redeploy stamp annotation 2026-03-02 03:52:17 +00:00
775cf65899 Fix NATS max_payload — use config file instead of invalid CLI flag
-max_payload is not a valid NATS CLI flag; it must be set in a config file.

- Add deploy/k8s/configmap-nats.yaml with nats.conf (jetstream, http_port,
  max_payload=8 MB).
- Update deployment-nats.yaml to mount the ConfigMap at /etc/nats and
  start NATS with -c /etc/nats/nats.conf instead of individual CLI flags.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-28 20:09:59 -05:00
2ed7ad2ba9 Fix WebSocket 1009 — increase Godot receive buffer and NATS max payload
Godot's WebSocketPeer.inbound_buffer_size defaults to 65535 bytes (64 KB).
content.sync.ack for a full card catalog (200 cards with assets and animation
bindings) exceeds this, causing Godot to close the connection with code 1009
"Message too big" every time content.sync is called.

- Network.gd: set inbound_buffer_size = 4 MB before connect_to_url so the
  client can receive large sync responses without dropping the connection.
- deployment-nats.yaml: raise NATS max_payload from 1 MB to 8 MB (-max_payload
  8388608) so the content service can reply with large card batches through NATS
  without hitting a publish-too-large error as the card catalog grows.

Note: NATS pod needs a rollout restart to apply the new max_payload arg:
  kubectl rollout restart deployment/nats -n stone-server

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-28 20:03:10 -05:00
502f1c16f6 Fix content.sync cartesian explosion and gateway timeout
- Add .AsSplitQuery() to ContentSyncHandler to prevent the cartesian
  product join caused by two collection .Include()s (Assets + AnimationBindings).
  EF was executing a single JOIN that multiplied result rows per card,
  causing replies to arrive 10+ seconds late and gateway timeouts.
- Bump Gateway__RemoteDispatchTimeoutMs from 10000 → 15000ms in configmap
  to give worker pods headroom on cold starts (EF model compilation +
  first DB query can take 3-5 seconds on a fresh pod).

NOTE: restart gateway pods after deploying to pick up the new timeout value:
  kubectl rollout restart deployment/sor-gateway -n stone-server

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-28 19:05:32 -05:00
dingo 7150afa42e NATS fighting 2026-02-28 18:02:24 -05:00
dingo e18cdc6b80 K8s changes for NATS 2026-02-28 16:31:01 -05:00
dingo 13402c8551 Split auth gRPC onto internal listener 2026-02-28 10:38:18 -05:00
dingo 0383dd431b Add Godot web client build pipeline, image packaging, and Argo webclient deployment manifests 2026-02-28 02:47:41 +00:00
4440c6c981 Split sor-host into dedicated gateway and workers deployments
Before: 3 pods ran ENABLED_SERVICES=all — gateway, auth, and every
business-logic service co-hosted. This defeated the purpose of the
gateway pattern and prevented independent scaling.

After:
  sor-gateway (2 replicas) — ENABLED_SERVICES=gateway,auth
    • WebSocket edge, accepts client connections
    • Auth co-located (JWT validation is a localhost gRPC call, no network hop)
    • Lighter resource footprint: 150m/128Mi request, 500m/512Mi limit
    • Ingress at hub.aeternalisgames.com → sor-gateway:80

  sor-workers (3 replicas) — ENABLED_SERVICES=chat,collection,bazaar,
                               content,versioning,matchmaking,game
    • Subscribes to NATS, handles all business-logic messages
    • Holds DB connection pools for all schemas
    • Internal only — no ingress
    • Heavier resources: 300m/384Mi request, 1000m/1Gi limit

configmap.yaml: removed ENABLED_SERVICES=all and Services__Auth (each
  deployment now sets these directly in its own env block)

ingress.yaml: hub.aeternalisgames.com backend sor-host → sor-gateway

ArgoCD prune=true will delete the old sor-host Deployment + Service
from the cluster on next sync.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-27 14:44:08 -05:00
9186a2a7f3 Hide sidebar until authenticated; wire Admin seed credentials
- MainLayout.razor: wrap shell in <AuthorizeView> so the sidebar and
  nav are only rendered when the user is logged in. Unauthenticated
  pages (login) render @Body directly, giving the login card its full
  viewport without the nav overlay.
- deployment-admin.yaml: inject Admin__Email / Admin__Password from
  sor-app-secrets so the startup seed picks up production credentials.
- sor-app-secrets.yaml.template: add Admin__Email / Admin__Password
  placeholder entries with instructions.
- secrets/README.md: document the two new seed-account keys.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-27 09:47:20 -05:00
dingo 0fd4592b6d k8s: move admin ingress host to control.aeternalisgames.com 2026-02-27 14:39:27 +00:00
fe5cd2d424 Add EF design-time factories; fix Game migration; document DB ops
- DesignTimeFactories.cs: adds IDesignTimeDbContextFactory<T> for all
  6 contexts so dotnet-ef tools work without starting the full ASP.NET
  host (previously failed because Redis/NATS aren't available locally)
- SOR.Host.csproj: adds Microsoft.EntityFrameworkCore.Design (PrivateAssets=all)
  as the EF design-time host still requires it in the startup project
- Game/AddGameRulesAndCustomLobby: emptied Up/Down — migration was generated
  with a stale snapshot duplicating InitialCreate tables; actual GameRuleSet
  and CustomLobby schema is in AddBoardDimensions
- deploy/database-migrations.md: documents how to apply/add migrations
  against any environment; records pg-forge-01 state as of 2026-02-27

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-27 09:32:30 -05:00
b6ac58bada Switch CDN to S3-compatible Ceph RadosGW (AWSSDK.S3)
Replace custom HttpCdnClient (proprietary upload API) with S3CdnClient
backed by AWSSDK.S3 using ForcePathStyle for Ceph RadosGW compatibility.
CdnOptions gains EndpointUrl/AccessKey/SecretKey/BucketName; removes
UploadBaseUrl/ApiKey. K8s deployments and secrets template updated to
match new config keys.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-27 00:57:15 -05:00
b442ed3d9c ci: switch registry to registry.aeternalisgames.com, rename host image sor-server
- REGISTRY: harbor.aeternalisgames.com → registry.aeternalisgames.com
- Host image: sor-host → sor-server (sor-admin unchanged)
- Remove stale TODO comments from k8s manifests
- Update harbor-pull-secret template with new registry hostname
- Update gameplay-effects-gap.md and gameplay-todo.md to reflect
  completed implementation work

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-26 23:12:13 -05:00
b5c9385e73 Add CI/CD pipeline, Dockerfiles, and k8s/ArgoCD manifests
- Gitea Actions workflow: build sor-host + sor-admin, push to Harbor,
  auto-update image tags in k8s manifests (GitOps — ArgoCD watches deploy/k8s/)
- Dockerfile.host / Dockerfile.admin: multi-stage .NET 8 builds, non-root runtime
- deploy/k8s/: configmap, deployments, services, nginx ingress
  - hub.aeternalisgames.com → sor-host (WebSocket gateway)
  - admin.aeternalisgames.com → sor-admin (Blazor admin portal)
  - hub-tls for hub, cert-manager auto-provisions admin-tls
- deploy/secrets/: README + *.yaml.template files to populate (gitignored)
- deploy/argo/application.yaml: ArgoCD Application (namespace stone-server)
- Root .gitignore: excludes deploy/secrets/*.yaml (never commit populated secrets)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-25 21:33:54 -05:00