mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-06-28 14:51:43 +00:00
feat: add workers autodicsovery feature (#121)
* add workers autodicsovery feature * suppress erros while retrieving worker list * update recipes * fix tests and update docs * filter health checks * ping based workers
This commit is contained in:
@ -8,4 +8,4 @@
|
||||
6. All updates from worker instances are uploaded to the web service.
|
||||
7. Repository is available at `http://localhost:8080/repo`.
|
||||
|
||||
Note, in this configuration, workers are spawned in replicated mode, thus the backend accesses them in round-robin-like manner.
|
||||
In this example, worker list is automatically defined based on the addresses they reported.
|
||||
|
@ -77,6 +77,10 @@ services:
|
||||
interval: 10s
|
||||
start_period: 30s
|
||||
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
|
||||
command: web
|
||||
|
||||
configs:
|
||||
|
@ -2,7 +2,7 @@
|
||||
target = configuration
|
||||
|
||||
[build]
|
||||
workers = http://worker:8080 http://worker:8080
|
||||
triggers = ahriman.core.distributed.WorkerLoaderTrigger ahriman.core.gitremote.RemotePullTrigger ahriman.core.report.ReportTrigger ahriman.core.upload.UploadTrigger ahriman.core.gitremote.RemotePushTrigger
|
||||
|
||||
[status]
|
||||
username = demo
|
||||
|
@ -2,7 +2,7 @@
|
||||
target = configuration
|
||||
|
||||
[build]
|
||||
triggers = ahriman.core.upload.UploadTrigger ahriman.core.report.ReportTrigger
|
||||
triggers = ahriman.core.distributed.WorkerTrigger ahriman.core.upload.UploadTrigger ahriman.core.report.ReportTrigger
|
||||
|
||||
[status]
|
||||
address = http://backend:8080
|
||||
@ -20,3 +20,6 @@ wait_timeout = 0
|
||||
target = remote-service
|
||||
|
||||
[remote-service]
|
||||
|
||||
[worker]
|
||||
address = http://$HOSTNAME:8080
|
||||
|
Reference in New Issue
Block a user