@norskvideo/ctl-dev-kit 0.2.77 → 0.2.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/create-product/turnkey.ts +122 -3
- package/package.json +1 -1
|
@@ -328,7 +328,7 @@ function rootPackageJson(ctx: ShapeContext): string {
|
|
|
328
328
|
"check:drift": "bun run node_modules/@norskvideo/ctl-dev-kit/conventions/check-drift.ts",
|
|
329
329
|
"docs:check":
|
|
330
330
|
"bun run node_modules/@norskvideo/ctl-dev-kit/docs/path-existence.ts && bun run node_modules/@norskvideo/ctl-dev-kit/docs/light-pages.ts && bun run node_modules/@norskvideo/ctl-dev-kit/docs/journeys.ts",
|
|
331
|
-
"docs:manual": `bun run node_modules/@norskvideo/ctl-dev-kit/doc-guide/prose-bundle.js --brand "${ctx.name}" --title "${ctx.name} — Documentation" --link "norsk.video=https://norsk.video/" --out docs/generated/bundle docs/handover.md docs/operating.md docs/known-limitations.md`,
|
|
331
|
+
"docs:manual": `bun run node_modules/@norskvideo/ctl-dev-kit/doc-guide/prose-bundle.js --brand "${ctx.name}" --title "${ctx.name} — Documentation" --link "norsk.video=https://norsk.video/" --out docs/generated/bundle docs/handover.md docs/administering.md docs/operating.md docs/known-limitations.md`,
|
|
332
332
|
"docs:handover": "bash scripts/docs-handover.sh",
|
|
333
333
|
"docs:handover:check": "bash scripts/docs-handover.sh --check",
|
|
334
334
|
// The docs SITE (website/) — a standalone package, so its install is its
|
|
@@ -2044,7 +2044,8 @@ norsk-ctl and the pinned Norsk SDK:
|
|
|
2044
2044
|
Two channels, deliberately:
|
|
2045
2045
|
|
|
2046
2046
|
- **The bundle the image serves.** \`bun run docs:manual\` builds it from
|
|
2047
|
-
\`docs/handover.md\`, \`docs/
|
|
2047
|
+
\`docs/handover.md\`, \`docs/administering.md\`, \`docs/operating.md\` and
|
|
2048
|
+
\`docs/known-limitations.md\`;
|
|
2048
2049
|
the image build runs
|
|
2049
2050
|
it, so every image serves them at /docs at the version that is running
|
|
2050
2051
|
(linked from the product's page in norsk-ctl). \`bun run docs:handover\`
|
|
@@ -2070,6 +2071,7 @@ served at /docs at the version that is running.
|
|
|
2070
2071
|
| Document | Audience | What it is |
|
|
2071
2072
|
| ---------------------------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
2072
2073
|
| \`docs/handover.md\` | whoever gets this product running | How norsk-ctl arrives, the one command that adds this product, and the bundle route for platform teams |
|
|
2074
|
+
| \`docs/administering.md\` | the server's administrator | What runs on the server and where, how to reach it, update it, back it up and remove it |
|
|
2073
2075
|
| \`docs/operating.md\` | operators | What a running deployment looks like from the operator's chair: the controls, the checks, the signs |
|
|
2074
2076
|
| \`docs/known-limitations.md\` | operators | What the product does not do yet, with the consequence and the workaround |
|
|
2075
2077
|
|
|
@@ -2113,7 +2115,7 @@ the Administrator's hat._
|
|
|
2113
2115
|
| Evaluator | \`/docs/\` | \`/docs/guides/\` | [norsk-ctl's manual](https://ctl.norsk.video/), to run it for real |
|
|
2114
2116
|
| Builder | \`/docs/guides/\` | \`/docs/how-to/\` | \`/docs/reference/\`, for the settings they just used |
|
|
2115
2117
|
| Integrator | \`/docs/reference/\` | \`/docs/concepts/\` | [norsk-ctl's CLI and API reference](https://ctl.norsk.video/) |
|
|
2116
|
-
| Administrator | \`handover.md\` | \`operating.md\`, \`known-limitations.md\` | [norsk-ctl's manual](https://ctl.norsk.video/), for everything about the machine |
|
|
2118
|
+
| Administrator | \`handover.md\` | \`administering.md\`, \`operating.md\`, \`known-limitations.md\` | [norsk-ctl's manual](https://ctl.norsk.video/), for everything about the machine |
|
|
2117
2119
|
|
|
2118
2120
|
Site paths resolve under website/src/content/docs; a bare name resolves under
|
|
2119
2121
|
docs/. Each route is at most five pages and ends in a hand-off, which is the
|
|
@@ -2218,6 +2220,122 @@ and its health check at /healthz are for._
|
|
|
2218
2220
|
`;
|
|
2219
2221
|
}
|
|
2220
2222
|
|
|
2223
|
+
// The server admin's page: the product running under norsk-ctl on the
|
|
2224
|
+
// customer's own machine (gameplay-football247's dev-ops guide, generalised).
|
|
2225
|
+
// norsk-ctl's server install is the same everywhere, so its half is written
|
|
2226
|
+
// out; the product's half carries a marker per section.
|
|
2227
|
+
function administeringMd(ctx: ShapeContext): string {
|
|
2228
|
+
return `# Administering ${ctx.name}
|
|
2229
|
+
|
|
2230
|
+
For whoever looks after the server ${ctx.name} runs on: what is installed
|
|
2231
|
+
where, how to reach it, how to update it, and how to remove it. Getting it
|
|
2232
|
+
running the first time is in handover.md; running the product day to day is in
|
|
2233
|
+
operating.md.
|
|
2234
|
+
|
|
2235
|
+
## What runs on the server
|
|
2236
|
+
|
|
2237
|
+
${ctx.name} runs under **norsk-ctl**, Norsk's service manager.
|
|
2238
|
+
|
|
2239
|
+
| Process / container | What it is |
|
|
2240
|
+
|---|---|
|
|
2241
|
+
| \`norsk-ctl\` (systemd service) | The manager: launches and supervises ${ctx.name}, serves its API |
|
|
2242
|
+
| \`norsk-proxy\`, \`norsk-proxy-oauth2\` | The HTTPS entry point and its login |
|
|
2243
|
+
| \`norsk-product-${ctx.name}\` | The product's control plane |
|
|
2244
|
+
| \`<instance>-<service>-1\` | One per service of a launched instance |
|
|
2245
|
+
|
|
2246
|
+
<!-- ctl-docs-template: fill me -->
|
|
2247
|
+
_Name this product's instance containers and say what each one does (the
|
|
2248
|
+
starter's are Studio, the workflow and its dashboard, and the media engine)._
|
|
2249
|
+
|
|
2250
|
+
## Where things are
|
|
2251
|
+
|
|
2252
|
+
| Path | Contents |
|
|
2253
|
+
|---|---|
|
|
2254
|
+
| \`/etc/norsk-ctl/\` | norsk-ctl's configuration (\`config.yaml\`), licences, TLS certificate |
|
|
2255
|
+
| \`/var/lib/norsk-ctl/\` | norsk-ctl's state: database, product registry, templates, proxy |
|
|
2256
|
+
| \`/var/log/norsk-ctl/\` | norsk-ctl's logs |
|
|
2257
|
+
| \`/opt/norsk-ctl/bin/\` | norsk-ctl binaries, one per version; \`/usr/local/bin/norsk-ctl\` points at the current one |
|
|
2258
|
+
| \`/etc/systemd/system/norsk-ctl.service\` | The service unit |
|
|
2259
|
+
| \`/etc/sysctl.d/90-norsk-tuning.conf\` | Network buffer tuning for media |
|
|
2260
|
+
<!-- path-allow -->
|
|
2261
|
+
|
|
2262
|
+
<!-- ctl-docs-template: fill me -->
|
|
2263
|
+
_Add the instance's working directory (uploaded media, settings) and anything
|
|
2264
|
+
else this product keeps on disk._
|
|
2265
|
+
|
|
2266
|
+
norsk-ctl runs as the user \`norsk\`. Run its CLI as that user, with its
|
|
2267
|
+
configuration:
|
|
2268
|
+
|
|
2269
|
+
\`\`\`sh
|
|
2270
|
+
sudo -u norsk env NORSK_CTL_CONFIG_DIR=/etc/norsk-ctl NORSK_CTL_STATE_DIR=/var/lib/norsk-ctl \\
|
|
2271
|
+
NORSK_CTL_LOG_DIR=/var/log/norsk-ctl norsk-ctl instance list
|
|
2272
|
+
\`\`\`
|
|
2273
|
+
|
|
2274
|
+
## Network
|
|
2275
|
+
|
|
2276
|
+
<!-- ctl-docs-template: fill me -->
|
|
2277
|
+
| Port | Open to | What |
|
|
2278
|
+
|---|---|---|
|
|
2279
|
+
| 22/tcp | administrators | SSH |
|
|
2280
|
+
| _443/tcp_ | _operators_ | _The web page (or loopback only: see below)_ |
|
|
2281
|
+
| _the product's inputs and outputs_ | _the senders and receivers_ | _one row per media port_ |
|
|
2282
|
+
|
|
2283
|
+
## Reaching the web page
|
|
2284
|
+
|
|
2285
|
+
The web page is norsk-ctl's proxy. On a server that must not expose it, bind it
|
|
2286
|
+
to loopback (norsk-ctl's \`bindAddress\` setting) and reach it through an SSH
|
|
2287
|
+
tunnel:
|
|
2288
|
+
|
|
2289
|
+
\`\`\`sh
|
|
2290
|
+
ssh -L 8443:127.0.0.1:443 <you>@<server> # 443: the proxy's port, if unchanged
|
|
2291
|
+
# then browse https://localhost:8443
|
|
2292
|
+
\`\`\`
|
|
2293
|
+
|
|
2294
|
+
A self-signed certificate is accepted once in the browser.
|
|
2295
|
+
|
|
2296
|
+
## Installing and updating
|
|
2297
|
+
|
|
2298
|
+
<!-- ctl-docs-template: fill me -->
|
|
2299
|
+
_The release this product ships and the one command that installs or updates
|
|
2300
|
+
it, with the settings it takes. Without a release kit: norsk-ctl's installer,
|
|
2301
|
+
then \`norsk-ctl product add\` (handover.md); a new image is \`norsk-ctl product
|
|
2302
|
+
reload\`; norsk-ctl itself is \`norsk-ctl upgrade --version <v>\`, as root._
|
|
2303
|
+
|
|
2304
|
+
## Checking it is healthy
|
|
2305
|
+
|
|
2306
|
+
\`\`\`sh
|
|
2307
|
+
systemctl status norsk-ctl # the manager
|
|
2308
|
+
journalctl -u norsk-ctl -f # its log
|
|
2309
|
+
docker ps # every container above, Up
|
|
2310
|
+
\`\`\`
|
|
2311
|
+
|
|
2312
|
+
<!-- ctl-docs-template: fill me -->
|
|
2313
|
+
_What the product's own page shows when it is healthy, and which container's
|
|
2314
|
+
log to read first when it is not._
|
|
2315
|
+
|
|
2316
|
+
## Removing it
|
|
2317
|
+
|
|
2318
|
+
<!-- ctl-docs-template: fill me -->
|
|
2319
|
+
_How to remove the product, and norsk-ctl with it, and what is left behind.
|
|
2320
|
+
Say plainly what is deleted (uploaded media) and how to keep it._
|
|
2321
|
+
|
|
2322
|
+
## Backups
|
|
2323
|
+
|
|
2324
|
+
norsk-ctl's state worth keeping is \`/etc/norsk-ctl\` and \`/var/lib/norsk-ctl\`,
|
|
2325
|
+
plus each instance's working directory.
|
|
2326
|
+
|
|
2327
|
+
<!-- ctl-docs-template: fill me -->
|
|
2328
|
+
_Anything else of this product's that is worth keeping._
|
|
2329
|
+
|
|
2330
|
+
## Licence
|
|
2331
|
+
|
|
2332
|
+
${ctx.name} runs under a Norsk licence that entitles it, staged in
|
|
2333
|
+
\`/etc/norsk-ctl/licenses/\`. The product takes its licence when it is added
|
|
2334
|
+
(\`norsk-ctl product add --license-file\`), so a new licence goes in with the
|
|
2335
|
+
next \`product add\`.
|
|
2336
|
+
`;
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2221
2339
|
const KNOWN_LIMITATIONS_MD = `# Known limitations
|
|
2222
2340
|
|
|
2223
2341
|
What this product does not do yet, or does with a caveat an operator must know
|
|
@@ -2298,6 +2416,7 @@ export const turnkey: ShapeModule = {
|
|
|
2298
2416
|
{ path: "docs/README.md", content: docsReadmeMd(ctx) },
|
|
2299
2417
|
{ path: "docs/handover.md", content: handoverMd(ctx) },
|
|
2300
2418
|
{ path: "docs/operating.md", content: operatingMd(ctx) },
|
|
2419
|
+
{ path: "docs/administering.md", content: administeringMd(ctx) },
|
|
2301
2420
|
{ path: "docs/known-limitations.md", content: KNOWN_LIMITATIONS_MD },
|
|
2302
2421
|
{ path: "docs/personas.md", content: personasMd(ctx) },
|
|
2303
2422
|
{ path: ".github/workflows/build-docs.yml", content: ctx.canon.buildDocs },
|