@zigordev/stack 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,26 +1,28 @@
1
1
  # @zigordev/stack
2
2
 
3
- The shared services of the zigordev platform for a laptop: the ingress, the telemetry agent, a local Grafana and a mail catcher. They are two compose files, the standard dashboards and alert rules, and one command that starts it all.
3
+ The shared services of the zigordev platform for a laptop: the ingress, the telemetry agent, the Kafka broker, a local Grafana and a mail catcher. They are two compose files, the standard dashboards and alert rules, and one command that starts it all.
4
4
 
5
5
  ## What it is
6
6
 
7
- Five containers that every product on the laptop shares. Three of them run in production too, from the same file.
8
-
9
- | Service | Image | What it does | Runs |
10
- | -------------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
11
- | `traefik` | Traefik 3.7 | The ingress. It sends each address to its container, from the labels that the container carries | Everywhere |
12
- | `docker-proxy` | wollomatic/socket-proxy 1.14 | A filtered door to Docker. It lets the ingress and the agent read which containers exist, and nothing else | Everywhere |
13
- | `alloy` | Grafana Alloy 1.22 | The telemetry agent. It receives traces and metrics from every app, reads every container's log lines and the machine's own numbers, and forwards all of it | Everywhere |
14
- | `lgtm` | grafana/otel-lgtm 0.41 | The local Grafana, with its stores for logs, traces and metrics in the same container | Laptop only |
15
- | `mailpit` | Mailpit 1.34 | The mail catcher. It receives every email an app sends on the laptop, and shows it on a page | Laptop only |
16
- | `gcx` | Grafana gcx 1.8 | Not a service but a job: it pushes the dashboards and the alert rules to the local Grafana, and ends | Laptop only, on each `up` |
17
-
18
- | File | What it holds |
19
- | -------------------- | -------------------------------------------------------------------------------------------------------------------------- |
20
- | `compose.yaml` | The three services that run everywhere, with the agent's config inside |
21
- | `compose.local.yaml` | What only the laptop has: the two other services, the local addresses, the published port and the settings |
22
- | `observability/` | The dashboards and the alert rules as files, which `pnpm build` writes from the code in the repo's `observability/` folder |
23
- | `bin/` and `src/` | The command `zigordev-stack`, which starts and stops them |
7
+ Six containers that every product on the laptop shares. Four of them run in production too, from the same file.
8
+
9
+ | Service | Image | What it does | Runs |
10
+ | -------------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
11
+ | `traefik` | Traefik 3.7 | The ingress. It sends each address to its container, from the labels that the container carries | Everywhere |
12
+ | `docker-proxy` | wollomatic/socket-proxy 1.14 | A filtered door to Docker. It lets the ingress and the agent read which containers exist, and nothing else | Everywhere |
13
+ | `alloy` | Grafana Alloy 1.22 | The telemetry agent. It receives traces and metrics from every app, reads every container's log lines and the machine's own numbers, and forwards all of it | Everywhere |
14
+ | `kafka` | Apache Kafka 4.4 | The broker for events between services: one node that is broker and controller at once. Every client signs in with SCRAM-SHA-512 as a user of its own, and may do only what a rule allows | Everywhere |
15
+ | `kafka-setup` | Apache Kafka 4.4 | Not a service but a job: it adds Kafka's topics, users and rules from the list `KAFKA_SETUP`, and ends. It never deletes anything | Everywhere, after the broker is healthy |
16
+ | `lgtm` | grafana/otel-lgtm 0.41 | The local Grafana, with its stores for logs, traces and metrics in the same container | Laptop only |
17
+ | `mailpit` | Mailpit 1.34 | The mail catcher. It receives every email an app sends on the laptop, and shows it on a page | Laptop only |
18
+ | `gcx` | Grafana gcx 1.8 | Not a service but a job: it pushes the dashboards and the alert rules to the local Grafana, and ends | Laptop only, on each `up` |
19
+
20
+ | File | What it holds |
21
+ | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
22
+ | `compose.yaml` | The four services that run everywhere, with the agent's config inside, and Kafka's job with its list of topics, users and rules |
23
+ | `compose.local.yaml` | What only the laptop has: the two other services, the local addresses, the published ports, the settings and Kafka's throwaway passwords |
24
+ | `observability/` | The dashboards and the alert rules as files, which `pnpm build` writes from the code in the repo's `observability/` folder |
25
+ | `bin/` and `src/` | The command `zigordev-stack`, which starts and stops them |
24
26
 
