@zigordev/stack 1.9.0 → 1.10.1
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 +2 -2
- package/compose.local.yaml +1 -0
- package/compose.yaml +10 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -178,9 +178,9 @@ KAFKA_SETUP: |
|
|
|
178
178
|
|
|
179
179
|
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. In production an app's password lives once, at its own `/<product>/KAFKA_PASSWORD` in Parameter Store. A line of `.env.production.example` names it, such as `KAFKA_PASSWORD_NOTIFICATIONS_API=/notifications/KAFKA_PASSWORD`, and the host's deploy reads it from there. [Record 0028](../docs/adr/0028-the-shared-services-read-each-apps-kafka-password-from-the-apps-own-parameter.md) says why.
|
|
180
180
|
|
|
181
|
-
`KAFKA_SETUP` holds
|
|
181
|
+
`KAFKA_SETUP` holds two users today. `notifications-api`, the notifications service, reads every app's requests and writes every app's answers, through three prefixed rules that never change when an app joins. `playground-api`, the playground's API, writes its email requests, reads their answers in its own groups, and sets a bad answer aside, through four rules of its own. On the laptop their passwords are `local-only-notifications-api` and `local-only-playground-api`, and in production the playground's lives at `/playground/KAFKA_PASSWORD`.
|
|
182
182
|
|
|
183
|
-
`KAFKA_SETUP` also holds the four topics of every app that sends email, the template's too, and the service's right to set a bad request aside on each app's requests' dead-letter topic. The notifications service reads the requests topic of every app in its producer list, which ships in its image, wherever it runs. One missing topic stops it reading any, so every producer's topics exist on every broker.
|
|
183
|
+
`KAFKA_SETUP` also holds the four topics of every app that sends email, the template's and the playground's too, and the service's right to set a bad request aside on each app's requests' dead-letter topic. The notifications service reads the requests topic of every app in its producer list, which ships in its image, wherever it runs. One missing topic stops it reading any, so every producer's topics exist on every broker.
|
|
184
184
|
|
|
185
185
|
On the laptop the job reads a second list after `KAFKA_SETUP`: `KAFKA_SETUP_LAPTOP`, in `compose.local.yaml`, for users that only a laptop needs. Production never sets it. It holds one user today, `template-api`, the product template's API, which sends its emails through the notifications service and never deploys. Its topics are in `KAFKA_SETUP`, so in production nobody can write to them. Its throwaway password is `local-only-template-api`.
|
|
186
186
|
|
package/compose.local.yaml
CHANGED
|
@@ -52,6 +52,7 @@ services:
|
|
|
52
52
|
allow template-api Write topic notifications.outcomes.template-api.dead-letter
|
|
53
53
|
allow template-api Read group template-api. prefixed
|
|
54
54
|
KAFKA_PASSWORD_NOTIFICATIONS_API: local-only-notifications-api
|
|
55
|
+
KAFKA_PASSWORD_PLAYGROUND_API: local-only-playground-api
|
|
55
56
|
KAFKA_PASSWORD_TEMPLATE_API: local-only-template-api
|
|
56
57
|
|
|
57
58
|
lgtm:
|
package/compose.yaml
CHANGED
|
@@ -421,6 +421,16 @@ services:
|
|
|
421
421
|
topic notifications.outcomes.template-api 1
|
|
422
422
|
topic notifications.outcomes.template-api.dead-letter 1
|
|
423
423
|
allow notifications-api Write topic notifications.requests.template-api.dead-letter
|
|
424
|
+
topic notifications.requests.playground-api 1
|
|
425
|
+
topic notifications.requests.playground-api.dead-letter 1
|
|
426
|
+
topic notifications.outcomes.playground-api 1
|
|
427
|
+
topic notifications.outcomes.playground-api.dead-letter 1
|
|
428
|
+
allow notifications-api Write topic notifications.requests.playground-api.dead-letter
|
|
429
|
+
user playground-api
|
|
430
|
+
allow playground-api Write topic notifications.requests.playground-api
|
|
431
|
+
allow playground-api Read topic notifications.outcomes.playground-api
|
|
432
|
+
allow playground-api Write topic notifications.outcomes.playground-api.dead-letter
|
|
433
|
+
allow playground-api Read group playground-api. prefixed
|
|
424
434
|
tmpfs:
|
|
425
435
|
- /tmp
|
|
426
436
|
- /opt/kafka/logs:uid=1000,gid=1000
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zigordev/stack",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.1",
|
|
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",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/node": "26.6.10",
|
|
22
22
|
"typescript": "7.0.2",
|
|
23
|
-
"vitest": "5.1.
|
|
23
|
+
"vitest": "5.1.2"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|