Commit graph

9 commits

Author SHA1 Message Date
Mikael Hugo
0ed09d5fb5 chore: bump centralcloud_core elixir ~> 1.20
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-11 11:23:32 +02:00
Mikael Hugo
a3622f29ef feat: elixir 1.20-rc4 flake, AI ops chat (ChatLive + RouterAgent)
- flake.nix: custom elixir_1_20_rc4 derivation via overrideAttrs on
  beamPackages.elixir_1_19 with headless OTP 28; nixos-25.11 pinned
- mix.exs (ops + my): elixir ~> 1.20
- Dockerfile: note 1.19.5 stays until hexpm publishes 1.20 stable image
- New: ChatLive — full-screen AI ops chat with SSE streaming, scroll hook,
  suggestion buttons, typing indicator, clear history
- New: RouterAgent — streams OpenAI-compatible SSE from router-agent svc;
  configurable URL + API key via env; sends {:chunk,t}/:stream_done msgs to LiveView
- Router: add live /chat route under auth pipeline
- Layouts: AI Chat nav link + ScrollBottom JS hook inline
- Application: Finch pool started for RouterAgent HTTP client
- Priv/static: phoenix.min.js + phoenix_live_view.min.js bundled
- Config: ROUTER_AGENT_URL / ROUTER_AGENT_API_KEY in dev.exs + runtime.exs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-11 11:23:14 +02:00
Mikael Hugo
f84f59e0df feat: build out centralcloud_ops staff portal with Grafana OnCall backend
- Add CentralcloudCore.OnCall API client (alert groups, schedules, users,
  escalation chains) — talks to Grafana OnCall HTTP API v1
- Add centralcloud_ops application, endpoint, router, layouts
- Add RequireStaff auth plug, SessionController, HealthController
- Add DashboardLive: firing/acked alerts with ack/resolve actions, auto-refresh
- Add IncidentsLive: filterable incident list by status
- Add IncidentLive: incident detail with ack/resolve/silence actions
- Add OnCallLive: schedule cards showing who is currently on-call
- Add StakeholdersLive: HostBill client search + service view + comms panel
- Wire ONCALL_URL / ONCALL_API_TOKEN env vars in config and runtime.exs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-10 22:54:33 +02:00
Mikael Hugo
29e4f25e15 fix: runtime.exs OPS_SECRET_KEY_BASE optional, release.ex handles missing ecto_repos
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-09 20:49:09 +02:00
Mikael Hugo
9e0b43ea90 feat: add health endpoint, release config, and Dockerfile for k8s deployment
- GET /api/health — JSON probe endpoint (no auth)
- CentralcloudMy.Release — Ecto migrate/rollback for init container
- rel/overlays/bin/{server,migrate} scripts for the OTP release
- mix.exs releases: centralcloud_my targeting core + my apps
- Dockerfile: umbrella-aware multi-stage build on hexpm/elixir:1.19.5-erlang-28

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-09 20:45:22 +02:00
Mikael Hugo
97b99c3fe3 fix: use Bandit adapter via config — Phoenix boots on port 4001
- Add adapter: Bandit.PhoenixAdapter to config.exs and dev.exs
- Phoenix reads adapter from app config, not from use macro option
- Verified: Bandit 1.11.0 starts successfully on 0.0.0.0:4001

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-09 20:25:18 +02:00
Mikael Hugo
453a6deead feat: Elixir 1.20-rc4/OTP28, wire Phoenix endpoints, router, LiveViews, auth plug
- flake.nix: Elixir 1.20.0-rc.4 via pkgs.path (reproducible, no hardcoded store paths)
- RequireAuth plug (session-based, redirects to /login)
- SessionController: login form, logout, OIDC callback stub
- DashboardLive, ReplicationLive, BillingLive, SupportLive (skeleton)
- Layouts: dark UI, nav, flash messages
- All compile clean on 1.20-rc4 with zero warnings

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-09 20:20:19 +02:00
Mikael Hugo
afcbba3fc7 chore: upgrade to Elixir 1.19.5 / OTP 28, add Gleam to dev shell
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-09 20:01:38 +02:00
Mikael Hugo
009d644a15 feat: scaffold centralcloud Elixir umbrella (my. + ops. + core)
- Umbrella root with apps/centralcloud_{my,ops,core}
- centralcloud_core: HostBill Admin API client, DR Portal API client
- centralcloud_my: Phoenix LiveView app for my.centralcloud.com
- centralcloud_ops: Phoenix app for ops.centralcloud.com
- Shared config: Authentik OIDC, HostBill, DR Portal endpoints
- README with quick start and required env vars

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-09 19:49:01 +02:00