create-op-node 0.3.0 → 0.5.0
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/README.md +54 -1
- package/dist/cli.js +311 -166
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,13 +16,66 @@ That's it. The wizard walks you through:
|
|
|
16
16
|
5. **pgsodium master key** — generates a fresh 64-hex root key, stores it in your **macOS login Keychain** as `org.opuspopuli.<region>/pgsodium-root-key`. No third-party password manager required.
|
|
17
17
|
6. **Tunnel token retrieval** — after `terraform apply` lands, fetches the Tunnel token from Terraform Cloud outputs and stores it alongside the pgsodium key in your Keychain.
|
|
18
18
|
|
|
19
|
+
> Doing **local dev / testing first** (no public exposure yet)?
|
|
20
|
+
> See [Local-only mode](#local-only-mode-no-cloudflare) — `init --local-only`
|
|
21
|
+
> skips the Cloudflare/TFC/PR phases entirely.
|
|
22
|
+
|
|
19
23
|
Then on the Mac Studio itself:
|
|
20
24
|
|
|
21
25
|
```bash
|
|
22
26
|
npx create-op-node bootstrap
|
|
23
27
|
```
|
|
24
28
|
|
|
25
|
-
Configures macOS power settings, installs Homebrew + the CLI tool list, sets up Docker Desktop + Tailscale + Ollama, clones the node repo you created, reads the pgsodium key + Tunnel token from the Studio's Keychain (or prompts you to paste them once, then persists for re-runs), writes the LaunchAgent plist, logs into ghcr.io, pulls + warms the LLM model, and finally `docker compose pull && up -d` brings the whole stack online. Health-check loop waits until all
|
|
29
|
+
Configures macOS power settings, installs Homebrew + the CLI tool list, sets up Docker Desktop + Tailscale + Ollama, clones the node repo you created, reads the pgsodium key + Tunnel token from the Studio's Keychain (or prompts you to paste them once, then persists for re-runs), writes the LaunchAgent plist, logs into ghcr.io, pulls + warms the LLM model, and finally `docker compose --profile public pull && up -d` brings the whole stack online. Health-check loop waits until all containers are `(healthy)`.
|
|
30
|
+
|
|
31
|
+
### Local-only mode (no Cloudflare)
|
|
32
|
+
|
|
33
|
+
For local dev / testing — frontend on your laptop, backend on the Studio
|
|
34
|
+
over Tailscale, no public exposure. The flow mirrors production-init →
|
|
35
|
+
production-bootstrap, just with the Cloudflare half cut out on both
|
|
36
|
+
sides.
|
|
37
|
+
|
|
38
|
+
**On the laptop:**
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx create-op-node init --region us-ca --local-only
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This creates the region repo from the `OpusPopuli/opuspopuli-node`
|
|
45
|
+
template (private, no public exposure), generates the pgsodium master
|
|
46
|
+
key, and saves it to Keychain. No Cloudflare, no Terraform Cloud, no PR
|
|
47
|
+
to merge.
|
|
48
|
+
|
|
49
|
+
**On the Studio:**
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npx create-op-node bootstrap --region us-ca --local-only
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Differences from production bootstrap:
|
|
56
|
+
|
|
57
|
+
- **No Tunnel token required.** `init --local-only` skipped that phase.
|
|
58
|
+
- **`cloudflared` stays down.** It's gated behind the `public` compose
|
|
59
|
+
profile, which `--local-only` doesn't activate. Bootstrap also evicts
|
|
60
|
+
any leftover cloudflared from a prior public run so it doesn't strand
|
|
61
|
+
in `compose ps`.
|
|
62
|
+
- **Backup stack skipped by default.** `docker-compose-backup.yml`
|
|
63
|
+
isn't loaded; pass `--compose-file docker-compose-backup.yml` to
|
|
64
|
+
include it explicitly.
|
|
65
|
+
- **LaunchAgent omits `TUNNEL_TOKEN`.** Only `PGSODIUM_ROOT_KEY` is
|
|
66
|
+
exported into the launchd session.
|
|
67
|
+
- **Outro tells you to use Tailscale**, not `npx create-op-node verify`.
|
|
68
|
+
|
|
69
|
+
When you're ready to expose publicly, re-run **both** commands without
|
|
70
|
+
`--local-only`. Same region repo, same pgsodium key — promotes
|
|
71
|
+
cleanly to the production-shaped deploy.
|
|
72
|
+
|
|
73
|
+
> **Template version**: this mode depends on the `opuspopuli-node`
|
|
74
|
+
> template having `profiles: [public]` on its cloudflared service. If
|
|
75
|
+
> you cloned the template before that landed, refresh your fork
|
|
76
|
+
> (or recreate from template) before using `--local-only` — otherwise
|
|
77
|
+
> cloudflared starts regardless and will restart-loop without a
|
|
78
|
+
> TUNNEL_TOKEN.
|
|
26
79
|
|
|
27
80
|
> **Secret transport between laptop and Studio**
|
|
28
81
|
>
|