Skip to content

Commit c8ee02d

Browse files
authored
feat: Add taskbroker + worker + scheduler (#3738)
1 parent 1217f46 commit c8ee02d

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ SENTRY_IMAGE=getsentry/sentry:nightly
1313
SNUBA_IMAGE=getsentry/snuba:nightly
1414
RELAY_IMAGE=getsentry/relay:nightly
1515
SYMBOLICATOR_IMAGE=getsentry/symbolicator:nightly
16+
TASKBROKER_IMAGE=getsentry/taskbroker:nightly
1617
VROOM_IMAGE=getsentry/vroom:nightly
1718
HEALTHCHECK_INTERVAL=30s
1819
HEALTHCHECK_TIMEOUT=1m30s

.github/ISSUE_TEMPLATE/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ body:
1515
- [ ] [`snuba`](https://github.com/getsentry/snuba/actions/workflows/release.yml)
1616
- [ ] [`symbolicator`](https://github.com/getsentry/symbolicator/actions/workflows/release.yml)
1717
- [ ] [`vroom`](https://github.com/getsentry/vroom/actions/workflows/release.yaml)
18+
- [ ] [`taskbroker`](https://github.com/getsentry/taskbroker/actions/workflows/release.yml)
1819
- [ ] Release self-hosted.
1920
- [ ] [Prepare the `self-hosted` release](https://github.com/getsentry/self-hosted/actions/workflows/release.yml) (_replace with publish issue repo link_).
2021
- [ ] Check to make sure the new release branch in self-hosted includes the appropriate CalVer images.

docker-compose.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,24 @@ services:
487487
<<: *depends_on-healthy
488488
web:
489489
<<: *depends_on-healthy
490+
taskbroker:
491+
<<: *restart_policy
492+
image: "$TASKBROKER_IMAGE"
493+
environment:
494+
TASKBROKER_KAFKA_CLUSTER: "kafka:9092"
495+
TASKBROKER_KAFKA_DEADLETTER_CLUSTER: "kafka:9092"
496+
TASKBROKER_DB_PATH: "/opt/sqlite/taskbroker-activations.sqlite"
497+
volumes:
498+
- sentry-taskbroker:/opt/sqlite
499+
depends_on:
500+
kafka:
501+
<<: *depends_on-healthy
502+
taskscheduler:
503+
<<: *sentry_defaults
504+
command: run taskworker-scheduler
505+
taskworker:
506+
<<: *sentry_defaults
507+
command: run taskworker --concurrency=4 --rpc-host=taskbroker:50051 --num-brokers=1
490508
vroom:
491509
<<: *restart_policy
492510
image: "$VROOM_IMAGE"
@@ -541,6 +559,10 @@ volumes:
541559
# Not being external will still persist data across restarts.
542560
# It won't persist if someone does a docker compose down -v.
543561
sentry-vroom:
562+
# This volume stores task data that is inflight
563+
# It should persist across restarts. If this volume is
564+
# deleted, up to ~2048 tasks will be lost.
565+
sentry-taskbroker:
544566
# These store ephemeral data that needn't persist across restarts.
545567
# That said, volumes will be persisted across restarts until they are deleted.
546568
sentry-secrets:

scripts/bump-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -eu
44
OLD_VERSION="$1"
55
NEW_VERSION="$2"
66

7-
sed -i -e "s/^\(SENTRY\|SNUBA\|RELAY\|SYMBOLICATOR\|VROOM\)_IMAGE=\([^:]\+\):.\+\$/\1_IMAGE=\2:$NEW_VERSION/" .env
7+
sed -i -e "s/^\(SENTRY\|SNUBA\|RELAY\|SYMBOLICATOR\|TASKBROKER\|VROOM\)_IMAGE=\([^:]\+\):.\+\$/\1_IMAGE=\2:$NEW_VERSION/" .env
88
sed -i -e "s/^\# Self-Hosted Sentry .*/# Self-Hosted Sentry $NEW_VERSION/" README.md
99

1010
echo "New version: $NEW_VERSION"

0 commit comments

Comments
 (0)