25
27
  ```mermaid
26
28
  flowchart LR
@@ -30,6 +32,7 @@ flowchart LR
30
32
  traefik --> mailpit
31
33
  app -->|traces and metrics| alloy
32
34
  app -->|email| mailpit
35
+ app -->|events, signed in| kafka
33
36
  alloy -->|logs, traces, metrics| lgtm
34
37
  traefik -.->|which containers exist| proxy["docker-proxy"]
35
38
  alloy -.->|which containers exist, and their log lines| proxy
@@ -40,7 +43,7 @@ flowchart LR
40
43
 
41
44
  Every product needs an ingress, somewhere to send its telemetry and somewhere to send its mail. Without this package each product would bring its own, and two products could not run side by side on one laptop: both would want port 80, and their logs would land in two places.
42
45
 
43
- Because the same three services run in production from the same file, a route or a log line that works on the laptop works there too. What differs is a short list of settings, and it is written down below.
46
+ Because the same four services run in production from the same file, a route or a log line that works on the laptop works there too. What differs is a short list of settings, and it is written down below.
44
47
 
45
48
  Without the Docker proxy, the ingress and the agent would hold Docker's socket itself, which is the right to start any container with any privilege. A flaw in either would then be a flaw in the whole machine.
46
49
 
@@ -48,13 +51,15 @@ Without the Docker proxy, the ingress and the agent would hold Docker's socket i
48
51
 
49
52
  ### One project, one network, fixed names
50
53
 
51
- The five containers form one Compose project named `platform`, whichever folder the files are started from. A product starts the same project from its own copy of this package, so a second start changes nothing, and two products share one set of services.
54
+ The six containers form one Compose project named `platform`, whichever folder the files are started from. A product starts the same project from its own copy of this package, so a second start changes nothing, and two products share one set of services.
52
55
 
53
56
  | Name | What it is |
54
57
  | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
55
58
  | `zigordev` | The network that every app joins. On it, the services answer to their own names |
56
59
  | `alloy:4318` | Where an app sends its traces and metrics, over OTLP on HTTP. Port 4317 takes the same over gRPC |
57
60
  | `127.0.0.1:4318` | The same port, published on the laptop itself, for an app that runs as a process outside a container, such as one started with `pnpm dev`. HTTP only |
61
+ | `kafka:9092` | Where an app in a container reaches Kafka, signed in with SCRAM-SHA-512 as its own user |
62
+ | `localhost:9094` | The same broker, published on the laptop itself, for an app that runs as a process outside a container |
58
63
  | `mailpit:1025` | Where an app sends its mail on the laptop, over SMTP |
59
64
  | `zigordev-docker` | A second network with no way out. Only the Docker proxy, the ingress and the agent are on it |
60
65
 
@@ -97,26 +102,27 @@ A new app needs no entry anywhere. It appears in the list of the App dashboard w
97
102
 
98
103
  ### Each container is boxed in
99
104
 
100
- | Rule | Why |
101
- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
102
- | An exact image version and its digest | The same bytes everywhere, and a tag pushed again changes nothing. Renovate proposes the next |
103
- | A health check | `up` can wait for it, and the ingress can trust it |
104
- | A restart unless it was stopped | The host restarts at night for updates, and every service comes back by itself |
105
- | A memory limit and a CPU limit | One service cannot starve the others |
106
- | An init process, no new privileges, no capabilities, at most 30 seconds to stop | A broken service stays inside its box and stops cleanly |
107
- | A user that is not root, and a read-only file system | A flaw in the service cannot change the service |
108
- | No published port, except port 80 of the ingress and port 4318 of the agent, both on this laptop itself | Nothing is reachable from the network the laptop is on |
109
-
110
- `src/compose.test.ts` holds every service to these rules, one by one, and the job `gcx` to all but the health check, which a job that ends does not need. `lgtm` is the one exception to the last-but-one row: it is six programs in one container, which start as root and write to their own folders. It runs on the laptop only.
111
-
112
- | Service | Memory limit | CPU limit | Used when idle on 2026-11-22 |
113
- | -------------- | ------------ | --------- | --------------------------------- |
114
- | `traefik` | 128 MiB | 1 | 24 MiB |
115
- | `docker-proxy` | 64 MiB | 0.25 | 11 MiB |
116
- | `alloy` | 256 MiB | 1 | 51 MiB |
117
- | `lgtm` | 2 GiB | 2 | 614 MiB |
118
- | `mailpit` | 128 MiB | 0.5 | 10 MiB |
119
- | `cloudflared` | 128 MiB | 0.5 | Not measured yet, production only |
105
+ | Rule | Why |
106
+ | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
107
+ | An exact image version and its digest | The same bytes everywhere, and a tag pushed again changes nothing. Renovate proposes the next |
108
+ | A health check | `up` can wait for it, and the ingress can trust it |
109
+ | A restart unless it was stopped | The host restarts at night for updates, and every service comes back by itself |
110
+ | A memory limit and a CPU limit | One service cannot starve the others |
111
+ | An init process, no new privileges, no capabilities, at most 30 seconds to stop | A broken service stays inside its box and stops cleanly |
112
+ | A user that is not root, and a read-only file system | A flaw in the service cannot change the service |
113
+ | No published port, except port 80 of the ingress, port 4318 of the agent and port 9094 of the broker, all on this laptop itself | Nothing is reachable from the network the laptop is on |
114
+
115
+ `src/compose.test.ts` holds every service to these rules, one by one, and the jobs `gcx` and `kafka-setup` to all but the health check, which a job that ends does not need. The broker keeps a read-only root by writing only to its data volume and to two folders in memory: the settings its image writes at each start, and `/tmp`. `lgtm` is the one exception to the last-but-one row: it is six programs in one container, which start as root and write to their own folders. It runs on the laptop only.
116
+
117
+ | Service | Memory limit | CPU limit | Used when idle on 2026-11-22 |
118
+ | -------------- | ------------ | --------- | ------------------------------------------ |
119
+ | `traefik` | 128 MiB | 1 | 24 MiB |
120
+ | `docker-proxy` | 64 MiB | 0.25 | 11 MiB |
121
+ | `alloy` | 256 MiB | 1 | 51 MiB |
122
+ | `lgtm` | 2 GiB | 2 | 614 MiB |
123
+ | `mailpit` | 128 MiB | 0.5 | 10 MiB |
124
+ | `kafka` | 1 GiB | 1 | 397 MiB on 2026-11-25, with a 512 MiB heap |
125
+ | `cloudflared` | 128 MiB | 0.5 | Not measured yet, production only |
120
126
 
121
127
  ### The Docker proxy
122
128
 
@@ -134,21 +140,57 @@ Traefik takes all its settings from variables, so its own health check reads the
134
140
 
135
141
  Traefik warns once at each start that it "can reject some encoded characters in the request path". That is a notice about a setting we leave as it is.
136
142
 
143
+ ### The broker
144
+
145
+ Kafka carries the events that one service sends to another. It is one node, broker and controller at once, so it keeps one copy of each message. Its data sits in the volume `kafka-data`, which in production is on the data disk, inside the disk's daily snapshot.
146
+
147
+ Every client signs in with SCRAM-SHA-512 as a user of its own, and may do only what a rule allows. A user without a rule can do nothing, and writing to a topic never makes it. So a typo in a topic's name fails at once, instead of making a second topic.
148
+
149
+ The list `KAFKA_SETUP`, in the settings of the job `kafka-setup` in `compose.yaml`, holds every topic, user and rule, one per line. The job runs once the broker is healthy, signs in as the user `setup`, adds what is missing, and ends. It never deletes: a line that goes leaves its topic, user or rule on the broker, because a topic holds data.
150
+
151
+ | Line | What it adds |
152
+ | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
153
+ | `topic <name> <partitions>` | A topic with that many partitions, and one copy of each message |
154
+ | `user <name>` | A user. Its password comes from the job's variable `KAFKA_PASSWORD_<NAME>`, the name in capitals with `-` as `_`, and the job stops when it is not set |
155
+ | `allow <user> <operation> topic <name>` | A rule: the user may do the operation, such as `Read`, `Write` or `Describe`, on that topic |
156
+ | `allow <user> <operation> group <name>` | The same for a consumer group, which a reader needs too |
157
+ | Either `allow` line, ending `prefixed` | The rule covers every name that starts with `<name>` |
158
+
159
+ For example, an app `notes-api` that sends to `notes.requests`, reads it in the group `notes-api.counts`, and sets failed messages aside, as `@zigordev/events` does, needs these lines:
160
+
161
+ ```yaml
162
+ KAFKA_SETUP: |
163
+ topic notes.requests 3
164
+ topic notes.requests.dead-letter 1
165
+ user notes-api
166
+ allow notes-api Write topic notes.requests
167
+ allow notes-api Read topic notes.requests
168
+ allow notes-api Write topic notes.requests.dead-letter
169
+ allow notes-api Read group notes-api. prefixed
170
+ ```
171
+
172
+ On the laptop the job also needs `KAFKA_PASSWORD_NOTES_API`, a throwaway password in `compose.local.yaml`. The app reaches the broker with three settings, which `@zigordev/events` reads: `KAFKA_BROKERS: kafka:9092`, `KAFKA_USERNAME: notes-api` and `KAFKA_PASSWORD`, the same password. Where an app's password lives in production is decided with the first app that needs one.
173
+
174
+ The broker formats its own storage before the image starts it, and makes the users `admin` and `setup` there, because image 4.4.0 ignores the setting that would do that. [Record 0027](../docs/adr/0027-the-broker-formats-its-own-storage-and-one-list-holds-its-topics-users-and-rules.md) says why.
175
+
137
176
  ### The laptop and production
138
177
 
139
178
  The host starts `compose.yaml` with `compose.production.yaml`, through the deploy path of platform: every merge to `main` deploys them as the target `platform`. `docs/cloud-first-deploy.md` in platform says how.
140
179
 
141
- | Thing | On the laptop | In production |
142
- | -------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
143
- | The three shared services | From `compose.yaml` | The same file |
144
- | How a request arrives | Port 80 on the laptop itself, over IPv4 and IPv6 | Through Cloudflare's tunnel. `cloudflared`, its connector, runs in production only and hands each request to the ingress |
145
- | How an app outside a container reports | To `127.0.0.1:4318`, the agent's port published on the laptop itself | Every app runs in a container, so the port is not published |
146
- | Where the agent sends | To `lgtm`, with a made-up name and password that nothing checks | To Grafana Cloud, with the secrets that `.env.production.example` names. Traces and metrics go to `${GRAFANA_OTLP_URL}/otlp`, and logs to `${GRAFANA_LOKI_URL}/loki/api/v1/push`, because the stored addresses carry no path |
147
- | Each container's memory | No file, so the agent reads none | The host's file `/var/lib/platform/metrics/containers.prom`, which a timer writes every minute |
148
- | The backups' results | No file, so the agent reads none | The host's files `/var/lib/platform/metrics/backup-dump.prom` and `backup-restore-test.prom`, which the backup script writes after each run |
149
- | Grafana and the mail catcher | `lgtm` and `mailpit` | Grafana Cloud and Amazon SES |
150
- | The ingress's own pages | At `traefik.localhost` | Off |
151
- | The proxy's group | 0, which owns the socket on Docker Desktop | The group that owns the socket on the host, which the deploy passes as `DOCKER_SOCKET_GROUP` |
180
+ | Thing | On the laptop | In production |
181
+ | -------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
182
+ | The four shared services | From `compose.yaml` | The same file |
183
+ | How a request arrives | Port 80 on the laptop itself, over IPv4 and IPv6 | Through Cloudflare's tunnel. `cloudflared`, its connector, runs in production only and hands each request to the ingress |
184
+ | How an app outside a container reports | To `127.0.0.1:4318`, the agent's port published on the laptop itself | Every app runs in a container, so the port is not published |
185
+ | How an app outside a container reaches Kafka | `localhost:9094`, a listener published on the laptop itself | Every app runs in a container, so there is no such listener |
186
+ | Kafka's passwords | Throwaway ones in `compose.local.yaml` | The host's secrets `KAFKA_ADMIN_PASSWORD` and `KAFKA_SETUP_PASSWORD`, which `.env.production.example` names |
187
+ | Kafka's topics, users and rules | `zigordev-stack up` runs the job `kafka-setup` after the health checks | The deploy runs the job after the broker is healthy, as it runs a product's migrate job |
188
+ | Where the agent sends | To `lgtm`, with a made-up name and password that nothing checks | To Grafana Cloud, with the secrets that `.env.production.example` names. Traces and metrics go to `${GRAFANA_OTLP_URL}/otlp`, and logs to `${GRAFANA_LOKI_URL}/loki/api/v1/push`, because the stored addresses carry no path |
189
+ | Each container's memory | No file, so the agent reads none | The host's file `/var/lib/platform/metrics/containers.prom`, which a timer writes every minute |
190
+ | The backups' results | No file, so the agent reads none | The host's files `/var/lib/platform/metrics/backup-dump.prom` and `backup-restore-test.prom`, which the backup script writes after each run |
191
+ | Grafana and the mail catcher | `lgtm` and `mailpit` | Grafana Cloud and Amazon SES |
192
+ | The ingress's own pages | At `traefik.localhost` | Off |
193
+ | The proxy's group | 0, which owns the socket on Docker Desktop | The group that owns the socket on the host, which the deploy passes as `DOCKER_SOCKET_GROUP` |
152
194
 
153
195
  ## How to use it, with one worked example
154
196
 
@@ -160,7 +202,7 @@ pnpm local:down
160
202
  pnpm local:reset
161
203
  ```
