Repository navigation
Expand file tree
/
Copy pathgetting-started.html
More file actions
277 lines (261 loc) · 13.5 KB
/
Copy pathgetting-started.html
File metadata and controls
277 lines (261 loc) · 13.5 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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<!--
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 Getting Started Walkthrough</title>
<link rel="stylesheet" href="assets/interactive-docs.css">
</head>
<body>
<main class="shell">
<header class="hero">
<div>
<p class="eyebrow">Interactive setup</p>
<h1>Bring up a council from a clean checkout</h1>
<p class="lead">
A guided path through environment setup, Docker deployment, agent account creation,
health checks, and the first end-to-end council request.
</p>
</div>
<aside class="hero-card">
<h2>Target running stack</h2>
<ul>
<li>Monitor and MCP endpoint at <code>http://127.0.0.1:9901/mcp</code></li>
<li>gRPC proxy on <code>127.0.0.1:9904</code></li>
<li>OPA enabled by default; Compose publishes <code>8181</code>, Kind keeps it in-cluster</li>
<li>Default OpenShell executor on <code>http://127.0.0.1:9907</code></li>
</ul>
</aside>
</header>
<nav class="nav" aria-label="Related docs">
<a href="../index.md">Docs index</a>
<a href="../getting-started.md">Getting started</a>
<a href="deployment.html">Deployment guide</a>
<a href="workflow.html">Runtime workflow</a>
</nav>
<section id="guide">
<div class="section-head">
<h2>Setup Path</h2>
<p>Pick the deployment flavor, then step through the generated commands and expected checks.</p>
</div>
<div class="control-panel">
<div class="controls">
<div class="field">
<label for="mode">Install path</label>
<select id="mode">
<option value="kind">Kind bootstrap</option>
<option value="compose">Compose bootstrap</option>
<option value="manual">Manual Docker Compose</option>
</select>
</div>
<div class="field">
<label for="demo">Demo UI</label>
<select id="demo">
<option value="0">Skip demo</option>
<option value="1">Include demo</option>
</select>
</div>
<div class="field">
<label for="agent">First agent id</label>
<input id="agent" value="agent-developer">
</div>
<div class="field">
<label for="role">Role</label>
<select id="role">
<option value="developer">developer</option>
<option value="readonly">readonly</option>
<option value="admin">admin</option>
</select>
</div>
<button class="button primary" type="button" id="next">Next Step</button>
<button class="button" type="button" id="reset">Reset</button>
</div>
</div>
<div class="result-grid" style="margin-top:14px">
<div class="stage">
<h3 class="stage-title" id="stage-title">Prerequisites</h3>
<p class="stage-copy" id="stage-copy">Confirm the selected target's tools, Git, and an NVIDIA API key are available.</p>
<div class="node-row" aria-hidden="true">
<div class="node active" id="node-a">Host</div>
<div class="connector active"></div>
<div class="node" id="node-b">Env</div>
<div class="connector"></div>
<div class="node" id="node-c">Council</div>
</div>
<div class="callout" id="stage-tip">Use the deploy script on new systems; it creates <code>deploy/.env</code>, enforces mode <code>600</code>, starts the selected target, and creates the first agent.</div>
</div>
<aside>
<div class="rail" id="steps"></div>
</aside>
</div>
<div class="result-grid" style="margin-top:14px">
<div class="result-card">
<h3>Command for this step</h3>
<pre class="codebox" id="command"></pre>
</div>
<div class="result-card">
<h3>Expected signal</h3>
<p id="expected"></p>
<div class="pill-row" id="pills"></div>
</div>
</div>
</section>
<section id="troubleshooting">
<div class="section-head">
<h2>Fast Troubleshooting</h2>
<p>Most first-run problems are environment, permissions, or missing credentials.</p>
</div>
<div class="grid three">
<div class="panel">
<h3>Council unhealthy</h3>
<p>Check <code>docker compose -f deploy/docker-compose.yml logs --tail=200 council</code>. Missing config readability and missing API keys are the most common causes.</p>
</div>
<div class="panel">
<h3>Executor rejects writ</h3>
<p>The executor has its own policy. Verify working directory, allowed tools, denied paths, nonce state, and the <code>X-Agent-ID</code> header.</p>
</div>
<div class="panel">
<h3>OPA denies request</h3>
<p>The default profile requires absolute executable paths. Use <code>/usr/bin/git</code> rather than <code>git</code>, unless a specialized council explicitly relaxes that policy.</p>
</div>
</div>
</section>
<footer>
Canonical quickstart: <a href="../getting-started.md">Getting started</a>.
</footer>
</main>
<script>
const steps = [
{
title: "Prerequisites",
copy: "Confirm the tools for your selected target and keep the NVIDIA API key out of git.",
command: (s) => s.mode === "kind"
? "docker --version\nkind --version\nkubectl version --client=true\nhelm version\n# Keep your NVIDIA API key ready as NVIDIA_API_KEY=nvapi-..."
: "docker compose version\n# Keep your NVIDIA API key ready as NVIDIA_API_KEY=nvapi-...",
expected: "The selected toolchain reports versions. The API key is provided through the shell or deploy/.env, not committed.",
pills: [["Docker", "blue"], ["NVIDIA_API_KEY", "warn"], ["no secrets committed", "good"]],
nodes: ["Host", "Env", "Council"]
},
{
title: "Clone and enter the repo",
copy: "Pull the repository onto the target machine and run commands from the checkout root.",
command: () => "git clone <repo-url> Nomos\ncd Nomos",
expected: "The checkout contains docs, deploy, configs, scripts, nomos, and executors/docker.",
pills: [["clean system", "blue"], ["repo root", "good"]],
nodes: ["Git", "Checkout", "Repo root"]
},
{
title: "Configure local environment",
copy: "The deploy script can create deploy/.env for you. Manual installs should copy the example and set required values.",
command: (s) => {
if (s.mode === "kind") {
return `NVIDIA_API_KEY=nvapi-... AGENT_ID=${s.agent} AGENT_ROLE=${s.role} ./scripts/deploy_stack.sh`;
}
if (s.mode === "compose") {
return `NVIDIA_API_KEY=nvapi-... DEPLOY_TARGET=compose AGENT_ID=${s.agent} AGENT_ROLE=${s.role} WITH_DEMO=${s.demo} ./scripts/deploy_stack.sh`;
}
return "cp deploy/.env.example deploy/.env\nchmod 600 deploy/.env\n# Edit deploy/.env and set NVIDIA_API_KEY plus REDIS_PASSWORD";
},
expected: "deploy/.env exists and is readable only by the owner. The script generates missing local secrets and stores a new agent token when one is minted.",
pills: [["chmod 600", "good"], ["OPA enabled", "good"], ["auth required", "good"]],
nodes: ["Env file", "Secrets", "Deploy"]
},
{
title: "Start the council tier",
copy: "Start Redis, OPA, the internal council MCP server, the monitor proxy, and gRPC proxy.",
command: (s) => s.mode !== "manual"
? "# Already handled by deploy_stack.sh\ncurl -s http://127.0.0.1:9901/healthz | python3 -m json.tool"
: "docker compose -f deploy/docker-compose.yml \\\n -f deploy/docker-compose.redis-sentinel.yml \\\n up -d redis redis-1 redis-2 redis-sentinel-1 redis-sentinel-2 redis-sentinel-3 opa council monitor council-grpc\ncurl -s http://127.0.0.1:9901/healthz | python3 -m json.tool",
expected: "Monitor health returns monitor.ok=true and upstream.ok=true.",
pills: [["Redis", "blue"], ["OPA", "blue"], ["Monitor", "blue"], ["Council", "blue"]],
nodes: ["Deploy", "Monitor", "Council"]
},
{
title: "Start the default OpenShell executor",
copy: "Bring up the isolated OpenShell-backed executor so approved writs can actually run.",
command: (s) => s.mode !== "manual"
? "# Already handled by deploy_stack.sh unless EXECUTOR_PROFILE is empty\ncurl -s http://127.0.0.1:9907/v1/health | python3 -m json.tool"
: "docker compose -f deploy/docker-compose.yml \\\n -f deploy/docker-compose.redis-sentinel.yml \\\n --profile executor-openshell up -d --build\ncurl -s http://127.0.0.1:9907/v1/health | python3 -m json.tool",
expected: "Executor health reports status=ok, contract_version=v1, and a council key fingerprint.",
pills: [["contract v1", "good"], ["public key", "blue"], ["local policy", "warn"]],
nodes: ["Council key", "Executor", "Health"]
},
{
title: "Create or confirm the first agent",
copy: "Create a named account and save the raw token. Redis stores only the token hash.",
command: (s) => s.mode !== "manual"
? "# Already handled by deploy_stack.sh unless SKIP_ACCOUNT=1\n# New tokens are stored as NOMOS_AGENT_ID and NOMOS_AUTH_TOKEN in deploy/.env"
: `./scripts/agent_accounts.sh create ${s.agent} --role ${s.role}\n# Save the printed token; it cannot be recovered from Redis later`,
expected: "A new account prints or stores a raw token once. Existing accounts are not rotated unless requested.",
pills: [["token hash stored", "good"], ["default membership", "good"], ["save token", "warn"]],
nodes: ["Account CLI", "Redis", "Agent token"]
},
{
title: "Run smoke checks",
copy: "Verify the external MCP path and gRPC proxy before handing the system to users.",
command: () => "uv sync --extra dev\ncurl -fsS http://127.0.0.1:9901/healthz | python3 -m json.tool\ncurl -fsS http://127.0.0.1:9907/v1/health | python3 -m json.tool\nuv run ./scripts/run_test_suite.py \\\n --suite grpc-live \\\n --suite mcp-live \\\n --require-deployed",
expected: "Monitor health is green, executor health has a key fingerprint, and the deployed MCP/gRPC contract checks pass.",
pills: [["healthz", "good"], ["executor", "good"], ["MCP live", "blue"], ["gRPC smoke", "blue"]],
nodes: ["Health", "Smoke", "Tests"]
}
];
const state = { index: 0 };
const els = {
mode: document.querySelector("#mode"),
demo: document.querySelector("#demo"),
agent: document.querySelector("#agent"),
role: document.querySelector("#role"),
steps: document.querySelector("#steps"),
title: document.querySelector("#stage-title"),
copy: document.querySelector("#stage-copy"),
command: document.querySelector("#command"),
expected: document.querySelector("#expected"),
pills: document.querySelector("#pills"),
tip: document.querySelector("#stage-tip"),
nodes: [document.querySelector("#node-a"), document.querySelector("#node-b"), document.querySelector("#node-c")]
};
function settings() {
return { mode: els.mode.value, demo: els.demo.value, agent: els.agent.value || "agent-developer", role: els.role.value };
}
function renderRail() {
els.steps.innerHTML = "";
steps.forEach((step, idx) => {
const button = document.createElement("button");
button.className = `rail-item ${idx === state.index ? "active" : ""} ${idx < state.index ? "done" : ""}`;
button.type = "button";
button.innerHTML = `<span class="rail-num">${String(idx + 1).padStart(2, "0")}</span><span><strong>${step.title}</strong><span>${step.nodes.join(" -> ")}</span></span>`;
button.addEventListener("click", () => { state.index = idx; render(); });
els.steps.appendChild(button);
});
}
function render() {
const step = steps[state.index];
const cfg = settings();
els.title.textContent = step.title;
els.copy.textContent = step.copy;
els.command.textContent = step.command(cfg);
els.expected.textContent = step.expected;
els.tip.innerHTML = state.index === 2
? "For alpha access, keep <code>require_auth</code> true and OPA enabled. The bootstrap path enforces <code>chmod 600</code> on <code>deploy/.env</code>."
: "The command block is intentionally copy-ready, but treat placeholders like <code>nvapi-...</code> and <code><repo-url></code> as local inputs.";
els.nodes.forEach((node, idx) => {
node.textContent = step.nodes[idx];
node.classList.toggle("active", idx === 1);
});
els.pills.innerHTML = step.pills.map(([text, kind]) => `<span class="pill ${kind}">${text}</span>`).join("");
renderRail();
}
document.querySelector("#next").addEventListener("click", () => {
state.index = Math.min(state.index + 1, steps.length - 1);
render();
});
document.querySelector("#reset").addEventListener("click", () => { state.index = 0; render(); });
[els.mode, els.demo, els.agent, els.role].forEach((el) => el.addEventListener("input", render));
render();
</script>
</body>
</html>