Repository navigation
Expand file tree
/
Copy pathdeployment.html
More file actions
226 lines (212 loc) · 10.4 KB
/
Copy pathdeployment.html
File metadata and controls
226 lines (212 loc) · 10.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<!--
SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Nomos Deployment Planner</title>
<link rel="stylesheet" href="assets/interactive-docs.css">
</head>
<body>
<main class="shell">
<header class="hero">
<div>
<p class="eyebrow">Deployment planner</p>
<h1>Assemble the Compose deployment you actually want</h1>
<p class="lead">
Pick OPA mode, executor profiles, demo UI, and network exposure. The planner shows
which services run, what command to use, and what to verify afterward.
</p>
</div>
<aside class="hero-card">
<h2>Alpha defaults</h2>
<ul>
<li>Auth required</li>
<li>OPA enabled</li>
<li><code>deploy/.env</code> mode <code>600</code></li>
<li>Monitor owns the external MCP port</li>
</ul>
</aside>
</header>
<nav class="nav">
<a href="../index.md">Docs index</a>
<a href="../deployment-setup.md">Deployment setup</a>
<a href="../council-mcp-validation.md">Validation checklist</a>
<a href="getting-started.html">Getting started</a>
<a href="writ-executor.html">Executor walkthrough</a>
</nav>
<section>
<div class="section-head">
<h2>Cluster Planner</h2>
<p>The deploy script is preferred for clean hosts. Manual Compose commands remain useful for debugging.</p>
</div>
<div class="control-panel">
<div class="controls">
<div class="field">
<label for="opa">OPA mode</label>
<select id="opa">
<option value="bundled">bundled sidecar</option>
<option value="external">external OPA service</option>
</select>
</div>
<div class="field">
<label for="executor">Executor profile</label>
<select id="executor">
<option value="default">default OpenShell executor</option>
<option value="dev">Dev executor (host mounts)</option>
</select>
</div>
<div class="field">
<label for="demo">Demo UI</label>
<select id="demo">
<option value="0">disabled</option>
<option value="1">enabled</option>
</select>
</div>
<div class="field">
<label for="bind">MCP bind</label>
<select id="bind">
<option value="local">localhost testing</option>
<option value="remote">remote alpha access</option>
</select>
</div>
</div>
</div>
<div class="result-grid" style="margin-top:14px">
<div class="stage">
<h3 class="stage-title">Service topology</h3>
<p class="stage-copy" id="topology-copy"></p>
<div class="node-row" aria-hidden="true">
<div class="node active">Monitor :9901</div>
<div class="connector active"></div>
<div class="node">Council</div>
<div class="connector active"></div>
<div class="node" id="opa-node">OPA</div>
</div>
<div class="pill-row" id="services"></div>
<div class="callout" id="security-note"></div>
</div>
<aside class="result-card">
<h3>Run command</h3>
<pre class="codebox" id="run-command"></pre>
</aside>
</div>
</section>
<section>
<div class="section-head">
<h2>Verify</h2>
<p>Health checks catch most deployment problems before users hit the MCP endpoint.</p>
</div>
<div class="grid two">
<div class="result-card">
<h3>Health checks</h3>
<pre class="codebox" id="checks"></pre>
</div>
<div class="result-card">
<h3>Expected exposure</h3>
<pre class="codebox light" id="exposure"></pre>
</div>
</div>
</section>
<section>
<div class="section-head">
<h2>Service Roles</h2>
<p>Use this map when debugging logs or Compose health.</p>
</div>
<table class="matrix">
<thead><tr><th>Service</th><th>Role</th><th>External exposure</th></tr></thead>
<tbody>
<tr><td><code>monitor</code></td><td>MCP reverse proxy, dashboard, metrics, ledger browser</td><td>Host port <code>${MONITOR_PORT:-9901}</code></td></tr>
<tr><td><code>council</code></td><td>Internal NAT MCP server and council runtime</td><td>Docker network only</td></tr>
<tr><td><code>council-grpc</code></td><td>gRPC adapter forwarding to monitor/MCP</td><td>Host port <code>${COUNCIL_GRPC_PORT:-9904}</code></td></tr>
<tr><td><code>agent-signup</code></td><td>Bootstrap UI/API for Redis-backed agent accounts</td><td>Bind to <code>127.0.0.1:${AGENT_SIGNUP_PORT:-9905}</code>; never expose <code>0.0.0.0:9905</code> directly</td></tr>
<tr><td><code>opa</code></td><td>Deterministic intent policy</td><td>Host port <code>${OPA_PORT:-8181}</code> for bundled sidecar</td></tr>
<tr><td><code>executor-*</code></td><td>Trusted executor contract implementation</td><td>Default OpenShell port <code>9907</code>; legacy/dev profiles use their assigned ports</td></tr>
</tbody>
</table>
</section>
<footer>Canonical reference: <a href="../deployment-setup.md">../deployment-setup.md</a>.</footer>
</main>
<script>
const els = {
opa: document.querySelector("#opa"),
executor: document.querySelector("#executor"),
demo: document.querySelector("#demo"),
bind: document.querySelector("#bind"),
topology: document.querySelector("#topology-copy"),
services: document.querySelector("#services"),
security: document.querySelector("#security-note"),
run: document.querySelector("#run-command"),
checks: document.querySelector("#checks"),
exposure: document.querySelector("#exposure"),
opaNode: document.querySelector("#opa-node")
};
function profiles() {
if (els.executor.value === "default") return "--profile executor-openshell";
if (els.executor.value === "dev") return "--profile executor-dev";
return "--profile executor-openshell";
}
function serviceNames(useExternalOpa, withDemo) {
const services = ["redis", "council", "monitor", "council-grpc", "agent-signup"];
if (!useExternalOpa) services.push("opa");
if (els.executor.value === "default") services.push("openshell", "executor-openshell");
if (els.executor.value === "dev") services.push("executor-dev");
if (withDemo) services.push("demo");
return services;
}
function render() {
const useExternalOpa = els.opa.value === "external";
const withDemo = els.demo.value === "1";
const remote = els.bind.value === "remote";
const profileFlags = profiles();
const executorPort = els.executor.value === "dev" ? "9903" : "9907";
const signupEnv = "AGENT_SIGNUP_BIND_ADDR=127.0.0.1 NOMOS_SIGNUP_ALLOWED_ROLES=readonly,developer";
const envBits = [
"NVIDIA_API_KEY=nvapi-...",
"DEPLOY_TARGET=compose",
signupEnv,
useExternalOpa ? "WITH_OPA=0 COUNCIL_OPA_URL=https://opa.example.internal" : "WITH_OPA=1",
els.executor.value === "dev" ? "EXECUTOR_PROFILE=executor-dev EXECUTOR_UID=$(id -u) EXECUTOR_GID=$(id -g)" : "",
withDemo ? "WITH_DEMO=1" : "WITH_DEMO=0",
remote ? "NOMOS_PUBLIC_HOST=203.0.113.10 MONITOR_PORT=9901" : ""
].filter(Boolean).join(" ");
els.topology.textContent = useExternalOpa
? "Redis, council, monitor, and gRPC run locally while policy calls go to your managed OPA service."
: "Redis, bundled OPA, council, monitor, and gRPC run together in the Compose stack.";
els.opaNode.textContent = useExternalOpa ? "External OPA" : "Bundled OPA";
const serviceList = serviceNames(useExternalOpa, withDemo);
els.services.innerHTML = serviceList.map((s) => `<span class="pill blue">${s}</span>`).join("");
const exposureGuidance = remote
? "For remote alpha access, keep auth required, use firewall or reverse proxy policy around <code>MONITOR_PORT</code>, and rotate user tokens individually."
: "Compose publishes service ports by default. Set bind-address variables or use firewall rules when the host is reachable by others.";
els.security.innerHTML = `${exposureGuidance} Never expose agent-signup directly on <code>0.0.0.0:9905</code>. Keep it on <code>127.0.0.1</code>, or require a strong <code>NOMOS_SIGNUP_ADMIN_PASSWORD</code> and front-door authentication.`;
els.run.textContent = `${envBits} ./scripts/deploy_stack.sh
# Manual profile equivalent, useful while debugging:
${signupEnv} docker compose -f deploy/docker-compose.yml -f deploy/docker-compose.redis-sentinel.yml ${profileFlags} up -d --build`;
els.checks.textContent = `uv sync --extra dev
curl -fsS http://127.0.0.1:9901/healthz | python3 -m json.tool
curl -fsS http://127.0.0.1:${executorPort}/v1/health | python3 -m json.tool
uv run ./scripts/run_test_suite.py \\
--suite grpc-live \\
--suite mcp-live \\
--require-deployed
# Compose diagnostics when health fails:
docker compose -f deploy/docker-compose.yml -f deploy/docker-compose.redis-sentinel.yml ps
${useExternalOpa ? "# Verify external OPA separately with its managed health endpoint" : "docker compose -f deploy/docker-compose.yml -f deploy/docker-compose.redis-sentinel.yml exec -T opa opa test /policies"}`;
els.exposure.textContent = JSON.stringify({
monitor_mcp: remote ? "0.0.0.0:9901/mcp unless fronted by another proxy" : "127.0.0.1:9901/mcp for local calls; published on the host by default",
redis: "0.0.0.0:6379 by default; set REDIS_BIND_ADDR to restrict",
opa: useExternalOpa ? "external URL from COUNCIL_OPA_URL" : "0.0.0.0:8181 by default; set OPA_BIND_ADDR to restrict",
grpc: "0.0.0.0:9904 by default; set COUNCIL_GRPC_BIND_ADDR to restrict",
agent_signup: "127.0.0.1:9905; never expose directly on 0.0.0.0:9905",
executor: els.executor.value === "dev" ? "9903 for dev executor" : "9907 for default OpenShell"
}, null, 2);
}
[els.opa, els.executor, els.demo, els.bind].forEach((el) => el.addEventListener("input", render));
render();
</script>
</body>
</html>