162
204
 
163
- `local:up` builds the dashboard files, starts the services and waits until each one is healthy. It then pushes the dashboards and the alert rules, and prints the four addresses. `local:down` stops them and keeps their data. `local:reset` stops them, deletes their data and starts them again.
205
+ `local:up` builds the dashboard files, starts the services and waits until each one is healthy. It then sets up Kafka's topics, users and rules, pushes the dashboards and the alert rules, and prints the four addresses. `local:down` stops them and keeps their data. `local:reset` stops them, deletes their data and starts them again.
164
206
 
165
207
  | Address | What opens |
166
208
  | -------------------------- | --------------------------------------------------------------------- |
@@ -203,11 +245,11 @@ pnpm add --save-dev @zigordev/stack
203
245
  pnpm exec zigordev-stack up
204
246
  ```
205
247
 
206
- | Command | What it does |
207
- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
208
- | `zigordev-stack up` | Starts the services, waits until each one is healthy, and pushes the dashboards and the alert rules. When they run already, it changes nothing |
209
- | `zigordev-stack down` | Stops them and keeps their data |
210
- | `zigordev-stack reset` | Stops them, deletes their data and starts them again |
248
+ | Command | What it does |
249
+ | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
250
+ | `zigordev-stack up` | Starts the services, waits until each one is healthy, sets up Kafka's topics, users and rules, and pushes the dashboards and the alert rules. When they run already, it changes nothing |
251
+ | `zigordev-stack down` | Stops them and keeps their data |
252
+ | `zigordev-stack reset` | Stops them, deletes their data and starts them again |
211
253
 
212
254
  The package holds the two compose files, the dashboard and alert files already built, and the command. It has no dependency of its own. It needs Node.js 26 or later, and Docker running.
213
255
 
@@ -217,23 +259,25 @@ Every product starts the same project, named `platform`. Two products that hold
217
259
 
218
260
  ## How to check that it works, and what to do when it does not
219
261
 
220
- | Try this | What must happen |
221
- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
222
- | `pnpm local:up` | It ends with "The shared services are up:" and the four addresses |
223
- | `pnpm local:up` a second time | The same, within seconds, and no container is recreated |
224
- | Open `http://grafana.localhost`, then Dashboards, then the folder `zigordev` | The dashboards App and Platform are there, and Platform shows the machine's numbers |
225
- | In Grafana, open Alerting, then Alert rules | Four rules are listed in the folder `zigordev`, each one "Normal" |
226
- | Open `http://grafana.localhost` and `http://mail.localhost` | Both pages open, with no sign-in |
227
- | In Grafana's Explore, pick Loki and run `{service_name="traefik"}` | Traefik's own log lines show |
228
- | Open `http://nothing.localhost` | Traefik answers 404, because no container asked for that address |
229
- | `pnpm exec vitest run stack` | Every rule on this page that a machine can check passes |
230
- | Open a pull request | The job "Shared services" starts all five on GitHub's machine, opens the four addresses and stops them. A change that breaks a start cannot merge |
262
+ | Try this | What must happen |
263
+ | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
264
+ | `pnpm local:up` | It prints "kafka-setup: done", and ends with "The shared services are up:" and the four addresses |
265
+ | `pnpm local:up` a second time | The same, within seconds, and no service is recreated |
266
+ | Open `http://grafana.localhost`, then Dashboards, then the folder `zigordev` | The dashboards App and Platform are there, and Platform shows the machine's numbers |
267
+ | In Grafana, open Alerting, then Alert rules | Six rules are listed in the folder `zigordev`, each one "Normal" |
268
+ | Open `http://grafana.localhost` and `http://mail.localhost` | Both pages open, with no sign-in |
269
+ | In Grafana's Explore, pick Loki and run `{service_name="traefik"}` | Traefik's own log lines show |
270
+ | Open `http://nothing.localhost` | Traefik answers 404, because no container asked for that address |
271
+ | `pnpm exec vitest run stack` | Every rule on this page that a machine can check passes |
272
+ | Open a pull request | The job "Shared services" starts all six on GitHub's machine, opens the four addresses and stops them. A change that breaks a start cannot merge |
231
273
 
