@rocket.chat/houston 0.27.0-next.3 → 2.1.8
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/LICENSE +1 -1
- package/README.md +108 -15
- package/bin/houston +62 -0
- package/data/docs/ARCHITECTURE.md +387 -0
- package/data/docs/automation.md +107 -0
- package/data/docs/e2ee.md +76 -0
- package/data/docs/eks.md +258 -0
- package/data/docs/gui.md +282 -0
- package/data/docs/guide.md +669 -0
- package/data/docs/kubernetes.md +138 -0
- package/data/docs/troubleshooting.md +193 -0
- package/data/docs/upgrading.md +84 -0
- package/data/docs/voice.md +253 -0
- package/data/iam/engineer-policy.json +11 -0
- package/data/iam/engineer-rbac.yaml +42 -0
- package/data/iam/operator-policy.json +211 -0
- package/data/loadtest/badbot.js +22 -0
- package/data/loadtest/common.js +168 -0
- package/data/loadtest/custom.js +20 -0
- package/data/loadtest/journey.js +58 -0
- package/data/loadtest/login.js +18 -0
- package/data/loadtest/messages.js +13 -0
- package/data/loadtest/mixed.js +39 -0
- package/data/loadtest/read.js +12 -0
- package/data/loadtest/webhook.js +20 -0
- package/data/monitoring/houston-logs.json +98 -0
- package/data/monitoring/k6-loadtest.json +610 -0
- package/data/monitoring/mongodb-exporter.json +3007 -0
- package/data/monitoring/node-exporter-full.json +16114 -0
- package/data/monitoring/rocketchat-metrics.json +6471 -0
- package/data/presets/airgapped.yaml +16 -0
- package/data/presets/default.yaml +9 -0
- package/data/seed/avatar-0.png +0 -0
- package/data/seed/avatar-1.png +0 -0
- package/data/seed/avatar-2.png +0 -0
- package/data/seed/avatar-3.png +0 -0
- package/data/seed/avatar-4.png +0 -0
- package/data/seed/avatar-5.png +0 -0
- package/data/seed/avatar-6.png +0 -0
- package/data/seed/avatar-7.png +0 -0
- package/data/seed/seed-metrics.csv +3 -0
- package/data/seed/seed-preview.png +0 -0
- package/data/seed/seed-report.pdf +32 -0
- package/data/seed/seed-runbook.txt +3 -0
- package/data/skill/SKILL.md +399 -0
- package/data/versions.yaml +55 -0
- package/data/voice/freeswitch/drachtio.xml +52 -0
- package/data/voice/freeswitch/public.xml +87 -0
- package/data/webui/app.css +2003 -0
- package/data/webui/index.html +678 -0
- package/data/webui/js/api.js +561 -0
- package/data/webui/js/boot.js +44 -0
- package/data/webui/js/clusters-tail.js +1377 -0
- package/data/webui/js/clusters.js +896 -0
- package/data/webui/js/create.js +276 -0
- package/data/webui/js/detail.js +507 -0
- package/data/webui/js/jobs.js +636 -0
- package/data/webui/js/logs.js +634 -0
- package/data/webui/js/main.js +14 -0
- package/data/webui/js/options.js +408 -0
- package/data/webui/js/people.js +438 -0
- package/data/webui/js/perf.js +303 -0
- package/data/webui/js/render.js +438 -0
- package/data/webui/js/shared.js +3 -0
- package/data/webui/js/state.js +583 -0
- package/data/webui/js/theme.js +123 -0
- package/data/webui/js/util.js +584 -0
- package/dist/cli/app.js +593 -0
- package/dist/cli/capabilities.js +76 -0
- package/dist/cli/cell-widths.js +495 -0
- package/dist/cli/entry.js +10 -0
- package/dist/cli/error-panel.js +492 -0
- package/dist/cli/handlers/actor.js +84 -0
- package/dist/cli/handlers/https.js +614 -0
- package/dist/cli/handlers/prompt.js +299 -0
- package/dist/cli/handlers/users.js +226 -0
- package/dist/cli/handlers.js +3678 -0
- package/dist/cli/help.js +183 -0
- package/dist/cli/index.js +15 -0
- package/dist/cli/perf.js +810 -0
- package/dist/cli/render.js +254 -0
- package/dist/cli/serve.js +858 -0
- package/dist/cli/spec-data.js +2593 -0
- package/dist/cli/spec-types.js +8 -0
- package/dist/cli/usage-error.js +520 -0
- package/dist/cli/wire.js +70 -0
- package/dist/core/audit.js +346 -0
- package/dist/core/backup-compat.js +85 -0
- package/dist/core/backup.js +1639 -0
- package/dist/core/cluster.js +1398 -0
- package/dist/core/configimport.js +344 -0
- package/dist/core/data.js +267 -0
- package/dist/core/database-of.js +82 -0
- package/dist/core/diagnose.js +159 -0
- package/dist/core/doctor.js +1518 -0
- package/dist/core/edge/acme.js +338 -0
- package/dist/core/edge/engine.js +500 -0
- package/dist/core/edge/networks.js +174 -0
- package/dist/core/edge/paths.js +107 -0
- package/dist/core/edge/routes.js +251 -0
- package/dist/core/edge/routeyml.js +195 -0
- package/dist/core/edge/runtime.js +493 -0
- package/dist/core/edge/spec.js +305 -0
- package/dist/core/edge/types.js +202 -0
- package/dist/core/eks-docs.js +135 -0
- package/dist/core/eks.js +2240 -0
- package/dist/core/envvars.js +562 -0
- package/dist/core/eventlog.js +541 -0
- package/dist/core/firstrun.js +153 -0
- package/dist/core/journal.js +691 -0
- package/dist/core/kube/ask.js +231 -0
- package/dist/core/kube/capabilities.js +269 -0
- package/dist/core/kube/certmanager.js +452 -0
- package/dist/core/kube/chart.js +413 -0
- package/dist/core/kube/cluster.js +196 -0
- package/dist/core/kube/context.js +545 -0
- package/dist/core/kube/endpoints.js +448 -0
- package/dist/core/kube/exec.js +195 -0
- package/dist/core/kube/forward.js +732 -0
- package/dist/core/kube/grafana-ingress.js +110 -0
- package/dist/core/kube/ingress.js +218 -0
- package/dist/core/kube/manifests.js +361 -0
- package/dist/core/kube/monitoring.js +768 -0
- package/dist/core/kube/names.js +237 -0
- package/dist/core/kube/namespace.js +678 -0
- package/dist/core/kube/operator.js +941 -0
- package/dist/core/kube/probe.js +202 -0
- package/dist/core/kube/reachability.js +163 -0
- package/dist/core/kube/release.js +439 -0
- package/dist/core/kube/replicaset.js +180 -0
- package/dist/core/kube/scale.js +398 -0
- package/dist/core/kube/status.js +633 -0
- package/dist/core/kube/tools.js +238 -0
- package/dist/core/kube/transfer.js +173 -0
- package/dist/core/kube/workspace.js +423 -0
- package/dist/core/lifecycle/admin.js +64 -0
- package/dist/core/lifecycle/create-docker.js +1533 -0
- package/dist/core/lifecycle/create-k8s.js +939 -0
- package/dist/core/lifecycle/destroy.js +339 -0
- package/dist/core/lifecycle/inspect.js +635 -0
- package/dist/core/lifecycle/naming.js +298 -0
- package/dist/core/lifecycle/notes.js +726 -0
- package/dist/core/lifecycle/ownership.js +313 -0
- package/dist/core/lifecycle/payload.js +401 -0
- package/dist/core/lifecycle/ports.js +388 -0
- package/dist/core/lifecycle/preconditions.js +367 -0
- package/dist/core/lifecycle/pruning.js +551 -0
- package/dist/core/lifecycle/ready.js +753 -0
- package/dist/core/lifecycle/request.js +525 -0
- package/dist/core/lifecycle/seeding.js +281 -0
- package/dist/core/lifecycle/sizing.js +392 -0
- package/dist/core/lifecycle/state.js +286 -0
- package/dist/core/lifecycle/tlsplan.js +704 -0
- package/dist/core/lifecycle/types.js +232 -0
- package/dist/core/loadtest.js +995 -0
- package/dist/core/migrate.js +612 -0
- package/dist/core/monitor.js +494 -0
- package/dist/core/postready.js +969 -0
- package/dist/core/promote.js +804 -0
- package/dist/core/rcapi.js +1285 -0
- package/dist/core/recovery.js +75 -0
- package/dist/core/runner/engine.js +394 -0
- package/dist/core/runner/host.js +298 -0
- package/dist/core/runner/locks.js +129 -0
- package/dist/core/runner/paths.js +173 -0
- package/dist/core/runner/ports.js +172 -0
- package/dist/core/runner/queries.js +612 -0
- package/dist/core/runner/record.js +563 -0
- package/dist/core/scaleseed.js +271 -0
- package/dist/core/seed-db.js +208 -0
- package/dist/core/sessions.js +472 -0
- package/dist/core/skill.js +326 -0
- package/dist/core/sso-identities.js +172 -0
- package/dist/core/sso.js +703 -0
- package/dist/core/tls-local.js +311 -0
- package/dist/core/tls.js +878 -0
- package/dist/core/topology.js +482 -0
- package/dist/core/upgrade.js +868 -0
- package/dist/core/users.js +739 -0
- package/dist/lib/audit.js +100 -0
- package/dist/lib/close-matches.js +238 -0
- package/dist/lib/compose.js +672 -0
- package/dist/lib/config.js +1398 -0
- package/dist/lib/context.js +18 -0
- package/dist/lib/errors.js +305 -0
- package/dist/lib/events.js +208 -0
- package/dist/lib/float-text.js +126 -0
- package/dist/lib/format.js +1320 -0
- package/dist/lib/home.js +325 -0
- package/dist/lib/journal.js +122 -0
- package/dist/lib/json-text.js +733 -0
- package/dist/lib/jsonout.js +382 -0
- package/dist/lib/lock.js +516 -0
- package/dist/lib/login-name.js +202 -0
- package/dist/lib/map-limit.js +29 -0
- package/dist/lib/mkdir-parents.js +90 -0
- package/dist/lib/mongo-kernel.js +67 -0
- package/dist/lib/monitoring.js +492 -0
- package/dist/lib/platform-name.js +59 -0
- package/dist/lib/presets/common.js +390 -0
- package/dist/lib/presets/composite.js +326 -0
- package/dist/lib/presets/e2ee.js +143 -0
- package/dist/lib/presets/email.js +172 -0
- package/dist/lib/presets/guides.js +27 -0
- package/dist/lib/presets/index.js +490 -0
- package/dist/lib/presets/keycloak.js +369 -0
- package/dist/lib/presets/ldap.js +1285 -0
- package/dist/lib/presets/livechat.js +220 -0
- package/dist/lib/presets/multi-instance.js +124 -0
- package/dist/lib/presets/oidc.js +161 -0
- package/dist/lib/presets/public.js +496 -0
- package/dist/lib/presets/registry.js +64 -0
- package/dist/lib/presets/s3-minio.js +300 -0
- package/dist/lib/presets/saml.js +149 -0
- package/dist/lib/presets/scenario.js +51 -0
- package/dist/lib/presets/types.js +86 -0
- package/dist/lib/presets/voice-pbx.js +320 -0
- package/dist/lib/presets/voice.js +345 -0
- package/dist/lib/presets/webhooks.js +182 -0
- package/dist/lib/redact.js +106 -0
- package/dist/lib/seed-options.js +68 -0
- package/dist/lib/seed-profiles.js +59 -0
- package/dist/lib/targz.js +1383 -0
- package/dist/lib/teammode.js +25 -0
- package/dist/lib/tempdir.js +162 -0
- package/dist/lib/unicode-tables.js +2335 -0
- package/dist/lib/version-spec.js +357 -0
- package/dist/lib/versions.js +463 -0
- package/dist/lib/yaml-dump.js +1361 -0
- package/dist/perf/baseline.js +168 -0
- package/dist/perf/constrain.js +296 -0
- package/dist/perf/k6.js +235 -0
- package/dist/perf/mongoprof.js +171 -0
- package/dist/perf/rcmetrics.js +178 -0
- package/dist/perf/report.js +386 -0
- package/dist/perf/resources.js +224 -0
- package/dist/perf/slo.js +111 -0
- package/dist/perf/timeline.js +187 -0
- package/dist/perf/timings.js +85 -0
- package/dist/perf/verdict.js +201 -0
- package/dist/seams/aws-cli.js +126 -0
- package/dist/seams/docker-cli.js +280 -0
- package/dist/seams/exec.js +861 -0
- package/dist/seams/fs/lock.js +528 -0
- package/dist/seams/kubectl.js +83 -0
- package/dist/seams/rc-http.js +921 -0
- package/dist/seed/apply.js +190 -0
- package/dist/seed/assets.js +76 -0
- package/dist/seed/check.js +391 -0
- package/dist/seed/client.js +172 -0
- package/dist/seed/executor.js +726 -0
- package/dist/seed/history.js +281 -0
- package/dist/seed/kinds.js +91 -0
- package/dist/seed/plan.js +432 -0
- package/dist/seed/receipt.js +339 -0
- package/dist/seed/repairs.js +75 -0
- package/dist/seed/verification.js +363 -0
- package/dist/seed/wording.js +248 -0
- package/dist/web/app.js +326 -0
- package/dist/web/jobs.js +510 -0
- package/dist/web/route-deps.js +211 -0
- package/dist/web/route-table.js +213 -0
- package/dist/web/routes/backup.js +244 -0
- package/dist/web/routes/clusters.js +303 -0
- package/dist/web/routes/data.js +187 -0
- package/dist/web/routes/edge.js +82 -0
- package/dist/web/routes/index.js +63 -0
- package/dist/web/routes/jobs.js +95 -0
- package/dist/web/routes/logs.js +297 -0
- package/dist/web/routes/meta.js +191 -0
- package/dist/web/routes/people.js +151 -0
- package/dist/web/routes/perf.js +95 -0
- package/dist/web/routes/repros.js +550 -0
- package/dist/web/routes/session.js +361 -0
- package/dist/web/routes/spa.js +198 -0
- package/dist/web/security.js +475 -0
- package/dist/web/signin.js +246 -0
- package/package.json +67 -32
- package/.eslintrc +0 -94
- package/.swcrc +0 -18
- package/dist/bin.js +0 -3
- package/dist/cli.js +0 -184
- package/dist/commands/createBranch.js +0 -194
- package/dist/outputCI.js +0 -59
- package/src/bin.js +0 -4
- package/src/cli.ts +0 -25
- package/src/commands/createBranch.ts +0 -28
- package/src/outputCI.ts +0 -12
- package/src-old/logs.js +0 -323
- package/src-old/md.js +0 -191
- package/src-old/release-table.js +0 -60
- package/src-old/set-version.js +0 -614
- package/src-old/utils.js +0 -15
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Scripts and coding agents
|
|
2
|
+
|
|
3
|
+
The machine-readable parts of houston: `--json`, `houston capabilities`, exit codes, the
|
|
4
|
+
event log and the agent skill. **Branch on the exit code and `error.code`, never on the
|
|
5
|
+
wording**: messages get reworded between releases, codes do not.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## A worked example
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
export HOUSTON_HOME=$(mktemp -d) # a throwaway home, not your real one
|
|
13
|
+
houston up --version 8.5.1 --name t1 --wait --json | tail -n 1 | jq '.ok, .error.code'
|
|
14
|
+
houston ready --name t1 --json | tail -n 1 | jq '.ok'
|
|
15
|
+
houston down --name t1 --volumes --yes --json | tail -n 1 | jq '.ok'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
On a shared machine, set `HOUSTON_USER=<account>` so the audit log names who ran it.
|
|
19
|
+
|
|
20
|
+
## `--json`
|
|
21
|
+
|
|
22
|
+
`up`, `ready`, `down`, `list`, `info`, `doctor`, `loadtest`, `capacity`, `cluster` and
|
|
23
|
+
`skill` take `--json`; `capabilities` always prints JSON. Every reply is one envelope:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{"schema":"houston.info.v1","contract":2,"houston_version":"2.1.8",
|
|
27
|
+
"generated_at":"…","ok":true,"data":{…},"warnings":[],"error":null}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- **Parse the last line.** `up` and `ready` stream progress lines (`houston.event.v1`)
|
|
31
|
+
first, then the envelope.
|
|
32
|
+
- A failure has `"ok":false`, `"schema":"houston.error.v1"` and an `error` with a stable
|
|
33
|
+
`code` and a `message`.
|
|
34
|
+
- `warnings` holds every distinct warning the command raised, each a `code` and a
|
|
35
|
+
`message`, in the order raised. Branch on the code; most share the generic `WARNING`.
|
|
36
|
+
- stdout is JSON only; anything for a person goes to stderr.
|
|
37
|
+
- An unknown `contract`: stop. Unknown keys in `data`: ignore them.
|
|
38
|
+
- `down --volumes --json` needs `--yes`.
|
|
39
|
+
|
|
40
|
+
## `houston capabilities`
|
|
41
|
+
|
|
42
|
+
JSON, no Docker needed, and the authority for **this build**: its commands and which take
|
|
43
|
+
`--json` or stream, runtimes and deployments, presets, seed profiles, phases, error codes
|
|
44
|
+
and exit codes. Read it instead of assuming a flag exists.
|
|
45
|
+
|
|
46
|
+
## Exit codes
|
|
47
|
+
|
|
48
|
+
| Code | Meaning | `error.code` | What to do |
|
|
49
|
+
|---|---|---|---|
|
|
50
|
+
| 0 | ok | — | — |
|
|
51
|
+
| 1 | internal | `REPRO_ERROR` | a refusal of no more specific kind, or a crash (stack trace on stderr). Read the message |
|
|
52
|
+
| 2 | usage | `VALIDATION_FAILED` | the call is wrong (a bad flag value, a missing argument, an unknown action); retrying unchanged will not help |
|
|
53
|
+
| 3 | preflight | `PREFLIGHT_FAILED`, `ENGINE_UNAVAILABLE` | the machine is not ready: run `houston doctor` |
|
|
54
|
+
| 4 | not found | `NOT_FOUND` | the thing named is not there: a workspace, a file, a saved baseline |
|
|
55
|
+
| 5 | not ready | `NOT_READY` | from `ready` or `up --wait`: poll again. From `down --volumes`: it is still there, read the warning |
|
|
56
|
+
| 6 | gate | `GATE`, `GATE_*` | a person has to decide; see below |
|
|
57
|
+
| 7 | create failed | `CREATE_FAILED` | it did not come up. Stop; do not retry in a loop |
|
|
58
|
+
| 8 | conflict | `CONFLICT` | the name or port is taken |
|
|
59
|
+
| 130 | interrupt | — | Ctrl-C: no envelope |
|
|
60
|
+
| 252 | no code | — | `bin/houston` could not find houston's code; nothing ran |
|
|
61
|
+
|
|
62
|
+
`doctor` exits 1 on a failed check in normal output, and 3 with `--json`.
|
|
63
|
+
|
|
64
|
+
**Exit 6, a gate**, needs a person. The codes:
|
|
65
|
+
|
|
66
|
+
| Code | Raised by |
|
|
67
|
+
|---|---|
|
|
68
|
+
| `GATE_CLOUD_SPEND` | `cluster create` in an AWS account not approved on this machine |
|
|
69
|
+
| `GATE_DELETE_UNOWNED`, `GATE_KEEP_UNOWNED`, `GATE_SHARE_UNOWNED` | `cluster delete`, `keep` or `share` on a cluster houston did not build |
|
|
70
|
+
| `GATE_WRONG_ACCOUNT` | `cluster connect` or `cluster delete` when the AWS sign-in is a different account from the cluster's |
|
|
71
|
+
| `GATE_WRONG_CLUSTER` | `cluster delete` when AWS returns a different cluster than the one selected |
|
|
72
|
+
| `GATE_UNAPPROVED_CLUSTER` | `--https` on a cluster that is not on this machine |
|
|
73
|
+
|
|
74
|
+
`error.gate.approve_with` is the command or action to **ask a person for**. A script or
|
|
75
|
+
agent never runs it itself, and `--force` does not get past a gate.
|
|
76
|
+
|
|
77
|
+
## The event log
|
|
78
|
+
|
|
79
|
+
Every command appends JSON lines to `$HOUSTON_HOME/logs/houston.log` (default
|
|
80
|
+
`~/.houston`), with credentials dropped. One command shares a `run` id:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
grep '"run":"<id>"' ~/.houston/logs/houston.log
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
It is for reading, not a contract. `HOUSTON_LOG_MAX_MB=0` turns it off;
|
|
87
|
+
`HOUSTON_LOG_ECHO=1` also keeps Docker's pull lines.
|
|
88
|
+
|
|
89
|
+
## Coding agents
|
|
90
|
+
|
|
91
|
+
houston ships a skill that teaches an agent, such as Claude Code, how to use this build:
|
|
92
|
+
which command fits a request, how to read the replies, and what to ask a person first.
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
houston skill install # into every agent skills directory houston knows
|
|
96
|
+
houston skill install --host claude
|
|
97
|
+
houston skill status # absent, current, stale or modified
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`skill install` will not overwrite a copy you edited (`modified`) unless you pass
|
|
101
|
+
`--force`. `houston capabilities` reports `skill.current: false` when an installed copy
|
|
102
|
+
is out of date, and `houston doctor` names it.
|
|
103
|
+
|
|
104
|
+
Upgrading houston does not update an installed copy, so run `houston skill install` after
|
|
105
|
+
each upgrade. Claude Code reads a copy in `~/.claude/skills` in preference to a project's
|
|
106
|
+
`.claude/skills` copy of the same name, so a stale one in your home directory is the one
|
|
107
|
+
in play even inside a project that has a current copy.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Encrypted conversations (E2EE)
|
|
2
|
+
|
|
3
|
+
The `e2ee` preset turns on Rocket.Chat's end-to-end encryption and creates three
|
|
4
|
+
test users. Everything else happens in Rocket.Chat, as it does for a customer: each
|
|
5
|
+
user's keys are made in their own browser the first time they sign in, and Rocket.Chat
|
|
6
|
+
shows their E2EE password once. Houston never holds a key or an E2EE password.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
houston up --version 8.8.0 --name ticket-1234 --preset e2ee --wait
|
|
10
|
+
houston up --version 8.8.0 --name ticket-1234 --preset e2ee --set policy=enforced --wait
|
|
11
|
+
houston down --name ticket-1234 --volumes
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Options
|
|
15
|
+
|
|
16
|
+
Each option sets the Rocket.Chat setting of the same name under **Workspace >
|
|
17
|
+
Settings > End-to-end encryption**. End-to-end encryption itself is always on.
|
|
18
|
+
|
|
19
|
+
| `--set` | Rocket.Chat settings | Default |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `policy=optional` | Encrypt direct messages: off. Encrypt private rooms: off. People choose per room. | yes |
|
|
22
|
+
| `policy=default` | Encrypt direct messages: on. Encrypt private rooms: on. People may turn it off. | |
|
|
23
|
+
| `policy=enforced` | As `default`, plus Force end-to-end encryption on private rooms. Needs Rocket.Chat 8.8.0 or later; an older version is refused, because it would ignore the setting. | |
|
|
24
|
+
| `files=on\|off` | Encrypt files | `on` |
|
|
25
|
+
| `allow_unencrypted=on\|off` | Unencrypted messages in encrypted rooms | `off` |
|
|
26
|
+
| `users=on\|off` | Creates `e2e-alice`, `e2e-bob` and `e2e-carol`, each with its username as its password | `on` |
|
|
27
|
+
|
|
28
|
+
Any other E2E setting, such as mentions, is an ordinary `--setting`:
|
|
29
|
+
`--setting E2E_Enabled_Mentions=true`.
|
|
30
|
+
|
|
31
|
+
## Try it
|
|
32
|
+
|
|
33
|
+
1. Open Rocket.Chat on **localhost or over HTTPS** (`--https`, or `--domain`). A
|
|
34
|
+
browser encrypts only on a secure origin, so `http://<this machine's address>:<port>`
|
|
35
|
+
from another computer will not work. On Kubernetes the workspace URL is a
|
|
36
|
+
port-forward to localhost, which counts.
|
|
37
|
+
2. Sign in as `e2e-alice` in one browser profile and `e2e-bob` in another (a private
|
|
38
|
+
window is a separate profile). Each sees **Save your new E2EE password**: copy it,
|
|
39
|
+
then **I saved my password**. On another device, Rocket.Chat asks for it with
|
|
40
|
+
**Enter your E2E password**.
|
|
41
|
+
3. Start an encrypted conversation: a DM's **⋮ > Enable E2EE**, or **Encrypted** under
|
|
42
|
+
**Advanced Settings** when creating a private room. With `policy=default` or
|
|
43
|
+
`enforced`, new DMs and private rooms are already encrypted.
|
|
44
|
+
|
|
45
|
+
## Sample data
|
|
46
|
+
|
|
47
|
+
Sample data works with every policy. Houston's seeder sends plaintext and cannot
|
|
48
|
+
encrypt, so while it runs it turns **Encrypt direct messages**, **Encrypt private
|
|
49
|
+
rooms** and **Force end-to-end encryption on private rooms** off, and turns them back on
|
|
50
|
+
when it ends. If the seed is killed, `houston ready` or the next `houston serve` turns
|
|
51
|
+
them back on.
|
|
52
|
+
|
|
53
|
+
The sample rooms are therefore unencrypted, like rooms that existed before the policy;
|
|
54
|
+
every room created after the seed follows the policy. Add encrypted content from the
|
|
55
|
+
browsers.
|
|
56
|
+
|
|
57
|
+
## Backups, restores and upgrades
|
|
58
|
+
|
|
59
|
+
They need nothing special. Users' keys live in the database, encrypted with each
|
|
60
|
+
user's E2EE password, so a backup carries them and a restore brings them back. After a
|
|
61
|
+
restore, people unlock their keys with the same E2EE passwords they saved.
|
|
62
|
+
|
|
63
|
+
## Rocket.Chat behaviours worth knowing
|
|
64
|
+
|
|
65
|
+
Seen on Rocket.Chat 8.5.1 and 8.8.0. Houston reproduces them; it does not patch the
|
|
66
|
+
server.
|
|
67
|
+
|
|
68
|
+
- **Enforced applies at creation.** A room's owner can still turn encryption off later
|
|
69
|
+
through `/api/v1/groups.setEncrypted`.
|
|
70
|
+
- **`chat.postMessage` and incoming webhooks store plaintext** in an encrypted room
|
|
71
|
+
even with `allow_unencrypted=off`; `chat.sendMessage` and the composer refuse it.
|
|
72
|
+
- **`files=off` with `allow_unencrypted=off` blocks uploads** in encrypted rooms, with
|
|
73
|
+
the untranslated message `You_cant_send_unencrypted_files_in_an_encrypted_room`.
|
|
74
|
+
- **A new room's key can stick on one client**: that person sees "Check back later" or
|
|
75
|
+
cannot read the others. Reloading their page fixes it.
|
|
76
|
+
- **Removing a member does not change the room key.**
|
package/data/docs/eks.md
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# Rocket.Chat on Amazon EKS
|
|
2
|
+
|
|
3
|
+
An EKS cluster is a Kubernetes cluster in your AWS account. **It bills by the hour from
|
|
4
|
+
the moment it exists until it is deleted**, whether or not anything runs on it. Build one
|
|
5
|
+
per team, run a workspace per ticket, and delete it when you are done.
|
|
6
|
+
|
|
7
|
+
`houston cluster guide` prints this page. `houston cluster overview` shows every cluster,
|
|
8
|
+
what it costs and what to do next. `houston up` never creates a cluster; only
|
|
9
|
+
`houston cluster create` does.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## What you need, once
|
|
14
|
+
|
|
15
|
+
* The four tools: [AWS CLI v2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html),
|
|
16
|
+
[eksctl](https://eksctl.io/installation/), [kubectl](https://kubernetes.io/docs/tasks/tools/)
|
|
17
|
+
and [Helm](https://helm.sh/docs/intro/install/).
|
|
18
|
+
* An AWS sign-in that is **not the root user** (setup below).
|
|
19
|
+
* A DNS zone you can edit, such as `rc.example.com`, and an email for Let's Encrypt.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
aws --version; eksctl version; kubectl version --client; helm version
|
|
23
|
+
houston doctor # look for: AWS ready — <your identity>, region <region>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**AWS sign-in, the first time.** An IAM administrator creates a user with houston's
|
|
27
|
+
policy, and you sign in as it:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
houston cluster iam-policy operator > operator-policy.json # give this to the IAM admin
|
|
31
|
+
|
|
32
|
+
# The IAM admin runs:
|
|
33
|
+
ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
|
|
34
|
+
aws iam create-user --user-name houston-operator
|
|
35
|
+
aws iam create-policy --policy-name houston-cluster-operator --policy-document file://operator-policy.json
|
|
36
|
+
aws iam attach-user-policy --user-name houston-operator \
|
|
37
|
+
--policy-arn "arn:aws:iam::${ACCOUNT_ID}:policy/houston-cluster-operator"
|
|
38
|
+
aws iam create-access-key --user-name houston-operator # the secret is shown only once
|
|
39
|
+
|
|
40
|
+
# You run:
|
|
41
|
+
aws configure # the key id and secret; region us-east-1; output json
|
|
42
|
+
aws sts get-caller-identity # the Arn must end in :user/houston-operator
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Company SSO (`aws configure sso`, then `aws sso login`) or a server role works instead.
|
|
46
|
+
Use the policy exactly as shipped.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Build a cluster
|
|
51
|
+
|
|
52
|
+
**1. Approve the account on this machine** (once). houston will not spend in an account
|
|
53
|
+
until you name it here:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
|
|
57
|
+
houston config set cluster.approved_accounts "$ACCOUNT_ID"
|
|
58
|
+
houston config set acme.email you@example.com
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**2. Create the cluster.** 15 to 25 minutes, **billing from now**:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
houston cluster create support --region us-east-1 --zone rc.example.com
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
| Option | Default | What it does |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| `--nodes` | 3 | how many `t3.large` nodes |
|
|
70
|
+
| `--expires` | 7 | days until a reminder; `never` for none. Nothing deletes on it |
|
|
71
|
+
| `--zone` | none | the DNS zone workspace names live under |
|
|
72
|
+
| `--region` | the AWS CLI's | where to build |
|
|
73
|
+
|
|
74
|
+
It ends with `point your name at: <address>.elb.amazonaws.com`. **Copy that address.**
|
|
75
|
+
Missed it? `houston cluster prepare support` prints it again.
|
|
76
|
+
|
|
77
|
+
**3. Point DNS at it** (once per cluster). Add one record at your DNS provider:
|
|
78
|
+
|
|
79
|
+
| Field | Value |
|
|
80
|
+
|---|---|
|
|
81
|
+
| Type | `CNAME`, not an A record: the load balancer's addresses change |
|
|
82
|
+
| Name | `*.rc.example.com`. Most providers, Cloudflare included, want only the part before your domain: for `example.com`, type `*.rc` |
|
|
83
|
+
| Target | the address from step 2 |
|
|
84
|
+
| Proxy | **DNS only** (Cloudflare's grey cloud). Ignore Cloudflare's warning that this exposes your origin: the target is a public AWS load balancer, and the proxy breaks the workspaces' certificates |
|
|
85
|
+
|
|
86
|
+
houston checks it by looking up `houston-probe.rc.example.com`, a name you do not create.
|
|
87
|
+
In the GUI, Home, the cluster's card and its page offer **Set up DNS** until it answers.
|
|
88
|
+
|
|
89
|
+
**4. Check it.** The overview says when the name answers:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
houston cluster overview
|
|
93
|
+
houston cluster status support
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## A workspace per ticket
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
houston up --version 8.5.1 --name TICKET-1234 --context support --wait
|
|
102
|
+
houston info --name TICKET-1234 # URL and admin login
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
* Its public name is `ticket-1234.rc.example.com`, from the zone. `--domain <name>`
|
|
106
|
+
picks another.
|
|
107
|
+
* A public workspace gets a generated admin password; `houston info` shows it.
|
|
108
|
+
* Grafana: `houston monitor --name TICKET-1234`, then open
|
|
109
|
+
`https://ticket-1234.rc.example.com/grafana` (admin / admin).
|
|
110
|
+
|
|
111
|
+
The usual commands work on it:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
houston logs --name TICKET-1234 --tail 50
|
|
115
|
+
houston seed --name TICKET-1234 --profile small
|
|
116
|
+
houston api --name TICKET-1234 GET /api/info
|
|
117
|
+
houston stats --name TICKET-1234
|
|
118
|
+
houston backup --name TICKET-1234
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Remove it, always with `--volumes`:**
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
houston down --name TICKET-1234 --volumes --yes
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Without `--volumes` its 8 GB disk stays and keeps billing, and `cluster delete` will
|
|
128
|
+
refuse later.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Stop the bill: delete the cluster
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
houston cluster status support # 1. what it still holds, colleagues' too
|
|
136
|
+
houston down --name TICKET-1234 --volumes --yes # 2. remove every workspace
|
|
137
|
+
houston cluster delete support # 3. 10 to 20 minutes
|
|
138
|
+
houston cluster list # 4. nothing left in any region
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
`cluster delete` releases the load balancer, deletes the cluster, then checks AWS and
|
|
142
|
+
ends with `nothing in us-east-1 is billing`, or a `left behind` row per leftover with the
|
|
143
|
+
command that removes it. It refuses a cluster that still holds workspaces; do not use
|
|
144
|
+
`--force` to get past that, or their disks stay behind and bill.
|
|
145
|
+
|
|
146
|
+
A colleague's workspace is removed by them (`houston down`), or by deleting its
|
|
147
|
+
namespace:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
KUBECONFIG="${HOUSTON_HOME:-$HOME/.houston}/clusters/support/kubeconfig" kubectl delete namespace houston-<name>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## What it costs
|
|
156
|
+
|
|
157
|
+
us-east-1, on demand, the rates houston's own estimates use:
|
|
158
|
+
|
|
159
|
+
| | 3 nodes (default) | `--nodes 2` | `--nodes 5` |
|
|
160
|
+
|---|---|---|---|
|
|
161
|
+
| Per hour | $0.44 | $0.35 | $0.63 |
|
|
162
|
+
| Per day | $10.64 | $8.43 | $15.06 |
|
|
163
|
+
| Per month | about $324 | about $257 | about $458 |
|
|
164
|
+
|
|
165
|
+
Most of it is the nodes ($0.0832 an hour each), then the EKS control plane ($0.10 an
|
|
166
|
+
hour: houston builds Kubernetes 1.37, on standard support until December 2027), a NAT
|
|
167
|
+
gateway and the load balancer. A cluster an older houston built at 1.33 bills $0.60 an
|
|
168
|
+
hour for its control plane (extended support since 29 July 2026), about $12 a day more.
|
|
169
|
+
Each workspace adds an 8 GB disk, about $0.64 a month. Data transfer is extra.
|
|
170
|
+
|
|
171
|
+
**These do not stop the bill:** removing workspaces, leaving the cluster idle, or the
|
|
172
|
+
expiry date (`houston cluster keep support --days 7` moves it). **Only
|
|
173
|
+
`houston cluster delete` does.**
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Use a cluster that already exists
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
houston cluster list --force # every EKS cluster in the account
|
|
181
|
+
houston cluster connect arn:aws:eks:us-east-1:123456789012:cluster/support
|
|
182
|
+
houston cluster status --context support
|
|
183
|
+
houston up --version 8.5.1 --name TICKET-1234 --context support --wait
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Connecting is free. Your AWS identity also needs an EKS access entry on that cluster:
|
|
187
|
+
its owner grants it in AWS, or with `houston cluster share` if houston built it (next
|
|
188
|
+
section). houston deletes only clusters it built.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Give a colleague access
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
houston cluster iam-policy engineer > engineer-policy.json # an IAM admin attaches it:
|
|
196
|
+
aws iam put-user-policy --user-name <their-iam-user> --policy-name houston \
|
|
197
|
+
--policy-document file://engineer-policy.json
|
|
198
|
+
houston cluster share support --user <their-iam-user> # you, the cluster's creator
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
`share` prints the two lines they run:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
aws eks update-kubeconfig --name support --region us-east-1
|
|
205
|
+
houston up --version 8.5.1 --name TICKET-5678 --context support --wait
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
They need `acme.email` set, not `cluster.approved_accounts`. `share` works only on a
|
|
209
|
+
cluster houston built.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## When it goes wrong
|
|
214
|
+
|
|
215
|
+
| You see | Do this |
|
|
216
|
+
|---|---|
|
|
217
|
+
| `cluster create` exits 6: "has not been told it may spend" | Run the `houston config set cluster.approved_accounts` line it prints. |
|
|
218
|
+
| `cluster create` exits 3: not signed in, no region, or a tool missing | Fix what it names. Nothing was built. |
|
|
219
|
+
| `cluster create` exits 8: the name already exists | Use it with `--context support`, or pick another name. |
|
|
220
|
+
| `cluster create` exits 7 or was interrupted | It may be billing. Run the `houston cluster delete support --region us-east-1` it names. |
|
|
221
|
+
| No `point your name at:` line, or volumes stay `Pending` | Run `houston cluster prepare support`. |
|
|
222
|
+
| The overview says DNS does not answer | The CNAME is missing, not visible yet, or proxied (step 3). |
|
|
223
|
+
| The certificate is not ready after `up` | Usually DNS. Then run the `describe certificate` line below. |
|
|
224
|
+
| `Unauthorized` from `kubectl` | AWS let you in, Kubernetes did not: you need an access entry (`cluster share`). |
|
|
225
|
+
| `cluster delete` says "nothing to delete" | It is in another region: `houston cluster list`, then `--region`. |
|
|
226
|
+
| `cluster delete` refuses: it holds workspaces | Remove them first (`houston down --volumes`), then delete again. |
|
|
227
|
+
| A disk is left after the cluster is gone | The cluster was deleted with a workspace in it. The delete's `left behind` row has the command. |
|
|
228
|
+
| The overview says a cluster reached its expiry date | A reminder only. `houston cluster keep support --days 7`, or delete it. |
|
|
229
|
+
| A cluster was deleted outside houston | `houston cluster forget support` removes its kubeconfig entry. |
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
KUBECONFIG="${HOUSTON_HOME:-$HOME/.houston}/clusters/support/kubeconfig" \
|
|
233
|
+
kubectl -n houston-ticket-1234 describe certificate ticket-1234-tls
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Reference
|
|
239
|
+
|
|
240
|
+
**AWS credentials.** houston uses whatever the AWS CLI finds on the machine it runs on,
|
|
241
|
+
and never stores a key. The GUI acts as the server's AWS identity for every user and
|
|
242
|
+
never asks for keys; set up SSO, a role or `aws configure` on the server.
|
|
243
|
+
|
|
244
|
+
**What `create` builds.** A new VPC with a NAT gateway (`--subnet <az>=<subnet-id>` uses
|
|
245
|
+
existing subnets), an EKS 1.37 control plane, a managed node group of `t3.large`, the
|
|
246
|
+
EBS driver, then a `gp3` storage class, Traefik (the load balancer), cert-manager and
|
|
247
|
+
metrics-server. The cluster is tagged `houston.io/managed-by=houston`; that tag is what
|
|
248
|
+
lets houston delete it. Files are kept in `~/.houston/clusters/support/`, including a
|
|
249
|
+
`kubeconfig`. Your own `kubectl` context is left where it was.
|
|
250
|
+
|
|
251
|
+
**IAM.** Keep `ec2:RunInstances` and `cloudformation:UpdateTerminationProtection` in the
|
|
252
|
+
policy even though they look unused: without the first the cluster gets no nodes, and
|
|
253
|
+
without the second the delete fails half-way. The operator policy cannot delete EBS
|
|
254
|
+
volumes or change IAM users; an IAM admin does those.
|
|
255
|
+
|
|
256
|
+
**In the GUI.** Clusters → **Set up Amazon EKS** does steps 1 and 2 and shows the DNS
|
|
257
|
+
record. A cluster's own page has **Create a workspace here**, **Public names (DNS)** and
|
|
258
|
+
**Delete cluster…**. **New workspace** lists the EKS cluster under **In AWS**.
|