15 · Web console and FinOps¶
Outcome: cloudseed's local web console running on your machine (loopback only, token-protected, no CDN or telemetry), where every CLI capability is a form or a button that streams its output live and lands in the audit trail; and the three FinOps views: what an environment will cost before you apply it, what the provider actually billed, and what each Kubernetes namespace costs with OpenCost, saved as one report an AI agent can analyse.
Verified live on macOS (local services, no cloud or VMs needed)
tests/scenarios/15-web-console-and-finops.sh starts a real console in a throw-away home, drives it through its API exactly like the browser does (the wizard's dry run, an estimate, the Activity list), checks the token and Origin protection and the audit trail, and runs every FinOps command. The bill and OpenCost views need a cloud account and a cluster.
| Time | Cost | Level | Needs |
|---|---|---|---|
| ~15 min | $0 | Beginner | A browser; for the bill: cloud credentials; for OpenCost: a cluster (05) |
What you'll build¶
%%{init: {"flowchart": {"nodeSpacing": 30, "rankSpacing": 38, "padding": 12}}}%%
flowchart TB
browser["Your browser<br/>http://127.0.0.1:7434/?token=..."] -- "X-CS-Token, same Origin" --> console
subgraph machine["Your machine (loopback only)"]
console["cloudseed console<br/>launchd / systemd user service"]
console -- "runs the same<br/>cloudseed commands" --> cli["cloudseed CLI"]
cli --> audit["audit trail<br/>via: ui"]
end
subgraph finops["FinOps"]
est["estimate<br/>list prices, offline"]
bill["cloud<br/>Cost Explorer /<br/>Cost Management"]
oc["k8s<br/>OpenCost<br/>by namespace"]
rep["report --save<br/>finops/latest.json"]
end
cli --> est & bill & oc --> rep
rep --> agent["cs agentic: top savings"]Before you start¶
- cloudseed installed. Nothing else for steps 1 to 5, except the real bill (
finops cloud), which needs cloud credentials. - For step 6: a cluster, for example the one from 05, to install OpenCost on.
Step 1: Start the console¶
Expected output
● Starting the cloudseed console on http://127.0.0.1:7434/...
✔ cloudseed console is up: http://127.0.0.1:7434/ (launchd; starts at login; local only, token-protected)
╭─ Open it ─────────────────────────────────────────────────────────────────────────╮
│ link http://127.0.0.1:7434/?token=<a random 32-character token> │
│ again cs ui (opens the browser; `cs ui token` prints the link) │
│ manage cs ui status | stop | restart | logs · cs disable ui │
╰───────────────────────────────────────────────────────────────────────────────────╯
The console runs as a launchd (macOS) or systemd user service that starts at login, on 127.0.0.1 only. The token comes in the link and is kept only in that browser tab (no cookie); the server checks Host and Origin and forbids framing. Port taken? cs enable ui --port 7440.
Step 2: Create an environment with the wizard¶
In the console, open Create (key 2), pick AWS, and answer the questions: they are the same questions cs setup asks, built from each cloud's definition, with the stack variable behind each field. Choose Dry run (render + terraform validate, touches nothing in the cloud) and watch the output stream into Activity. The console ran exactly this:
Every action card works the same way: status, outputs, troubleshoot, update IP, re-provision, the SSH command, and destroy (which needs an explicit tick).
Step 3: Explore the rest of the console¶
- Overview and Environments: a card per environment with its actions and chips (Kubernetes, VPN, FIPS).
- Platform: the whole catalog by group, with Plan / Install / Uninstall per group or item and UI exposure, plus kubectl, helm and nodes.
- Resilience: DR drills and backups, chaos suites with their verdict tables, and every scan (CIS, NSA / MITRE, vulnerabilities, host CIS, STIG, cloud CIS, FIPS).
- Reports: the viewer for scan, drill, chaos and FinOps reports. All actions: every CLI capability as a form.
- Agents & MCP: enable agentic mode, pick the agent and model, run tasks, install skills; deploy the MCP server and connect clients.
- Credentials: the same vault as
cs creds, values masked. Help: every help page, andexplain <name>. - Explain: the ? beside views, wizard fields, environment chips and platform items opens an Explain panel with the same page
cs explainprints (for examplecs explain vpnfor the VPN chip). - Activity: every job's live output and exit code, and ↶ Undo for the newest action. Keys
1to0switch views.
The same explanations from the terminal:
Step 4: One audit trail for every entry point¶
Jobs started in the console are recorded with "via": "ui", next to "cli", "mcp" and the agents.
Step 5: FinOps: know the cost before you apply¶
cs finops estimate aws --env web
cs finops report aws --env web --save
cs finops cloud aws --env web --days 7
estimateprices the environment from its own configuration at on-demand list prices, offline (small-volume usage-billed services such as GuardDuty and Log Analytics included).report --savecombines all three views into~/.cloudseed/envs/aws-web/finops/latest.json(plus a timestamped copy). Views that cannot run yet (no credentials, no cluster) say why instead of failing the report.cloudreads the real bill by service: AWS Cost Explorer or Azure Cost Management (GCP needs a BigQuery billing export; cloudseed tells you how).
Expected output of cs finops report aws --env web --save without credentials or a cluster
╭─ Estimate · aws-web (month, 730h at on-demand list prices) ──────────────╮
│ bastion t3.micro x1 $7.59 │
│ NAT gateway x1 $32.85 │
│ ... │
│ total / month $57.54 │
╰────────────────────────────────────────────────────────────────────────────╯
● Fetching the last 30 days from Amazon Web Services...
▲ Cloud bill unavailable: aws: ... Unable to locate credentials ...
▲ No Kubernetes cluster in aws-web. Add one: cs setup aws --env web --var enable_kubernetes=true, then
cs platform install finops
✔ Report saved: ~/.cloudseed/envs/aws-web/finops/report-20260924-191859-10a4eb.json
Step 6: Kubernetes cost allocation with OpenCost¶
On a cluster (for example the one from 05):
cs platform install finops
cs finops k8s vmware --env lab --by namespace --window 24h
cs finops k8s vmware --env lab --by controller --window 7d
cs agentic "look at my finops report and propose the top 5 savings"
finops installs OpenCost with the Prometheus stack (reused when 06 installed it) and Goldilocks. The cloudseed-finops skill knows the report format and the levers: rightsizing with Goldilocks and VPA, KEDA scale-to-zero, kube-green sleep schedules, node pool sizes, a single NAT gateway, one shared Gateway.
Step 7: Manage the console¶
cs ui opens it again (starting it if needed). token --rotate invalidates the old link at once. To run the console in a terminal instead of as a login service, stop the service and serve it in the foreground:
Ctrl-C stops the foreground console. Bring the login service back before you verify:
Use an agent, MCP or the UI¶
Follow the same numbered steps and verification/cleanup conditions through your chosen interface. Start with the interface setup and coverage guide; replace account/project/subscription and SSH placeholders before any live request.
Agent prompt: “Follow the console and FinOps walkthrough for aws-web. Inspect local estimates first, distinguish actual bills and OpenCost data that need credentials or a cluster, and show saved reports and audit history. Do not call a partial estimate a spend limit.”
MCP starter: cloudseed_finops with:
Use the matching tool for each remaining step in this page; the command-to-tool map lists the tool family. Keep aws-web selected. Preview first; add confirm:true only to the specific change you have authorized. Host bootstrap, provider login and interactive applications retain their documented human steps.
UI: Use Create for the dry-run web environment, then Environments → web and All actions → FinOps. Choose estimate/cloud/k8s/report as each numbered step indicates. Reports opens saved cost evidence; Activity shows the command, exit status and logs. Agents & MCP runs the natural-language equivalent.
Verify it worked¶
ui statusshows Enabledyes, Healthrunningand the service (launchd / systemd).- Without the token,
curl http://127.0.0.1:7434/api/stateanswers 401; a request with a foreignOriginheader answers 403. finops/holdslatest.jsonand the timestamped reports.
Clean up¶
disable ui stops the console and removes its login item; cs enable ui brings it back with the same port.
What just happened¶
- The console is a single local process (
cloudseed/webui.py+cloudseed/web/), no build step, no external requests. Each button calls the same code path as the CLI, so the console can never do something the CLI cannot. - FinOps is deterministic: estimates come from cloudseed's own price tables and your configuration, the bill from the provider's API, allocation from OpenCost; the agent only reasons over the saved report.
- Learn more: Web console · FinOps · Explain · Undo and audit · Explain index
Next steps¶
- 14 · AI agents and MCP: the Agents page from the terminal.
- 06 · A production platform: then expose every UI and cost it with OpenCost.
- 01 · Your first lab: create it from the wizard instead of the terminal.