232
274
  | What you see | What it means | What to do |
233
275
  | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
234
276
  | `Cannot connect to the Docker daemon` | Docker is not running | Start Docker Desktop |
235
277
  | `Bind for 127.0.0.1:80 failed: port is already allocated` | Another program on the laptop holds port 80 | Find it with `lsof -nP -iTCP:80 -sTCP:LISTEN`, and stop it |
236
278
  | `Bind for 127.0.0.1:4318 failed: port is already allocated` | Another program on the laptop holds port 4318, often another OpenTelemetry collector | Find it with `lsof -nP -iTCP:4318 -sTCP:LISTEN`, and stop it |
279
+ | `Bind for 127.0.0.1:9094 failed: port is already allocated` | Another program on the laptop holds port 9094, often another Kafka | Find it with `lsof -nP -iTCP:9094 -sTCP:LISTEN`, and stop it |
280
+ | `local:up` says Kafka's topics and users could not be set up | The job `kafka-setup` could not sign in, or a line of `KAFKA_SETUP` is wrong, or a user's password is not set | The line above "zigordev-stack:" starts with "kafka-setup:" and says which. Each line takes one of the three forms of record 0027 |
237
281
  | `local:up` ends with "not every shared service became healthy" | One container did not pass its health check in 5 minutes | The lines above name it. `docker logs platform-<service>-1` shows why |
