@rocket.chat/houston 0.27.0-next.3 → 2.1.9
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 +109 -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 +642 -0
- package/data/docs/kubernetes.md +138 -0
- package/data/docs/loadtest.md +264 -0
- package/data/docs/troubleshooting.md +203 -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 +170 -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 +57 -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 +3694 -0
- package/dist/cli/help.js +183 -0
- package/dist/cli/index.js +15 -0
- package/dist/cli/perf.js +814 -0
- package/dist/cli/render.js +254 -0
- package/dist/cli/serve.js +858 -0
- package/dist/cli/spec-data.js +2599 -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 +345 -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 +694 -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 +1549 -0
- package/dist/core/lifecycle/create-k8s.js +960 -0
- package/dist/core/lifecycle/destroy.js +339 -0
- package/dist/core/lifecycle/inspect.js +636 -0
- package/dist/core/lifecycle/naming.js +298 -0
- package/dist/core/lifecycle/notes.js +862 -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 +818 -0
- package/dist/core/lifecycle/request.js +510 -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 +1051 -0
- package/dist/core/migrate.js +612 -0
- package/dist/core/monitor.js +494 -0
- package/dist/core/postready.js +976 -0
- package/dist/core/promote.js +804 -0
- package/dist/core/rcapi.js +1336 -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 +877 -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 +371 -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 +299 -0
- package/dist/perf/k6.js +235 -0
- package/dist/perf/mongoprof.js +171 -0
- package/dist/perf/rcmetrics.js +191 -0
- package/dist/perf/report.js +386 -0
- package/dist/perf/resources.js +236 -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 +70 -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,138 @@
|
|
|
1
|
+
# Workspaces on Kubernetes
|
|
2
|
+
|
|
3
|
+
houston can run a workspace on Kubernetes with the Rocket.Chat Helm chart, including
|
|
4
|
+
microservices. Use it when a ticket is about Kubernetes, the chart or microservices; for
|
|
5
|
+
everything else Docker is faster. For Amazon EKS, read [Rocket.Chat on EKS](eks.md):
|
|
6
|
+
a cloud cluster costs money, and `up` never creates one.
|
|
7
|
+
|
|
8
|
+
**Contents:** [Before you start](#before-you-start) ·
|
|
9
|
+
[Start a workspace](#start-a-workspace) · [Which cluster it uses](#which-cluster-it-uses) ·
|
|
10
|
+
[What Kubernetes refuses](#what-kubernetes-refuses) ·
|
|
11
|
+
[HTTPS on a cluster](#https-on-a-cluster) · [Looking inside](#looking-inside) ·
|
|
12
|
+
[Removing it](#removing-it)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Before you start
|
|
17
|
+
|
|
18
|
+
On top of the [README](../../README.md#before-you-start) list:
|
|
19
|
+
|
|
20
|
+
- `kubectl` and `helm` on your `PATH`.
|
|
21
|
+
- **Either** [kind](https://kind.sigs.k8s.io/), so houston can make its own local
|
|
22
|
+
cluster (about 600 MB), **or** a cluster your `kubectl` already reaches, such as
|
|
23
|
+
[k3s](https://k3s.io/), minikube or Docker Desktop.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
houston doctor # names the cluster it will use, and its storage, ingress, load balancer and metrics
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Start a workspace
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
houston up --version 8.5.1 --name ticket-1234 --runtime kubernetes --wait # microservices
|
|
33
|
+
houston up --version 8.5.1 --name ticket-1234 --runtime kubernetes --deployment monolith --wait # one Rocket.Chat pod
|
|
34
|
+
houston info --name ticket-1234 # its address, cluster and namespace
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
| `--runtime` | `--deployment` | What you get |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| `docker` (default) | `monolith` (default) | Rocket.Chat and MongoDB, two containers |
|
|
40
|
+
| `docker` | `multi-instance` | several Rocket.Chat instances behind a load balancer, with NATS |
|
|
41
|
+
| `kubernetes` | `microservices` (default) | the Helm chart, about 9 pods |
|
|
42
|
+
| `kubernetes` | `monolith` | the Helm chart, about 5 pods |
|
|
43
|
+
|
|
44
|
+
- Microservices are an Enterprise feature: without a license, Rocket.Chat replicas after
|
|
45
|
+
the first stop. `info` says so; add a license with `--license` or in Rocket.Chat.
|
|
46
|
+
- Each workspace is a namespace, `houston-<name>`, reached on `http://localhost:<port>`
|
|
47
|
+
through a port-forward houston starts.
|
|
48
|
+
- `--mongo-operator` runs MongoDB under the community operator, with authentication
|
|
49
|
+
(MongoDB 6.0 or newer). Without it MongoDB has no authentication.
|
|
50
|
+
- `--replicas` sets how many Rocket.Chat instances run.
|
|
51
|
+
- houston never changes the context your own `kubectl` uses.
|
|
52
|
+
|
|
53
|
+
## Which cluster it uses
|
|
54
|
+
|
|
55
|
+
- **`--context <name>`** picks a cluster from your kubeconfig and implies Kubernetes. It
|
|
56
|
+
never creates one. On EKS, a cluster's `--zone` names each workspace `<name>.<zone>`.
|
|
57
|
+
- **`houston config set kubernetes.context <name>`** sets the default for
|
|
58
|
+
`--runtime kubernetes`.
|
|
59
|
+
- **With neither:** houston's own kind cluster if kind is installed, else whatever your
|
|
60
|
+
`kubectl` points at. With both present, kind wins; pass `--context` for the other.
|
|
61
|
+
|
|
62
|
+
## What Kubernetes refuses
|
|
63
|
+
|
|
64
|
+
Each refusal says why and what to do instead.
|
|
65
|
+
|
|
66
|
+
| Refused | Instead |
|
|
67
|
+
|---|---|
|
|
68
|
+
| `up --fresh` | `houston down --name <name> --volumes`, then `up` again |
|
|
69
|
+
| `loadtest`, `capacity` | load-test a Docker workspace on the same version |
|
|
70
|
+
| `env --set`, `--setting`, `--unset` | the `helm upgrade` the refusal prints, or `houston api` for a setting |
|
|
71
|
+
| `up --env` or `--setting` naming a variable the chart writes itself (`ROOT_URL`, `MONGO_URL`, `REG_TOKEN`, `DEPLOY_*`, Prometheus and microservice variables) | `--root-url` or `--domain`, `--reg-token`; anything else goes through |
|
|
72
|
+
| `seed --scale` | `houston seed --name <name>` |
|
|
73
|
+
| `--preset voice --set sip_integration=on` (and `pbx=on`) | a Docker workspace; `--preset voice` alone, calls between users, works on Kubernetes |
|
|
74
|
+
| `up --https` on a cluster not on this machine | `--domain`, below |
|
|
75
|
+
| Rocket.Chat below 8.0.0 on an arm64 node (such as Graviton) | an amd64 node: those images are amd64 only |
|
|
76
|
+
| Rocket.Chat below 3.7.2 | Docker: no usable Helm chart exists |
|
|
77
|
+
|
|
78
|
+
`up --env` and `--setting` work on both runtimes, and a re-up, `backup` and `restore --new`
|
|
79
|
+
keep them. `logs`, `env` (reading), `upgrade`, `backup`, `restore`, `seed`, `monitor`, `api`, `pat`,
|
|
80
|
+
`token` and `stats` work on both runtimes (`stats` needs metrics-server and says how to
|
|
81
|
+
install it).
|
|
82
|
+
|
|
83
|
+
**LDAP users after a re-up:** the OpenLDAP directory keeps its entries inside its pod and reads
|
|
84
|
+
its users once, when the pod starts. A re-up that changes them (`--set users=…`, `groups=on`,
|
|
85
|
+
another `domain`) restarts the directory, so it serves the new users; entries you added by hand
|
|
86
|
+
in phpLDAPadmin are not kept, and Rocket.Chat's accounts stay linked (they are matched by
|
|
87
|
+
`uid`). A workspace an earlier houston made with up to 500 users and any of those set restarts
|
|
88
|
+
its directory once, on its first `up` with this release. An Active Directory workspace
|
|
89
|
+
(`directory=ad`) is unchanged.
|
|
90
|
+
|
|
91
|
+
**Monitoring:** `houston monitor --name ticket-1234` (or `up --monitor`) installs one
|
|
92
|
+
shared Grafana in `houston-system`. It opens at `https://<workspace-host>/grafana/` for an
|
|
93
|
+
HTTPS workspace, else `http://localhost:5050/grafana/` (`admin/admin`), or the next free
|
|
94
|
+
port when another monitored workspace's forward holds 5050. That Grafana's own absolute
|
|
95
|
+
links (sign-in redirects, share links) name 5050. The GUI's
|
|
96
|
+
**Logs in Grafana (Loki)** link opens its logs dashboard. `houston monitor --name
|
|
97
|
+
ticket-1234 --off` detaches it.
|
|
98
|
+
|
|
99
|
+
## HTTPS on a cluster
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
houston up --version 8.5.1 --name ticket-1234 --runtime kubernetes \
|
|
103
|
+
--domain t1234.example.com --email you@example.com --wait
|
|
104
|
+
houston tls-status --name ticket-1234
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
- Point the name at the cluster's ingress **before** `up`: Let's Encrypt checks it from
|
|
108
|
+
outside.
|
|
109
|
+
- For a minute or three the ingress may serve a placeholder certificate, and `tls-status`
|
|
110
|
+
exits 1. Run it again; if it persists, the certificate order is stuck.
|
|
111
|
+
- With several ingress controllers, houston uses the default one and says which;
|
|
112
|
+
`--ingress-class nginx` picks another.
|
|
113
|
+
- A `--domain` workspace gets a generated admin password; `houston info` shows it.
|
|
114
|
+
|
|
115
|
+
## Looking inside
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
export KUBECONFIG="${HOUSTON_HOME:-$HOME/.houston}/clients/kubernetes/config" # only for houston's kind cluster
|
|
119
|
+
kubectl -n houston-ticket-1234 get pods
|
|
120
|
+
kubectl -n houston-ticket-1234 describe certificate ticket-1234-tls
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
With your own cluster, your usual `kubectl` works. The GUI's workspace page lists the
|
|
124
|
+
pods and why any cannot start.
|
|
125
|
+
|
|
126
|
+
## Removing it
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
houston down --name ticket-1234 --volumes # the namespace and its data
|
|
130
|
+
houston prune # also houston's own kind cluster, once it is empty
|
|
131
|
+
houston prune --orphans # namespaces houston owns that no record lists
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
The shared cluster stays, because other workspaces use it. `prune` deletes a kind cluster
|
|
135
|
+
only if houston created it; a cluster you brought is never deleted. The shared MongoDB
|
|
136
|
+
operator and monitoring go once nothing needs them, but their CRDs stay: deleting a CRD
|
|
137
|
+
deletes every resource of that kind in the cluster. The ingress controller and cert-manager
|
|
138
|
+
that `--https` or `--domain` installed also stay, as the cluster's own infrastructure.
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# Load testing and capacity
|
|
2
|
+
|
|
3
|
+
Two commands show how a workspace behaves under load, on the customer's exact version:
|
|
4
|
+
|
|
5
|
+
- **`houston loadtest`** puts a load on the workspace for a set time. It reports how fast
|
|
6
|
+
Rocket.Chat answered, how many requests failed, and why it slowed down.
|
|
7
|
+
- **`houston capacity`** raises the load step by step until the workspace misses a target,
|
|
8
|
+
and tells you how much load it held.
|
|
9
|
+
|
|
10
|
+
Both work on **Docker workspaces only**, from the terminal or from the GUI.
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
houston up --name ticket-1234 --version 8.9.1 --wait
|
|
14
|
+
houston seed --name ticket-1234 # users for the load to log in as
|
|
15
|
+
houston loadtest --name ticket-1234 --scenario journey --vus 20 --duration 30s
|
|
16
|
+
houston capacity --name ticket-1234
|
|
17
|
+
houston down --name ticket-1234 --volumes
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Contents:** [How it works](#how-it-works) · [Scenarios](#scenarios) ·
|
|
21
|
+
[loadtest](#loadtest) · [Reading the result](#reading-the-result) · [capacity](#capacity) ·
|
|
22
|
+
[In the GUI](#in-the-gui) · [Good to know](#good-to-know)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## How it works
|
|
27
|
+
|
|
28
|
+
1. houston starts [k6](https://k6.io), a load-testing tool, in a temporary container on the
|
|
29
|
+
workspace's own Docker network, so the load reaches Rocket.Chat directly.
|
|
30
|
+
2. k6 runs a number of **VUs** (virtual users). Each VU repeats the scenario in a loop,
|
|
31
|
+
without pausing, for the whole run. A VU is a k6 worker, not a Rocket.Chat account, and it
|
|
32
|
+
sends far more requests than one person in a browser does.
|
|
33
|
+
3. The VUs log in as the users `houston seed` made, so the load comes from several accounts.
|
|
34
|
+
`houston seed` makes 5 users, and `--profile standard` makes 20. With no seeded users,
|
|
35
|
+
every request uses the admin account.
|
|
36
|
+
4. While the load runs, houston watches Rocket.Chat and MongoDB from the inside.
|
|
37
|
+
5. At the end it prints the result and a short verdict, then puts the workspace back.
|
|
38
|
+
|
|
39
|
+
The first run downloads the k6 image, `grafana/k6`.
|
|
40
|
+
|
|
41
|
+
### What a run changes, and puts back
|
|
42
|
+
|
|
43
|
+
| During the run | Why | Afterwards |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| The API rate limiter is off | otherwise Rocket.Chat refuses the load (429) and you measure the limiter | back on |
|
|
46
|
+
| Prometheus metrics are on | to read Rocket.Chat's event-loop lag | as it was |
|
|
47
|
+
| The MongoDB profiler is on | to catch queries slower than `--slowms` | as it was |
|
|
48
|
+
| CPU and RAM caps, with `--constrain` | to act like the customer's server | as they were (see below) |
|
|
49
|
+
|
|
50
|
+
Docker cannot remove a cap, so a service that had none gets this machine's whole CPU and
|
|
51
|
+
RAM afterwards, which works out the same.
|
|
52
|
+
|
|
53
|
+
They go back even when the run fails. If houston is stopped before the run ends, by Ctrl-C
|
|
54
|
+
or by being killed, run `houston doctor`: it lists anything left changed, and `houston
|
|
55
|
+
serve` puts it back when it starts.
|
|
56
|
+
|
|
57
|
+
Some things stay in the workspace: the messages the writing scenarios post in `#general`,
|
|
58
|
+
an access token named `houston-loadtest` on the admin account, and, after the `webhook`
|
|
59
|
+
scenario, an incoming integration named `houston-loadtest-hook`.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Scenarios
|
|
64
|
+
|
|
65
|
+
| `--scenario` | Each VU, in a loop | Use it when |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| `messages` (default) | posts a message to `#general` | sending messages is slow |
|
|
68
|
+
| `read` | reads the last 20 messages of `#general` | opening rooms is slow |
|
|
69
|
+
| `login` | logs in | logins are slow, or many people log in at once |
|
|
70
|
+
| `mixed` | reads (60%), posts (30%) or logs in and straight out again (10%) | you want a general, realistic load |
|
|
71
|
+
| `journey` | logs in, lists its rooms, opens `#general`, posts, syncs; each step timed | you need to know **which part** is slow |
|
|
72
|
+
| `webhook` | posts an alert through an incoming webhook houston creates | a monitoring system floods a channel |
|
|
73
|
+
| `badbot` | reads 100 messages, lists users, lists channels, with no paging | a customer's script or bot hammers the server |
|
|
74
|
+
| `custom` | calls the one endpoint you name with `--endpoint` | the customer has one slow API call |
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## loadtest
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# 20 VUs for 30 seconds
|
|
82
|
+
houston loadtest --name ticket-1234 --scenario journey --vus 20 --duration 30s
|
|
83
|
+
|
|
84
|
+
# a pass/fail target: exit 1 when it is missed, so it works in CI
|
|
85
|
+
houston loadtest --name ticket-1234 --scenario journey --slo "p95=500ms,error=1%"
|
|
86
|
+
|
|
87
|
+
# the customer's own slow call
|
|
88
|
+
houston loadtest --name ticket-1234 --scenario custom --endpoint "GET /api/v1/channels.list?count=100"
|
|
89
|
+
|
|
90
|
+
# on the customer's hardware: 2 CPUs and 2 GB for Rocket.Chat, 1 CPU and 1 GB for MongoDB
|
|
91
|
+
houston loadtest --name ticket-1234 --scenario messages --constrain "rc=2cpu/2g,mongo=1cpu/1g"
|
|
92
|
+
|
|
93
|
+
# a sudden burst: 10 VUs, then 100, then 10 again; says how long it took to recover
|
|
94
|
+
houston loadtest --name ticket-1234 --scenario read --spike 10:100 --duration 60s
|
|
95
|
+
|
|
96
|
+
# before and after a fix
|
|
97
|
+
houston loadtest --name ticket-1234 --scenario journey --save before-fix
|
|
98
|
+
houston loadtest --name ticket-1234 --scenario journey --compare before-fix
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
| Option | What it does | Default |
|
|
102
|
+
|---|---|---|
|
|
103
|
+
| `--scenario` | the load to run ([Scenarios](#scenarios)) | `messages` |
|
|
104
|
+
| `--vus` | how many VUs run at once | `10` |
|
|
105
|
+
| `--duration` | how long the run lasts: `30s`, `2m` | `30s` |
|
|
106
|
+
| `--users` | how many seeded users the VUs log in as; `0` is the admin only | `10` |
|
|
107
|
+
| `--ramp 10:200` | grow from 10 to 200 VUs over the run, instead of a fixed `--vus` | |
|
|
108
|
+
| `--spike 10:100` | 10 VUs, then 100, then 10, for a third of the run each | |
|
|
109
|
+
| `--endpoint`, `--body` | for `custom`: the call, such as `"GET /api/v1/me"`, and a JSON body for POST | |
|
|
110
|
+
| `--slo` | the target the run must meet (below); missing it exits 1 | |
|
|
111
|
+
| `--constrain` | CPU and RAM caps for the run (below) | |
|
|
112
|
+
| `--diag`, `--no-diag` | the inside view: event-loop lag, slow MongoDB queries, the verdict | on |
|
|
113
|
+
| `--slowms` | a MongoDB query slower than this many ms counts as slow | `100` |
|
|
114
|
+
| `--stats` | also report each container's CPU and RAM | |
|
|
115
|
+
| `--live` | stream the numbers to Grafana during the run; run `houston monitor` first | |
|
|
116
|
+
| `--save NAME`, `--compare NAME` | keep this run under a name; compare a later run with it | |
|
|
117
|
+
| `--report`, `--report-path` | also write a Markdown report to attach to a ticket | |
|
|
118
|
+
| `--json` | print the result as JSON, for scripts | |
|
|
119
|
+
|
|
120
|
+
**`--slo`** is a list of rules joined by commas, such as `p95=500ms,error=1%,rps=100`.
|
|
121
|
+
`p50` `p90` `p95` `p99` `avg` `min` `max` are the longest a response may take; `error` is
|
|
122
|
+
the most requests that may fail, in percent; `rps` is the fewest requests per second.
|
|
123
|
+
|
|
124
|
+
**`--constrain`** caps services by name: `rc` (every Rocket.Chat container), `mongo`, or
|
|
125
|
+
any other service of the workspace, with CPUs, memory or both: `rc=2cpu/2g`,
|
|
126
|
+
`mongo=0.5cpu/512m`. A memory cap below what a service already uses is refused, because the
|
|
127
|
+
service would restart and the run would measure the restart.
|
|
128
|
+
|
|
129
|
+
### Reading the result
|
|
130
|
+
|
|
131
|
+
The `journey` example above, on Rocket.Chat 8.9.1 on a 4-CPU test machine (k6's own
|
|
132
|
+
progress lines left out):
|
|
133
|
+
|
|
134
|
+
```text
|
|
135
|
+
Load test: journey @ 20 VUs for 30s as 5 seeded users -> http://rocketchat:3000 (via k6 on 'ticket-1234''s network)
|
|
136
|
+
|
|
137
|
+
+- loadtest journey (20 VUs / 30s, 5 users) --------------+
|
|
138
|
+
| throughput 209.4 req/s (6340 requests) |
|
|
139
|
+
| latency p50 57ms p90 205ms p95 246ms p99 380ms |
|
|
140
|
+
| avg 95ms min 2ms max 519ms |
|
|
141
|
+
| errors 0.00% checks 100% ok |
|
|
142
|
+
| responses 2xx 6340 |
|
|
143
|
+
+---------------------------------------------------------+
|
|
144
|
+
|
|
145
|
+
Per-step latency:
|
|
146
|
+
step count p50 p95 p99
|
|
147
|
+
login 1268 157ms 272ms 336ms
|
|
148
|
+
rooms 1268 29ms 69ms 101ms
|
|
149
|
+
open 1268 51ms 115ms 152ms
|
|
150
|
+
post 1268 173ms 375ms 432ms
|
|
151
|
+
sync 1268 22ms 54ms 79ms
|
|
152
|
+
|
|
153
|
+
p95 over time 171ms |::... .*#- ... | 417ms (16 buckets of 2s)
|
|
154
|
+
|
|
155
|
+
RC internals during the test:
|
|
156
|
+
rocketchat event-loop lag peak 51ms / p99 40ms heap 895MB ddp users 0
|
|
157
|
+
|
|
158
|
+
Verdict:
|
|
159
|
+
- No saturation signals: p95 246ms at 209.4 req/s, 0.00% errors - the workspace has
|
|
160
|
+
headroom at this load.
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
- **throughput**: requests answered per second, by all VUs together.
|
|
164
|
+
- **latency**: how long requests took. **p95** means 95 of every 100 requests were faster
|
|
165
|
+
than this. It is the number to quote, because an average hides the slow requests.
|
|
166
|
+
- **errors** and **responses**: the share of requests that failed, and their status codes.
|
|
167
|
+
429 is a rate limit; 5xx is Rocket.Chat failing.
|
|
168
|
+
- **Per-step latency** (`journey`, `mixed`): the time of each step. Here `post` and `login`
|
|
169
|
+
are the slow ones.
|
|
170
|
+
- **p95 over time**: whether it stayed steady or got worse as the run went on.
|
|
171
|
+
- **RC internals**: Rocket.Chat's event-loop lag. houston calls it degraded when it averages
|
|
172
|
+
over 100 ms, and saturated when it peaks over 500 ms.
|
|
173
|
+
- **Verdict**: what the inside view found, one sentence each.
|
|
174
|
+
|
|
175
|
+
| The verdict says | It means |
|
|
176
|
+
|---|---|
|
|
177
|
+
| RC event loop saturated, or degraded | Rocket.Chat's Node.js process is out of CPU. More CPU or more instances help. |
|
|
178
|
+
| MongoDB ran N collection scans (COLLSCAN) | a query read a whole collection: likely a missing index. |
|
|
179
|
+
| N MongoDB queries exceeded the slow threshold | the slowest query is named, with how MongoDB ran it. |
|
|
180
|
+
| MongoDB, or Rocket.Chat, was the hot container | which of the two used the CPU. |
|
|
181
|
+
| High client latency without RC event-loop saturation | requests wait somewhere else: a CPU cap, MongoDB, or connections. |
|
|
182
|
+
| N% of requests failed: Nx 429, Nx 5xx, Nx 4xx, starting ~Ns into the run | how many failed, of which kind, and from when. 5xx is the server failing. 4xx in `journey` above 50 VUs per seeded user is the session limit (see [Good to know](#good-to-know)), not the server. |
|
|
183
|
+
| Slow spike recovery, or did not recover | after a burst, Rocket.Chat took long to catch up, or never did. |
|
|
184
|
+
| RAM grew ~N MB/h | with `--stats` on a long run: a possible memory leak. |
|
|
185
|
+
| No saturation signals | the workspace coped with this load. |
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## capacity
|
|
190
|
+
|
|
191
|
+
`capacity` finds how much load the workspace holds. It runs the scenario with 10 VUs, then
|
|
192
|
+
20, 40, 80 and so on, for 20 seconds each, until a step misses the target. Then it tries two
|
|
193
|
+
loads in between to narrow it down.
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
houston capacity --name ticket-1234
|
|
197
|
+
houston capacity --name ticket-1234 --slo "p95=300ms,error=1%" --constrain "rc=2cpu/2g" --max 160 --report
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
The first example, on the same machine (k6's progress lines left out):
|
|
201
|
+
|
|
202
|
+
```text
|
|
203
|
+
Capacity search: journey as 5 seeded users, SLO p95=500ms,error=2% (steps of 20s)
|
|
204
|
+
10 VUs 217.2 req/s p95 119ms err 0.00% PASS
|
|
205
|
+
20 VUs 231.5 req/s p95 212ms err 0.00% PASS
|
|
206
|
+
40 VUs 232.9 req/s p95 416ms err 0.00% PASS
|
|
207
|
+
80 VUs 215.6 req/s p95 937ms err 0.00% FAIL (p95 <= 500ms (actual 937ms))
|
|
208
|
+
60 VUs (bisect) 223.4 req/s p95 699ms err 0.00% FAIL (p95 <= 500ms (actual 699ms))
|
|
209
|
+
50 VUs (bisect) 236.0 req/s p95 512ms err 0.00% FAIL (p95 <= 500ms (actual 512ms))
|
|
210
|
+
|
|
211
|
+
Capacity: ~40 concurrent VUs (holds at 40, breaks at 50)
|
|
212
|
+
why it broke: at 50 VUs: p95 <= 500ms (actual 512ms)
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
The answer is the last load that met the target, the first that missed it, and why it
|
|
216
|
+
broke. Here throughput stopped growing at about 230 req/s while p95 kept rising: past that
|
|
217
|
+
point, more VUs only wait longer. Missing the target is the answer, not a failure, so
|
|
218
|
+
`capacity` exits 0. If no step misses it, the answer is `holds the SLO up to N VUs (never
|
|
219
|
+
breached; raise --max to push further)`.
|
|
220
|
+
|
|
221
|
+
| Option | What it does | Default |
|
|
222
|
+
|---|---|---|
|
|
223
|
+
| `--scenario` | `journey`, `messages`, `read`, `mixed`, `login` or `badbot` | `journey` |
|
|
224
|
+
| `--slo` | the target that counts as holding | `p95=500ms,error=2%` |
|
|
225
|
+
| `--start` | the first step's VUs | `10` |
|
|
226
|
+
| `--max` | stop doubling past this many VUs | `640` |
|
|
227
|
+
| `--step-duration` | how long each step runs | `20s` |
|
|
228
|
+
| `--users`, `--constrain`, `--report`, `--report-path`, `--json` | as for `loadtest` | |
|
|
229
|
+
|
|
230
|
+
**The number is VUs, not people.** A VU sends requests without a pause, so it is far more
|
|
231
|
+
traffic than one person. Use the number to compare: two versions, 2 CPUs against 4, before
|
|
232
|
+
and after a fix. It does not say how many people the customer's server can take.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## In the GUI
|
|
237
|
+
|
|
238
|
+
On a running Docker workspace, **Run a load test** and **Find capacity** are among the
|
|
239
|
+
workspace's actions, for admins, and for members on their own workspaces. The job log shows the progress, and the result
|
|
240
|
+
when the run ends.
|
|
241
|
+
|
|
242
|
+
The GUI offers every scenario except `webhook` and `custom`. Ramp, spike, save and
|
|
243
|
+
compare, and the report are in the terminal only.
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Good to know
|
|
248
|
+
|
|
249
|
+
- **Docker only.** On Kubernetes the load would pass through one `kubectl port-forward`,
|
|
250
|
+
which gives out long before Rocket.Chat does, so houston refuses. Reproduce on a Docker
|
|
251
|
+
workspace with the same version.
|
|
252
|
+
- **The numbers are this machine's**, not the customer's server. `--constrain` brings the
|
|
253
|
+
CPU and RAM closer; disks, network and the amount of data still differ.
|
|
254
|
+
- **A customer's amount of data:** `houston seed --scale` fills MongoDB in bulk
|
|
255
|
+
([Sample data](guide.md#sample-data)). Those users cannot log in, so also run a plain
|
|
256
|
+
`houston seed` for the VUs.
|
|
257
|
+
- **`journey` with many VUs:** each VU logs in for itself, and Rocket.Chat keeps 50
|
|
258
|
+
sessions per user. Keep the VUs (or `capacity`'s `--max`) at or under 50 per seeded user;
|
|
259
|
+
above that, some steps fail with 4xx that are not the server's, and houston warns. For
|
|
260
|
+
more, `houston seed --profile standard` makes 20 users: use them with `--users 20`.
|
|
261
|
+
- **Rocket.Chat 6.x and runs back to back:** 6.x limits how fast the run's tokens can be
|
|
262
|
+
made, so a run started right after another can be refused with "rate-limiting token
|
|
263
|
+
creation … try again then". Wait a minute and run it again.
|
|
264
|
+
- **Files:** reports go to `~/.houston/reports/`, saved runs to `~/.houston/loadtests/`.
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
Find the symptom, then the fix. **Start with `houston doctor`:** it checks the machine and
|
|
4
|
+
names most of what follows. On EKS, see [the EKS guide's list](eks.md#when-it-goes-wrong);
|
|
5
|
+
for what Kubernetes refuses, see [the Kubernetes guide](kubernetes.md#what-kubernetes-refuses).
|
|
6
|
+
|
|
7
|
+
**Contents:** [Installing](#installing) · [A workspace will not start](#a-workspace-will-not-start) ·
|
|
8
|
+
[Kubernetes](#kubernetes) · [HTTPS and certificates](#https-and-certificates) ·
|
|
9
|
+
[Left running](#left-running) · [The web GUI](#the-web-gui) ·
|
|
10
|
+
[Engines and images](#engines-and-images)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Installing
|
|
15
|
+
|
|
16
|
+
| You see | Do this |
|
|
17
|
+
|---|---|
|
|
18
|
+
| `houston --version` prints someone else's version | Another npm package also installs `houston`. `command -v houston` shows which runs; uninstall the other or reorder your `PATH`. |
|
|
19
|
+
| An old houston still runs after installing 2.x | It was installed with pipx. See [Upgrading](upgrading.md#replacing-an-older-install). |
|
|
20
|
+
| Behind a proxy, `houston versions` uses the shipped list | Run `houston` (or `bin/houston`), not `node` directly: the launcher passes `HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY` and `REQUESTS_CA_BUNDLE` to Node. |
|
|
21
|
+
|
|
22
|
+
## A workspace will not start
|
|
23
|
+
|
|
24
|
+
`up` refuses before it builds anything, and the refusal names the fix:
|
|
25
|
+
|
|
26
|
+
| It says | Do this |
|
|
27
|
+
|---|---|
|
|
28
|
+
| something about **memory** | Stop one of your own running workspaces (`houston stop --name <name>` keeps its data), or remove one you are done with: `houston down --name <name> --volumes`. The message names each workspace's owner: ask before stopping a colleague's. |
|
|
29
|
+
| a **port** is in use | Pass `--port`, or leave it out and houston picks a free one. |
|
|
30
|
+
| "publishes port(s) …, already claimed by workspace '<name>'" | Those ports cannot move: voice's call ports, which phones dial by number, or ports a preset file of your own lists. `<name>` holds them, even while it is only `down`, so one such workspace fits on a machine. The message names its owner: they free the ports with `houston down --name <name> --volumes` (its data goes too). Ask them rather than deleting a colleague's workspace, or use another machine. A built-in preset's consoles never refuse: they get the next free port. |
|
|
31
|
+
| the **Docker daemon** is not running | Start Docker Desktop, or `sudo systemctl start docker`. |
|
|
32
|
+
| "already exists and is reused as-is" | `up` brings back the existing workspace. `--force` rebuilds it, `--fresh` also wipes its data; `houston upgrade` changes the version. |
|
|
33
|
+
| "is already a Docker Compose workspace" (or "a Kubernetes workspace") | The name, typed or derived from the version, belongs to a workspace on the other runtime, and one name is one workspace. Give the new one its own name, or delete the old one first with `houston down --name <name> --volumes`. |
|
|
34
|
+
| "was made after this backup" | `restore <bundle>` without `--name` goes back to the workspace the bundle came from, and the one holding that name now is newer. `--new` brings the backup back as its own workspace; `--name <name>` replaces that newer workspace's data anyway. |
|
|
35
|
+
| "runs Rocket.Chat X, and this asks for Y" (Kubernetes) | `up` brings a Kubernetes workspace back at its own version. Use `--version X`, or `houston upgrade --name <name> --to Y` to move it. |
|
|
36
|
+
| "already holds a MongoDB for '<name>'" | Another houston on this machine left that workspace's data (`sudo houston` uses root's settings, not yours), or this one lost its record of it. Give the new one its own `--name`. Remove the volume the message names only if nobody needs that data. |
|
|
37
|
+
| "is not the workspace this backup was taken from" | The workspace with the bundle's name now is a different one: it was made at another time. `restore <bundle> --new` brings the backup back as its own workspace; `--name <name>` replaces that workspace's data anyway. |
|
|
38
|
+
| "could not ask Docker whether another houston home left a MongoDB" | Docker did not answer in time, and houston will not guess about someone else's data. Check `docker volume ls` answers, then run `up` again. |
|
|
39
|
+
| "could mean '<name>' … or your own '<you>-<name>'" | Two workspaces answer to what you typed. Type the full name for yours; the other one is reached from the GUI, or from a command run without `HOUSTON_USER`. |
|
|
40
|
+
| a Docker Hub pull limit | Run `docker login`. |
|
|
41
|
+
| "Unit docker-….scope was already loaded or has a fragment file" | systemd still holds the unit of the containers' last run. houston recreates them when it sees this, data kept; if it still shows, `houston down --name <name>` keeps the data, then bring the workspace up again. Out-of-memory kills leave such units behind: `journalctl -k \| grep -i oom`. |
|
|
42
|
+
|
|
43
|
+
It starts but Rocket.Chat never answers:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
houston logs --name <name> --tail 100
|
|
47
|
+
houston stats --name <name> # a climbing restart count means it is out of memory
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
SAML sign-in stops at Keycloak's "Invalid redirect uri": the workspace was made with
|
|
51
|
+
`--root-url` by houston 2.1.8 or earlier, and its Keycloak still accepts only `localhost`.
|
|
52
|
+
`ready` and `restart` do not change that. Rebuild it with the flags it was made with, plus
|
|
53
|
+
`--force`; its data is kept:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
houston up --name <name> --version <version> --preset saml --root-url <url> --force --wait
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Rocket.Chat's own behaviour, not houston's
|
|
60
|
+
|
|
61
|
+
Seen on Rocket.Chat 8.5.1, and the same with or without houston's edge in front:
|
|
62
|
+
|
|
63
|
+
- **A sign-in page left idle for about a minute says "You're offline."** Its websocket
|
|
64
|
+
closes at ~61 s, so an SSO round trip that takes longer than that (a slow IdP, a person
|
|
65
|
+
reading the Keycloak page) comes back to it. Reload and sign in again.
|
|
66
|
+
- **SAML with email two-factor on:** Rocket.Chat refuses the emailed code, so the sign-in
|
|
67
|
+
cannot finish. `up` warns about this combination; turn email two-factor off with
|
|
68
|
+
`--setting Accounts_TwoFactorAuthentication_By_Email_Enabled=false`.
|
|
69
|
+
- **Multi-instance:** `instances.get` keeps an instance a restart replaced for a while, so
|
|
70
|
+
the count runs high after restarts.
|
|
71
|
+
- **After `restore --new`:** the admin is shown "Unique ID change detected", because the
|
|
72
|
+
database now lives at a new address. Either answer is fine for a test copy.
|
|
73
|
+
- **E2EE, a new room's key sticks on one client**: that person sees "Check back later"
|
|
74
|
+
or cannot read the others. Reload their page. More in the [E2EE guide](e2ee.md).
|
|
75
|
+
|
|
76
|
+
## Kubernetes
|
|
77
|
+
|
|
78
|
+
| You see | Do this |
|
|
79
|
+
|---|---|
|
|
80
|
+
| `up` worked but the URL does nothing | The port-forward stopped, usually with its pod but occasionally while the pods stay healthy; `list` and `info` show the workspace as degraded. `houston ready --name <name>` starts it again. "something else already holds it": `ss -ltnp \| grep <port>` names the program. |
|
|
81
|
+
| "no kubeconfig context named" | Add the cluster: `houston cluster connect <arn>` for EKS, or fix your kubeconfig. |
|
|
82
|
+
| kubectl works but helm says "cluster unreachable" | A stale kubeconfig. Regenerate it (k3s: `sudo cat /etc/rancher/k3s/k3s.yaml > ~/.kube/config`; kind: `kind export kubeconfig --name <cluster>`). |
|
|
83
|
+
| Every volume stays `Pending` | No default StorageClass: `houston cluster prepare --context <cluster>`. |
|
|
84
|
+
| A colleague gets "access denied" or `Unauthorized` | On a cluster houston built: `houston cluster share <cluster> --user <their-iam-user>`. Otherwise its owner adds an EKS access entry. |
|
|
85
|
+
| "no matching manifest for linux/arm64" | Rocket.Chat below 8.0.0 is amd64 only: use an amd64 node, 8.0.0 or newer, or Docker. |
|
|
86
|
+
| "no chart deploys it" or "predates every values key houston sets" | Rocket.Chat below 3.7.2: use Docker. |
|
|
87
|
+
| `env --set`, `seed --scale`, `loadtest` or `capacity` refuses | Docker only. The refusal names what to use instead. |
|
|
88
|
+
| "was made by another houston home on this cluster", or "this houston has no record of it" | Each houston marks the namespaces it makes, and one of the same name from another machine or another user is not yours to take over or delete. Use another `--name`. If it really is this one's (made before 2.1.2, its record lost), run the `kubectl label namespace …` the message gives, then `up` again. |
|
|
89
|
+
| "keeps its data in a MongoDB houston runs itself, and this would bring it back under the MongoDB operator" | Bring it back as it was: without `--mongo-operator`, and with `HOUSTON_MONGO_OPERATOR` unset. To move it to the operator, back it up, `down --volumes`, then `restore --new` with the operator. |
|
|
90
|
+
| "could not mark namespace … as using the shared monitoring stack" | Monitoring was not attached: without that mark another workspace's teardown could remove the stack. Fix the account's right to label namespaces, then `houston monitor --name <name>` again. |
|
|
91
|
+
| `prune --orphans` leaves a namespace "not marked as made by this houston home" | It may be another houston's workspace. `--force` removes it anyway. |
|
|
92
|
+
| "has a different UID from this workspace's record" on `start`, `backup`, `restore` or `upgrade` | The namespace was deleted and made again since this workspace was created, perhaps by another houston, so this workspace's own is gone and houston will not act on the new one, `down` included. Once you have checked whose it is, remove the stale record by hand: `rm -r ~/.houston/repros/<name>` (or under your `HOUSTON_HOME`). |
|
|
93
|
+
| "home-id does not hold this home's id" | The file that tells this houston from others on a cluster is damaged. Put the id back (`kubectl get namespaces -L houston.io/home` shows the ids in use), or delete the file to start a new one and label this home's namespaces with it, as the message shows. |
|
|
94
|
+
| "could not read … home-id" | Not damage: usually a `sudo houston` left it owned by root. Fix its owner or permissions; do not delete it, or this home's namespaces read as another home's. |
|
|
95
|
+
| "is already served for workspace '<other>' by its cluster's ingress" | On a cluster that serves HTTPS itself (EKS with no edge here), two workspaces cannot share a `--domain`. Give this one another name, or `houston down --name <other>` first. |
|
|
96
|
+
|
|
97
|
+
Names are lowercase: `TICKET-1234` lives in namespace `houston-ticket-1234`.
|
|
98
|
+
|
|
99
|
+
## HTTPS and certificates
|
|
100
|
+
|
|
101
|
+
| You see | Do this |
|
|
102
|
+
|---|---|
|
|
103
|
+
| "the ingress controller's built-in placeholder certificate" | Normal for a minute or three on a new cluster. `houston tls-status --name <name>` again; `kubectl -n houston-<name> get certificate` shows what it waits for. |
|
|
104
|
+
| Let's Encrypt never validates | The name must point at the right place, port 443 open, **before** `up`. On a cloud cluster, point it at the address `houston cluster prepare --context <cluster>` prints. On Cloudflare use **DNS only**. Check with `dig +short <name> @1.1.1.1`. |
|
|
105
|
+
| "something in front is terminating TLS for this name" | A proxy, CDN or another program is intercepting. `houston doctor` names a cluster holding the ports. |
|
|
106
|
+
| Behind a proxy that terminates TLS (Cloudflare proxied, a load balancer) | TLS-ALPN cannot pass it. `houston config set acme.challenge http` makes Let's Encrypt validate over plain HTTP on `:80` instead; `up --domain` and `serve --domain` both use it. Send the name's HTTP to this host's `:80`. |
|
|
107
|
+
| Behind a tunnel (cloudflared) | Point the tunnel at the edge, `https://localhost:443`, with the name as its origin server name and Host header, and certificate verification off (Cloudflare: No TLS Verify): Let's Encrypt cannot reach a tunnelled host, so the edge has only its default certificate. Not `:80`, which redirects to HTTPS and loops; not Rocket.Chat's own port, where `/keycloak`, `/mailpit` and the other preset paths answer with Rocket.Chat's page. |
|
|
108
|
+
| The browser warns about a local certificate | Run `houston trust-ca` once, then `houston tls-status --name <name>` says it is trusted. Phones cannot use local certificates: use `--domain`. |
|
|
109
|
+
| No "Local certificate" option in the GUI | The cluster is not on this machine; houston's CA key never leaves it. Use a domain. |
|
|
110
|
+
|
|
111
|
+
## Left running
|
|
112
|
+
|
|
113
|
+
A cloud cluster bills every hour it exists; only `houston cluster delete` stops it.
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
houston list # workspaces on this machine
|
|
117
|
+
houston cluster overview # clusters this machine knows: state, cost per day, expiry, next step
|
|
118
|
+
houston cluster list # EKS clusters in every enabled AWS region
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
| You see | Do this |
|
|
122
|
+
|---|---|
|
|
123
|
+
| `cluster list` names regions it could not read | Those are not covered: check them with `aws eks list-clusters --region <region>`. |
|
|
124
|
+
| `doctor` has no local record of a cloud cluster | That is not "there is none": ask AWS with `houston cluster list`. |
|
|
125
|
+
| `cluster delete` refuses: it holds workspaces | Remove them first, see [Stop the bill](eks.md#stop-the-bill-delete-the-cluster). |
|
|
126
|
+
| A cluster deleted outside houston is still listed | `houston cluster forget <context>` removes its kubeconfig entry. |
|
|
127
|
+
|
|
128
|
+
## The web GUI
|
|
129
|
+
|
|
130
|
+
| You see | Do this |
|
|
131
|
+
|---|---|
|
|
132
|
+
| "this backup is <name>'s data" | A backup belongs to whoever owned the workspace it was taken from, even after that workspace is gone or its name is reused. Only they or an admin can restore or delete it. |
|
|
133
|
+
| A cluster card says **Reading…** | It is being read. **Not read** or `?` means it could not be read, never zero. |
|
|
134
|
+
| The job log is quiet for a while | Long steps say "still installing (1m30s)". Over a couple of minutes, check **Activity** and `houston logs --name <name>`. |
|
|
135
|
+
| A control is missing | Options a runtime or cluster cannot honour are removed. Offline and "Don't pull images" are command-line only (`--offline`, `--no-pull`). |
|
|
136
|
+
| `serve` refuses to start on a reachable address | See [Reaching it from another machine](gui.md#reaching-it-from-another-machine), and create the first account before opening it up. |
|
|
137
|
+
| No **Sign in with Okta** button | `serve`'s start-up lines say why: `Okta sign-in is set up but off: <reason>`, such as a missing setting or no client secret. `houston config list` shows the `sso.*` keys. |
|
|
138
|
+
| The Okta tile shows the sign-in page instead of signing in | The `iss` the tile sends is not exactly `sso.issuer`: a trailing slash, or the Okta domain where the custom one is set. Set `sso.issuer` to the tile's value. See [Sign in with Okta](gui.md#sign-in-with-okta). |
|
|
139
|
+
| "That Okta sign-in expired or was already used" | It took over ten minutes, `serve` restarted in between, or the browser came back to another host than `sso.public_url`. Start again from the button or the tile. |
|
|
140
|
+
| "Okta refused the sign-in" | The client secret is wrong, or the app's redirect URI or client authentication does not match the table in [Sign in with Okta](gui.md#sign-in-with-okta). |
|
|
141
|
+
| "Okta did not answer" | houston cannot reach the Okta domain. Sign in with your houston password meanwhile. |
|
|
142
|
+
| "Your houston account is an admin" | An admin account links to Okta only once approved: `houston users link-sso <name>`. |
|
|
143
|
+
| "Okta sign-in is turned off for your account here" | The link was removed by `houston users unlink-sso` or `houston users remove`. `houston users link-sso <name>` allows it again, after `houston users add <name>` if the account is gone. |
|
|
144
|
+
| "Your Okta email address is not one this server accepts" | The email's domain is not in `sso.email_domains`. |
|
|
145
|
+
| "Your Okta account has no verified email address" | Okta has not verified the person's email, or the app does not grant the `email` scope. |
|
|
146
|
+
|
|
147
|
+
## Engines and images
|
|
148
|
+
|
|
149
|
+
| You see | Do this |
|
|
150
|
+
|---|---|
|
|
151
|
+
| Slow on Apple Silicon | Rocket.Chat below 8 and MongoDB below 8 are amd64 only and run emulated. Everything newer runs natively. |
|
|
152
|
+
| MongoDB 8 fails on Linux kernel 6.19 through 7.0.13 | [SERVER-121912](https://jira.mongodb.org/browse/SERVER-121912): use an engine on kernel 7.0.14 or newer (on a Mac or Windows, update Docker Desktop), or a Rocket.Chat version paired with MongoDB 7.0. `houston doctor` warns; `docker info --format '{{.KernelVersion}}'` shows the kernel. |
|
|
153
|
+
| `toomanyrequests` while pulling | Docker Hub's anonymous pull limit. `docker login`, or take Rocket.Chat from GitHub's registry: `--rc-image ghcr.io/rocketchat/rocket.chat`. |
|
|
154
|
+
|
|
155
|
+
### Which engine
|
|
156
|
+
|
|
157
|
+
houston drives whatever answers as `docker`, with `docker compose`. `houston doctor` names
|
|
158
|
+
the engine it found and anything about it that would stop a workspace.
|
|
159
|
+
|
|
160
|
+
| Engine | | |
|
|
161
|
+
|---|---|---|
|
|
162
|
+
| Docker Engine or Docker Desktop, with Compose v2 | Supported | Every release is checked on it. |
|
|
163
|
+
| Podman 4.9 or later with the systemd cgroup manager: a distro package on Linux, rootless or not, or a Podman machine | Best effort | Workspaces, presets, `--monitor` and `loadtest` work. `serve --domain` needs `--bind` set to an address of this host. |
|
|
164
|
+
| Podman with the cgroupfs manager (a static build, or Podman inside a container) | Refused | It runs no healthchecks, and MongoDB 8 and multi-instance workspaces wait on one, so they would never start. `up` refuses; `--force` tries anyway. |
|
|
165
|
+
| `podman-compose` as `docker compose` | Refused | It is not Compose v2. Install the Compose v2 plugin; Podman then uses it. |
|
|
166
|
+
|
|
167
|
+
**Podman on Linux**, rootless:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
systemctl --user enable --now podman.socket
|
|
171
|
+
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
|
|
172
|
+
# The docker command: Docker's static client, or your distro's podman-docker package.
|
|
173
|
+
# And the Compose v2 plugin, which Podman uses as its compose provider:
|
|
174
|
+
mkdir -p ~/.docker/cli-plugins
|
|
175
|
+
curl -fsSL -o ~/.docker/cli-plugins/docker-compose \
|
|
176
|
+
https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m)
|
|
177
|
+
chmod +x ~/.docker/cli-plugins/docker-compose
|
|
178
|
+
podman info --format '{{.Host.CgroupManager}}' # must say systemd
|
|
179
|
+
houston doctor
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
If the cgroup manager says `cgroupfs`, set `cgroup_manager = "systemd"` under `[engine]` in
|
|
183
|
+
`~/.config/containers/containers.conf`. That needs a systemd user session
|
|
184
|
+
(`loginctl enable-linger $USER` on a server).
|
|
185
|
+
|
|
186
|
+
HTTPS (`--https`, `--domain`, `serve --domain`) needs the edge on ports 80 and 443, which
|
|
187
|
+
rootless Podman refuses ("rootlessport cannot expose privileged port 80") until the
|
|
188
|
+
kernel lets users bind them:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
sudo sysctl -w net.ipv4.ip_unprivileged_port_start=80
|
|
192
|
+
echo 'net.ipv4.ip_unprivileged_port_start=80' | sudo tee /etc/sysctl.d/90-houston.conf
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**A hosts line on Podman.** Podman copies this machine's `/etc/hosts` into every container,
|
|
196
|
+
so a line the notes ask for -- `127.0.0.1 keycloak` for `oidc`, `127.0.0.1 minio` for
|
|
197
|
+
`s3_minio` with `presigned=true` -- also makes the workspace's own services resolve those
|
|
198
|
+
names to themselves: the bucket is never created and uploads fail with
|
|
199
|
+
`ECONNREFUSED 127.0.0.1:9000`. On Podman add no hosts line; give the browser this host's
|
|
200
|
+
address instead, with `--set idp_host=<address>` or `--set s3_host=<address>`.
|
|
201
|
+
|
|
202
|
+
**Podman on a Mac:** `podman machine init && podman machine start`, then run
|
|
203
|
+
`podman-mac-helper` so the Docker socket points at it.
|