Page MenuHomeSoftware Heritage

D4901.diff
No OneTemporary

D4901.diff

diff --git a/docker/conf/scheduler_journal_client.yml b/docker/conf/scheduler_journal_client.yml
new file mode 100644
--- /dev/null
+++ b/docker/conf/scheduler_journal_client.yml
@@ -0,0 +1,7 @@
+journal:
+ brokers:
+ - kafka
+ group_id: swh.scheduler.journal_client
+scheduler:
+ cls: remote
+ url: http://swh-scheduler:5008/
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -391,7 +391,6 @@
- "./services/swh-indexer-worker/entrypoint.sh:/entrypoint.sh:ro"
# Journal related
-
swh-indexer-journal-client:
image: swh/stack
build: ./
@@ -405,3 +404,16 @@
volumes:
- "./conf/indexer_journal_client.yml:/etc/softwareheritage/indexer/journal_client.yml:ro"
- "./services/swh-indexer-journal-client/entrypoint.sh:/entrypoint.sh:ro"
+
+ swh-scheduler-journal-client:
+ image: swh/stack
+ build: ./
+ entrypoint: /entrypoint.sh
+ env_file:
+ - ./env/common_python.env
+ depends_on:
+ - kafka
+ - swh-scheduler
+ volumes:
+ - "./conf/scheduler_journal_client.yml:/etc/softwareheritage/scheduler/journal_client.yml:ro"
+ - "./services/swh-scheduler-journal-client/entrypoint.sh:/entrypoint.sh:ro"
diff --git a/docker/services/swh-scheduler-journal-client/entrypoint.sh b/docker/services/swh-scheduler-journal-client/entrypoint.sh
new file mode 100755
--- /dev/null
+++ b/docker/services/swh-scheduler-journal-client/entrypoint.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -e
+
+source /srv/softwareheritage/utils/pyutils.sh
+setup_pip
+
+case "$1" in
+ "shell")
+ exec bash -i
+ ;;
+ *)
+ echo "Starting swh-scheduler-journal client"
+ exec wait-for-it kafka:9092 -s --timeout=0 -- \
+ swh --log-level DEBUG scheduler --config-file /etc/softwareheritage/scheduler/journal_client.yml journal-client
+ ;;
+esac

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 17, 5:56 PM (2 d, 18 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3217452

Event Timeline