238
282
  | `zigordev-stack up` says "the dashboard files are missing" | The files in `stack/observability/` are built, not committed | `pnpm build`, which `pnpm local:up` does by itself |
239
283
  | `local:up` says the dashboards and the alert rules could not be pushed | gcx could not reach Grafana, or Grafana refused a file | The lines above name the file and the reason. `pnpm exec vitest run observability` checks the files' shape |
@@ -29,6 +29,23 @@ services:
29
29
  traefik.http.routers.alloy.rule: Host(`alloy.localhost`)
30
30
  traefik.http.services.alloy.loadbalancer.server.port: "12345"
31
31
 
32
+ kafka:
33
+ ports:
34
+ - 127.0.0.1:9094:9094
35
+ - "[::1]:9094:9094"
36
+ environment:
37
+ KAFKA_LISTENERS: SASL_PLAINTEXT://:9092,CONTROLLER://localhost:9093,EXTERNAL://:9094
38
+ KAFKA_ADVERTISED_LISTENERS: SASL_PLAINTEXT://kafka:9092,EXTERNAL://localhost:9094
39
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,SASL_PLAINTEXT:SASL_PLAINTEXT,EXTERNAL:SASL_PLAINTEXT
40
+ KAFKA_LISTENER_NAME_EXTERNAL_SCRAM___SHA___512_SASL_JAAS_CONFIG: org.apache.kafka.common.security.scram.ScramLoginModule required;
41
+ KAFKA_ADMIN_PASSWORD: local-only-admin
42
+ KAFKA_SETUP_PASSWORD: local-only-setup
43
+
44
+ kafka-setup:
45
+ profiles: [setup]
46
+ environment:
47
+ KAFKA_SETUP_PASSWORD: local-only-setup
48
+
32
49
  lgtm:
