@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.
Files changed (293) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +108 -15
  3. package/bin/houston +62 -0
  4. package/data/docs/ARCHITECTURE.md +387 -0
  5. package/data/docs/automation.md +107 -0
  6. package/data/docs/e2ee.md +76 -0
  7. package/data/docs/eks.md +258 -0
  8. package/data/docs/gui.md +282 -0
  9. package/data/docs/guide.md +669 -0
  10. package/data/docs/kubernetes.md +138 -0
  11. package/data/docs/troubleshooting.md +193 -0
  12. package/data/docs/upgrading.md +84 -0
  13. package/data/docs/voice.md +253 -0
  14. package/data/iam/engineer-policy.json +11 -0
  15. package/data/iam/engineer-rbac.yaml +42 -0
  16. package/data/iam/operator-policy.json +211 -0
  17. package/data/loadtest/badbot.js +22 -0
  18. package/data/loadtest/common.js +168 -0
  19. package/data/loadtest/custom.js +20 -0
  20. package/data/loadtest/journey.js +58 -0
  21. package/data/loadtest/login.js +18 -0
  22. package/data/loadtest/messages.js +13 -0
  23. package/data/loadtest/mixed.js +39 -0
  24. package/data/loadtest/read.js +12 -0
  25. package/data/loadtest/webhook.js +20 -0
  26. package/data/monitoring/houston-logs.json +98 -0
  27. package/data/monitoring/k6-loadtest.json +610 -0
  28. package/data/monitoring/mongodb-exporter.json +3007 -0
  29. package/data/monitoring/node-exporter-full.json +16114 -0
  30. package/data/monitoring/rocketchat-metrics.json +6471 -0
  31. package/data/presets/airgapped.yaml +16 -0
  32. package/data/presets/default.yaml +9 -0
  33. package/data/seed/avatar-0.png +0 -0
  34. package/data/seed/avatar-1.png +0 -0
  35. package/data/seed/avatar-2.png +0 -0
  36. package/data/seed/avatar-3.png +0 -0
  37. package/data/seed/avatar-4.png +0 -0
  38. package/data/seed/avatar-5.png +0 -0
  39. package/data/seed/avatar-6.png +0 -0
  40. package/data/seed/avatar-7.png +0 -0
  41. package/data/seed/seed-metrics.csv +3 -0
  42. package/data/seed/seed-preview.png +0 -0
  43. package/data/seed/seed-report.pdf +32 -0
  44. package/data/seed/seed-runbook.txt +3 -0
  45. package/data/skill/SKILL.md +399 -0
  46. package/data/versions.yaml +55 -0
  47. package/data/voice/freeswitch/drachtio.xml +52 -0
  48. package/data/voice/freeswitch/public.xml +87 -0
  49. package/data/webui/app.css +2003 -0
  50. package/data/webui/index.html +678 -0
  51. package/data/webui/js/api.js +561 -0
  52. package/data/webui/js/boot.js +44 -0
  53. package/data/webui/js/clusters-tail.js +1377 -0
  54. package/data/webui/js/clusters.js +896 -0
  55. package/data/webui/js/create.js +276 -0
  56. package/data/webui/js/detail.js +507 -0
  57. package/data/webui/js/jobs.js +636 -0
  58. package/data/webui/js/logs.js +634 -0
  59. package/data/webui/js/main.js +14 -0
  60. package/data/webui/js/options.js +408 -0
  61. package/data/webui/js/people.js +438 -0
  62. package/data/webui/js/perf.js +303 -0
  63. package/data/webui/js/render.js +438 -0
  64. package/data/webui/js/shared.js +3 -0
  65. package/data/webui/js/state.js +583 -0
  66. package/data/webui/js/theme.js +123 -0
  67. package/data/webui/js/util.js +584 -0
  68. package/dist/cli/app.js +593 -0
  69. package/dist/cli/capabilities.js +76 -0
  70. package/dist/cli/cell-widths.js +495 -0
  71. package/dist/cli/entry.js +10 -0
  72. package/dist/cli/error-panel.js +492 -0
  73. package/dist/cli/handlers/actor.js +84 -0
  74. package/dist/cli/handlers/https.js +614 -0
  75. package/dist/cli/handlers/prompt.js +299 -0
  76. package/dist/cli/handlers/users.js +226 -0
  77. package/dist/cli/handlers.js +3678 -0
  78. package/dist/cli/help.js +183 -0
  79. package/dist/cli/index.js +15 -0
  80. package/dist/cli/perf.js +810 -0
  81. package/dist/cli/render.js +254 -0
  82. package/dist/cli/serve.js +858 -0
  83. package/dist/cli/spec-data.js +2593 -0
  84. package/dist/cli/spec-types.js +8 -0
  85. package/dist/cli/usage-error.js +520 -0
  86. package/dist/cli/wire.js +70 -0
  87. package/dist/core/audit.js +346 -0
  88. package/dist/core/backup-compat.js +85 -0
  89. package/dist/core/backup.js +1639 -0
  90. package/dist/core/cluster.js +1398 -0
  91. package/dist/core/configimport.js +344 -0
  92. package/dist/core/data.js +267 -0
  93. package/dist/core/database-of.js +82 -0
  94. package/dist/core/diagnose.js +159 -0
  95. package/dist/core/doctor.js +1518 -0
  96. package/dist/core/edge/acme.js +338 -0
  97. package/dist/core/edge/engine.js +500 -0
  98. package/dist/core/edge/networks.js +174 -0
  99. package/dist/core/edge/paths.js +107 -0
  100. package/dist/core/edge/routes.js +251 -0
  101. package/dist/core/edge/routeyml.js +195 -0
  102. package/dist/core/edge/runtime.js +493 -0
  103. package/dist/core/edge/spec.js +305 -0
  104. package/dist/core/edge/types.js +202 -0
  105. package/dist/core/eks-docs.js +135 -0
  106. package/dist/core/eks.js +2240 -0
  107. package/dist/core/envvars.js +562 -0
  108. package/dist/core/eventlog.js +541 -0
  109. package/dist/core/firstrun.js +153 -0
  110. package/dist/core/journal.js +691 -0
  111. package/dist/core/kube/ask.js +231 -0
  112. package/dist/core/kube/capabilities.js +269 -0
  113. package/dist/core/kube/certmanager.js +452 -0
  114. package/dist/core/kube/chart.js +413 -0
  115. package/dist/core/kube/cluster.js +196 -0
  116. package/dist/core/kube/context.js +545 -0
  117. package/dist/core/kube/endpoints.js +448 -0
  118. package/dist/core/kube/exec.js +195 -0
  119. package/dist/core/kube/forward.js +732 -0
  120. package/dist/core/kube/grafana-ingress.js +110 -0
  121. package/dist/core/kube/ingress.js +218 -0
  122. package/dist/core/kube/manifests.js +361 -0
  123. package/dist/core/kube/monitoring.js +768 -0
  124. package/dist/core/kube/names.js +237 -0
  125. package/dist/core/kube/namespace.js +678 -0
  126. package/dist/core/kube/operator.js +941 -0
  127. package/dist/core/kube/probe.js +202 -0
  128. package/dist/core/kube/reachability.js +163 -0
  129. package/dist/core/kube/release.js +439 -0
  130. package/dist/core/kube/replicaset.js +180 -0
  131. package/dist/core/kube/scale.js +398 -0
  132. package/dist/core/kube/status.js +633 -0
  133. package/dist/core/kube/tools.js +238 -0
  134. package/dist/core/kube/transfer.js +173 -0
  135. package/dist/core/kube/workspace.js +423 -0
  136. package/dist/core/lifecycle/admin.js +64 -0
  137. package/dist/core/lifecycle/create-docker.js +1533 -0
  138. package/dist/core/lifecycle/create-k8s.js +939 -0
  139. package/dist/core/lifecycle/destroy.js +339 -0
  140. package/dist/core/lifecycle/inspect.js +635 -0
  141. package/dist/core/lifecycle/naming.js +298 -0
  142. package/dist/core/lifecycle/notes.js +726 -0
  143. package/dist/core/lifecycle/ownership.js +313 -0
  144. package/dist/core/lifecycle/payload.js +401 -0
  145. package/dist/core/lifecycle/ports.js +388 -0
  146. package/dist/core/lifecycle/preconditions.js +367 -0
  147. package/dist/core/lifecycle/pruning.js +551 -0
  148. package/dist/core/lifecycle/ready.js +753 -0
  149. package/dist/core/lifecycle/request.js +525 -0
  150. package/dist/core/lifecycle/seeding.js +281 -0
  151. package/dist/core/lifecycle/sizing.js +392 -0
  152. package/dist/core/lifecycle/state.js +286 -0
  153. package/dist/core/lifecycle/tlsplan.js +704 -0
  154. package/dist/core/lifecycle/types.js +232 -0
  155. package/dist/core/loadtest.js +995 -0
  156. package/dist/core/migrate.js +612 -0
  157. package/dist/core/monitor.js +494 -0
  158. package/dist/core/postready.js +969 -0
  159. package/dist/core/promote.js +804 -0
  160. package/dist/core/rcapi.js +1285 -0
  161. package/dist/core/recovery.js +75 -0
  162. package/dist/core/runner/engine.js +394 -0
  163. package/dist/core/runner/host.js +298 -0
  164. package/dist/core/runner/locks.js +129 -0
  165. package/dist/core/runner/paths.js +173 -0
  166. package/dist/core/runner/ports.js +172 -0
  167. package/dist/core/runner/queries.js +612 -0
  168. package/dist/core/runner/record.js +563 -0
  169. package/dist/core/scaleseed.js +271 -0
  170. package/dist/core/seed-db.js +208 -0
  171. package/dist/core/sessions.js +472 -0
  172. package/dist/core/skill.js +326 -0
  173. package/dist/core/sso-identities.js +172 -0
  174. package/dist/core/sso.js +703 -0
  175. package/dist/core/tls-local.js +311 -0
  176. package/dist/core/tls.js +878 -0
  177. package/dist/core/topology.js +482 -0
  178. package/dist/core/upgrade.js +868 -0
  179. package/dist/core/users.js +739 -0
  180. package/dist/lib/audit.js +100 -0
  181. package/dist/lib/close-matches.js +238 -0
  182. package/dist/lib/compose.js +672 -0
  183. package/dist/lib/config.js +1398 -0
  184. package/dist/lib/context.js +18 -0
  185. package/dist/lib/errors.js +305 -0
  186. package/dist/lib/events.js +208 -0
  187. package/dist/lib/float-text.js +126 -0
  188. package/dist/lib/format.js +1320 -0
  189. package/dist/lib/home.js +325 -0
  190. package/dist/lib/journal.js +122 -0
  191. package/dist/lib/json-text.js +733 -0
  192. package/dist/lib/jsonout.js +382 -0
  193. package/dist/lib/lock.js +516 -0
  194. package/dist/lib/login-name.js +202 -0
  195. package/dist/lib/map-limit.js +29 -0
  196. package/dist/lib/mkdir-parents.js +90 -0
  197. package/dist/lib/mongo-kernel.js +67 -0
  198. package/dist/lib/monitoring.js +492 -0
  199. package/dist/lib/platform-name.js +59 -0
  200. package/dist/lib/presets/common.js +390 -0
  201. package/dist/lib/presets/composite.js +326 -0
  202. package/dist/lib/presets/e2ee.js +143 -0
  203. package/dist/lib/presets/email.js +172 -0
  204. package/dist/lib/presets/guides.js +27 -0
  205. package/dist/lib/presets/index.js +490 -0
  206. package/dist/lib/presets/keycloak.js +369 -0
  207. package/dist/lib/presets/ldap.js +1285 -0
  208. package/dist/lib/presets/livechat.js +220 -0
  209. package/dist/lib/presets/multi-instance.js +124 -0
  210. package/dist/lib/presets/oidc.js +161 -0
  211. package/dist/lib/presets/public.js +496 -0
  212. package/dist/lib/presets/registry.js +64 -0
  213. package/dist/lib/presets/s3-minio.js +300 -0
  214. package/dist/lib/presets/saml.js +149 -0
  215. package/dist/lib/presets/scenario.js +51 -0
  216. package/dist/lib/presets/types.js +86 -0
  217. package/dist/lib/presets/voice-pbx.js +320 -0
  218. package/dist/lib/presets/voice.js +345 -0
  219. package/dist/lib/presets/webhooks.js +182 -0
  220. package/dist/lib/redact.js +106 -0
  221. package/dist/lib/seed-options.js +68 -0
  222. package/dist/lib/seed-profiles.js +59 -0
  223. package/dist/lib/targz.js +1383 -0
  224. package/dist/lib/teammode.js +25 -0
  225. package/dist/lib/tempdir.js +162 -0
  226. package/dist/lib/unicode-tables.js +2335 -0
  227. package/dist/lib/version-spec.js +357 -0
  228. package/dist/lib/versions.js +463 -0
  229. package/dist/lib/yaml-dump.js +1361 -0
  230. package/dist/perf/baseline.js +168 -0
  231. package/dist/perf/constrain.js +296 -0
  232. package/dist/perf/k6.js +235 -0
  233. package/dist/perf/mongoprof.js +171 -0
  234. package/dist/perf/rcmetrics.js +178 -0
  235. package/dist/perf/report.js +386 -0
  236. package/dist/perf/resources.js +224 -0
  237. package/dist/perf/slo.js +111 -0
  238. package/dist/perf/timeline.js +187 -0
  239. package/dist/perf/timings.js +85 -0
  240. package/dist/perf/verdict.js +201 -0
  241. package/dist/seams/aws-cli.js +126 -0
  242. package/dist/seams/docker-cli.js +280 -0
  243. package/dist/seams/exec.js +861 -0
  244. package/dist/seams/fs/lock.js +528 -0
  245. package/dist/seams/kubectl.js +83 -0
  246. package/dist/seams/rc-http.js +921 -0
  247. package/dist/seed/apply.js +190 -0
  248. package/dist/seed/assets.js +76 -0
  249. package/dist/seed/check.js +391 -0
  250. package/dist/seed/client.js +172 -0
  251. package/dist/seed/executor.js +726 -0
  252. package/dist/seed/history.js +281 -0
  253. package/dist/seed/kinds.js +91 -0
  254. package/dist/seed/plan.js +432 -0
  255. package/dist/seed/receipt.js +339 -0
  256. package/dist/seed/repairs.js +75 -0
  257. package/dist/seed/verification.js +363 -0
  258. package/dist/seed/wording.js +248 -0
  259. package/dist/web/app.js +326 -0
  260. package/dist/web/jobs.js +510 -0
  261. package/dist/web/route-deps.js +211 -0
  262. package/dist/web/route-table.js +213 -0
  263. package/dist/web/routes/backup.js +244 -0
  264. package/dist/web/routes/clusters.js +303 -0
  265. package/dist/web/routes/data.js +187 -0
  266. package/dist/web/routes/edge.js +82 -0
  267. package/dist/web/routes/index.js +63 -0
  268. package/dist/web/routes/jobs.js +95 -0
  269. package/dist/web/routes/logs.js +297 -0
  270. package/dist/web/routes/meta.js +191 -0
  271. package/dist/web/routes/people.js +151 -0
  272. package/dist/web/routes/perf.js +95 -0
  273. package/dist/web/routes/repros.js +550 -0
  274. package/dist/web/routes/session.js +361 -0
  275. package/dist/web/routes/spa.js +198 -0
  276. package/dist/web/security.js +475 -0
  277. package/dist/web/signin.js +246 -0
  278. package/package.json +67 -32
  279. package/.eslintrc +0 -94
  280. package/.swcrc +0 -18
  281. package/dist/bin.js +0 -3
  282. package/dist/cli.js +0 -184
  283. package/dist/commands/createBranch.js +0 -194
  284. package/dist/outputCI.js +0 -59
  285. package/src/bin.js +0 -4
  286. package/src/cli.ts +0 -25
  287. package/src/commands/createBranch.ts +0 -28
  288. package/src/outputCI.ts +0 -12
  289. package/src-old/logs.js +0 -323
  290. package/src-old/md.js +0 -191
  291. package/src-old/release-table.js +0 -60
  292. package/src-old/set-version.js +0 -614
  293. 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.**
@@ -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**.