refactor(docs): invoke discourse-cli via docker run, not bin/ wrapper
Rewrite all Discourse CLI references to use raw docker run with
--env-file ~/.creds/discourse.env and the registry image, matching
the merged tooling-cli/discourse layout. Removes dependence on the
deleted ~/daytoday/discourse workspace. Marks Q2 resolved.
💘 Generated with Crush
Assisted-by: Crush:glm-5.2
This commit is contained in:
@@ -188,33 +188,37 @@ session, an agent MUST:
|
||||
|
||||
### CLI access (read + write)
|
||||
|
||||
Wiki topics are managed via the `discourse` CLI wrapper in the
|
||||
`~/daytoday/discourse` workspace (external to this repo). Full command
|
||||
reference, patterns, and the raw-API escape hatch live in
|
||||
`~/daytoday/discourse/AGENTS.md` — read it for anything beyond the basics.
|
||||
Wiki topics are managed via the `discourse-cli` container, invoked directly
|
||||
with `docker run` (no wrapper script). Full command reference, patterns, and
|
||||
the raw-API escape hatch live in the CLI's own `AGENTS.md`
|
||||
(`~/projects/KNEL-AIMiddleware/tooling-cli/discourse/AGENTS.md`) — read it
|
||||
for anything beyond the basics.
|
||||
|
||||
```bash
|
||||
# Connection sanity check (run first in any session):
|
||||
~/daytoday/discourse/bin/discourse whoami
|
||||
docker run --rm --env-file ~/.creds/discourse.env \
|
||||
git.knownelement.com/reachableceo/discourse-cli:latest whoami
|
||||
|
||||
# List VP TechOps topics:
|
||||
~/daytoday/discourse/bin/discourse ls -c vp-techops
|
||||
docker run --rm --env-file ~/.creds/discourse.env \
|
||||
git.knownelement.com/reachableceo/discourse-cli:latest ls -c vp-techops
|
||||
|
||||
# Show a topic / edit a wiki post (find post id via `show`):
|
||||
~/daytoday/discourse/bin/discourse show 297
|
||||
~/daytoday/discourse/bin/discourse update <post_id> -b "new markdown body"
|
||||
docker run --rm --env-file ~/.creds/discourse.env \
|
||||
git.knownelement.com/reachableceo/discourse-cli:latest show 297
|
||||
docker run --rm --env-file ~/.creds/discourse.env \
|
||||
git.knownelement.com/reachableceo/discourse-cli:latest update <post_id> -b "new markdown body"
|
||||
```
|
||||
|
||||
VP TechOps = category **74**. Key topics: #296 (project overview), #297
|
||||
(ops status), #298 (audit log). The API user is trust-level 4 but **not
|
||||
admin** — admin-only ops (category creation, setting the wiki flag) will
|
||||
403; surface those to the user rather than retrying. **Gotcha:**
|
||||
`update`/`delete` take a post **id**, not a post number (see
|
||||
`~/daytoday/discourse/AGENTS.md`). Never create a new topic for an update to
|
||||
existing knowledge — edit the wiki post in place.
|
||||
`update`/`delete` take a post **id**, not a post number. Never create a new
|
||||
topic for an update to existing knowledge — edit the wiki post in place.
|
||||
|
||||
The `.env` holding `DISCOURSE_URL`/`DISCOURSE_API_KEY`/`DISCOURSE_API_USERNAME`
|
||||
lives (gitignored) at `/home/reachableceo/projects/KNEL-AIMiddleware/discourse-cli/.env`.
|
||||
Credentials (`DISCOURSE_URL`/`DISCOURSE_API_KEY`/`DISCOURSE_API_USERNAME`)
|
||||
live in the centralized store at `~/.creds/discourse.env`.
|
||||
|
||||
## Key Scripts
|
||||
|
||||
@@ -225,7 +229,7 @@ lives (gitignored) at `/home/reachableceo/projects/KNEL-AIMiddleware/discourse-c
|
||||
| [`tests/remote.sh`](tests/remote.sh) | **SSH chokepoint** — all Proxmox host + sandbox VM access routes here |
|
||||
| [`netinfra/dns-cluster-setup/remote-dns.sh`](netinfra/dns-cluster-setup/remote-dns.sh) | SSH chokepoint for DNS infra hosts (netinfra-01/02, tsrouter, netboot) |
|
||||
| `~/daytoday/redmine/bin/redmine` | Redmine CLI wrapper (ticket read/write via Docker container) |
|
||||
| `~/daytoday/discourse/bin/discourse` | Discourse CLI wrapper (wiki topic read/write via Docker container) |
|
||||
| `discourse-cli` container | Discourse CLI (wiki topic read/write via `docker run`; see `tooling-cli/discourse/`) |
|
||||
| `~/daytoday/dns/bin/dns` | Technitium DNS CLI (zones, list, add, delete, search, flush) |
|
||||
| [`tests/vm-validation.sh`](tests/vm-validation.sh) | Deploy + validate on sandbox VM |
|
||||
| [`tests/run-tests.sh`](tests/run-tests.sh) | Test suite |
|
||||
@@ -294,7 +298,7 @@ Required for EVERY infrastructure change:
|
||||
`koalaman/shellcheck:stable`). ALL scripts must pass including info-level.
|
||||
- For raw API calls not covered by the Redmine/Discourse CLIs, use
|
||||
`python3` inside the CLI Docker containers (escape hatch pattern in
|
||||
`~/daytoday/redmine/AGENTS.md` and `~/daytoday/discourse/AGENTS.md`).
|
||||
`~/daytoday/redmine/AGENTS.md` and `tooling-cli/discourse/AGENTS.md`).
|
||||
- `curl`/`wget`/`httpie` may be blocked by some harnesses. Use the CLIs or
|
||||
the python-in-Docker escape hatch for HTTP writes.
|
||||
|
||||
@@ -309,7 +313,8 @@ bash tests/shellcheck.sh path/to/*.sh # shellcheck specific files
|
||||
|
||||
# Redmine + Discourse sanity checks (run first in any session):
|
||||
~/daytoday/redmine/bin/redmine whoami
|
||||
~/daytoday/discourse/bin/discourse whoami
|
||||
docker run --rm --env-file ~/.creds/discourse.env \
|
||||
git.knownelement.com/reachableceo/discourse-cli:latest whoami
|
||||
|
||||
# Proxmox host access:
|
||||
PROX_HOST=pfv-tsys5 bash tests/remote.sh prox 'qm list'
|
||||
|
||||
Reference in New Issue
Block a user