33
50
  image: grafana/otel-lgtm:0.41.1@sha256:1b852b77d7bcadb7699bfe7c78a51d059dff85168de674728cf7abf4474645e5
34
51
  init: true
package/compose.yaml CHANGED
@@ -30,7 +30,7 @@ services:
30
30
  networks: [docker]
31
31
 
32
32
  traefik:
33
- image: traefik:v3.7.19@sha256:a6c0194dda77bcb804824580f36fa7edc56e315b1acfe933366c8b52844a78a4
33
+ image: traefik:v3.8.0@sha256:00c9734983e74ae35a1fc18eaee9e9da13f3dde95c4e45b3b8c3b60e0dbd2d17
34
34
  user: "65532:65532"
35
35
  init: true
36
36
  read_only: true
@@ -259,6 +259,151 @@ services:
259
259
  condition: service_healthy
260
260
  networks: [zigordev, docker]
261
261
 
262
+ kafka:
263
+ image: apache/kafka:4.4.0@sha256:833b867a9585a141da455dc2b57431c65cbccb27f11c91f694444cca9f777e0f
264
+ command:
265
+ - bash
266
+ - -c
267
+ - |
268
+ set -euo pipefail
269
+ export KAFKA_LISTENER_NAME_SASL__PLAINTEXT_SCRAM___SHA___512_SASL_JAAS_CONFIG="org.apache.kafka.common.security.scram.ScramLoginModule required username=\"admin\" password=\"$${KAFKA_ADMIN_PASSWORD}\";"
270
+ printf '%s\n' \
271
+ "process.roles=$${KAFKA_PROCESS_ROLES}" \
272
+ "node.id=$${KAFKA_NODE_ID}" \
273
+ "controller.quorum.voters=$${KAFKA_CONTROLLER_QUORUM_VOTERS}" \
274
+ "controller.listener.names=$${KAFKA_CONTROLLER_LISTENER_NAMES}" \
275
+ "listeners=$${KAFKA_LISTENERS}" \
276
+ "advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS}" \
277
+ "listener.security.protocol.map=$${KAFKA_LISTENER_SECURITY_PROTOCOL_MAP}" \
278
+ "inter.broker.listener.name=$${KAFKA_INTER_BROKER_LISTENER_NAME}" \
279
+ "sasl.enabled.mechanisms=$${KAFKA_SASL_ENABLED_MECHANISMS}" \
280
+ "sasl.mechanism.inter.broker.protocol=$${KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL}" \
281
+ "log.dirs=$${KAFKA_LOG_DIRS}" > /tmp/format.properties
282
+ KAFKA_LOG4J_OPTS=-Dlog4j2.configurationFile=/etc/kafka/docker/tools-log4j2.yaml \
283
+ /opt/kafka/bin/kafka-storage.sh format --ignore-formatted -t "$${CLUSTER_ID}" -c /tmp/format.properties \
284
+ --add-scram "SCRAM-SHA-512=[name=admin,password=$${KAFKA_ADMIN_PASSWORD}]" \
285
+ --add-scram "SCRAM-SHA-512=[name=setup,password=$${KAFKA_SETUP_PASSWORD}]"
286
+ rm /tmp/format.properties
287
+ exec /etc/kafka/docker/run
288
+ user: "1000:1000"
289
+ init: true
290
+ read_only: true
291
+ cap_drop: [ALL]
292
+ security_opt: [no-new-privileges:true]
293
+ stop_grace_period: 30s
294
+ restart: unless-stopped
295
+ mem_limit: 1g
296
+ cpus: 1
297
+ environment:
298
+ CLUSTER_ID: zxDw5kpHRNCfbBLbNLddOw
299
+ KAFKA_NODE_ID: "1"
300
+ KAFKA_PROCESS_ROLES: broker,controller
301
+ KAFKA_LISTENERS: SASL_PLAINTEXT://:9092,CONTROLLER://localhost:9093
302
+ KAFKA_ADVERTISED_LISTENERS: SASL_PLAINTEXT://kafka:9092
303
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,SASL_PLAINTEXT:SASL_PLAINTEXT
304
+ KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
305
+ KAFKA_CONTROLLER_QUORUM_VOTERS: 1@localhost:9093
306
+ KAFKA_INTER_BROKER_LISTENER_NAME: SASL_PLAINTEXT
307
+ KAFKA_SASL_ENABLED_MECHANISMS: SCRAM-SHA-512
308
+ KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL: SCRAM-SHA-512
309
+ KAFKA_OPTS: -Djava.security.auth.login.config=/dev/null
310
+ KAFKA_AUTHORIZER_CLASS_NAME: org.apache.kafka.metadata.authorizer.StandardAuthorizer
311
+ KAFKA_SUPER_USERS: User:admin;User:setup;User:ANONYMOUS
312
+ KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: "false"
313
+ KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
314
+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1"
315
+ KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: "1"
316
+ KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: "1"
317
+ KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: "0"
318
+ KAFKA_LOG_DIRS: /var/lib/kafka/data
319
+ KAFKA_HEAP_OPTS: -Xms512m -Xmx512m
320
+ KAFKA_JMX_OPTS: " "
321
+ tmpfs:
322
+ - /tmp
323
+ - /opt/kafka/config:uid=1000,gid=1000
324
+ - /opt/kafka/logs:uid=1000,gid=1000
325
+ volumes:
326
+ - kafka-data:/var/lib/kafka/data
327
+ healthcheck:
328
+ test: [CMD, bash, -c, "exec 3<>/dev/tcp/127.0.0.1/9092"]
329
+ interval: 5s
330
+ timeout: 3s
331
+ retries: 12
332
+ start_period: 60s
333
+ start_interval: 2s
334
+ networks: [zigordev]
335
+
336
+ kafka-setup:
337
+ image: apache/kafka:4.4.0@sha256:833b867a9585a141da455dc2b57431c65cbccb27f11c91f694444cca9f777e0f
338
+ command:
339
+ - bash
340
+ - -c
341
+ - |
342
+ set -euo pipefail
343
+ bin=/opt/kafka/bin
344
+ server=kafka:9092
345
+ printf '%s\n' "security.protocol=SASL_PLAINTEXT" "sasl.mechanism=SCRAM-SHA-512" \
346
+ "sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username=\"setup\" password=\"$${KAFKA_SETUP_PASSWORD}\";" \
347
+ > /tmp/setup.properties
348
+ sign_in=(--bootstrap-server "$$server" --command-config /tmp/setup.properties)
349
+ "$$bin/kafka-topics.sh" "$${sign_in[@]}" --list > /dev/null
350
+ while read -r verb first second third fourth fifth; do
351
+ case "$$verb" in
352
+ '') ;;
353
+ topic)
354
+ "$$bin/kafka-topics.sh" "$${sign_in[@]}" --create --if-not-exists --topic "$$first" \
355
+ --partitions "$$second" --replication-factor 1 > /dev/null
356
+ echo "kafka-setup: topic $$first"
357
+ ;;
358
+ user)
359
+ variable="KAFKA_PASSWORD_$$(printf '%s' "$$first" | tr 'a-z-' 'A-Z_')"
360
+ password="$${!variable:-}"
361
+ if [ -z "$$password" ]; then
362
+ echo "kafka-setup: $$variable is not set, so the user $$first cannot sign in" >&2
363
+ exit 1
364
+ fi
365
+ "$$bin/kafka-configs.sh" "$${sign_in[@]}" --alter --entity-type users --entity-name "$$first" \
366
+ --add-config "SCRAM-SHA-512=[password=$$password]" > /dev/null
367
+ echo "kafka-setup: user $$first"
368
+ ;;
369
+ allow)
370
+ pattern=literal
371
+ if [ "$${fifth:-}" = prefixed ]; then
372
+ pattern=prefixed
373
+ fi
374
+ "$$bin/kafka-acls.sh" "$${sign_in[@]}" --add --allow-principal "User:$$first" \
375
+ --operation "$$second" "--$$third" "$$fourth" --resource-pattern-type "$$pattern" > /dev/null
376
+ echo "kafka-setup: $$first may $$second $$third $$fourth ($$pattern)"
377
+ ;;
378
+ *)
379
+ echo "kafka-setup: unknown line: $$verb $$first" >&2
380
+ exit 1
381
+ ;;
382
+ esac
383
+ done <<< "$${KAFKA_SETUP:-}"
384
+ echo "kafka-setup: done"
385
+ user: "1000:1000"
386
+ init: true
387
+ read_only: true
388
+ cap_drop: [ALL]
389
+ security_opt: [no-new-privileges:true]
390
+ stop_grace_period: 10s
391
+ restart: "no"
392
+ mem_limit: 512m
393
+ cpus: 0.5
394
+ environment:
395
+ KAFKA_HEAP_OPTS: -Xms128m -Xmx256m
396
+ KAFKA_SETUP: ""
397
+ tmpfs:
398
+ - /tmp
399
+ - /opt/kafka/logs:uid=1000,gid=1000
400
+ labels:
401
+ com.zigordev.job: migrate
402
+ depends_on:
403
+ kafka:
404
+ condition: service_healthy
405
+ networks: [zigordev]
406
+
262
407
  networks:
263
408
  zigordev:
264
409
  name: zigordev
@@ -268,3 +413,4 @@ networks:
268
413
 
269
414
  volumes:
270
415
  alloy-data:
416
+ kafka-data:
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;AAEzF,MAAM,WAAW,EAAE;IACjB,QAAQ,CAAC,MA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,aACnE,0BAA0B,EAAE,8BAA8B,aAC1D,wBAAwB,EAAE,+CAA+C,EAClE,CAAC;AAoEX,wBAAgB,IAAI,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,MAAM,CAe5D"}
package/dist/cli.js CHANGED
@@ -13,7 +13,8 @@ const usage = [
13
13
  ' zigordev-stack reset',
14
14
  '',
15
15
  'up Starts the shared services and waits until each one is healthy.',
16
- ' It then pushes the dashboards and the alert rules to the local Grafana.',
16
+ " It then sets up Kafka's topics and users, and pushes the dashboards",
17
+ ' and the alert rules to the local Grafana.',
17
18
  ' When the services are running already, it changes nothing.',
18
19
  'down Stops them and keeps their data.',
19
20
  'reset Stops them, deletes their data and starts them again.',
@@ -32,6 +33,11 @@ function up(io) {
32
33
  io.write('zigordev-stack: not every shared service became healthy. The lines above name the one that did not\n');
33
34
  return started;
34
35
  }
36
+ const setUp = compose(io, 'run', '--rm', 'kafka-setup');
37
+ if (setUp !== 0) {
38
+ io.write("zigordev-stack: the services are up, but Kafka's topics and users could not be set up. The lines above say why\n");
39
+ return setUp;
40
+ }
35
41
  const pushed = compose(io, 'run', '--rm', 'gcx');
36
42
  if (pushed !== 0) {
37
43
  io.write('zigordev-stack: the services are up, but the dashboards and the alert rules could not be pushed. The lines above say why\n');
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAWjC,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,cAAc,EAAE,oBAAoB,CAAU,CAAC;AACrE,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAC;AAEzC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,CAAC,0BAA0B,EAAE,oDAAoD,CAAC;IAClF,CAAC,uBAAuB,EAAE,0CAA0C,CAAC;IACrE,CAAC,0BAA0B,EAAE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;AACX,CAAC;AAED,SAAS,KAAK,CAAC,EAAM;IACnB,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;IAC9C,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,IAAuB,EAAE,EAAM;IAClD,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAChC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACrB,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QAChB,CAAC;QACD,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;YACvB,OAAO,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAC7B,CAAC;QACD,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;YACxB,OAAO,KAAK,CAAC,EAAE,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACD,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAChB,OAAO,CAAC,CAAC;AACX,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zigordev/stack",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "The shared services of the zigordev platform for a laptop: the ingress, the telemetry agent, a local Grafana and a mail catcher, as compose files with one command that starts them",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",