2026-09-19 20:46 UTC
Happy weekend dear fellow fedizens :hamsterdance:
Could someone help me figure out a specific #docker #dockerswarm networking thing?
I want to deploy a service with multiple replicas on a docker swarm mode cluster.
The container replicas / tasks need to be able to reach each other individually at predictable/templateable urls, without manual configuration.
I'm trying to make a #coopcloud recipe for #etcd (distributed key-value store). This will only be useful for multi-node co-op cloud, but would facilitate e.g. high availability postgresql via Patroni, and other interesting distributed computing stuffs.
[Here's](https://codeberg.org/papiris/etcd-recipe) the draft of the recipe, showing my attempts to template. In its current form, the individual replicas are reachable via `<service_name>.<task_slot (aka replica nr)>.<random hash which changes every container restart>`, but I don't know how to template the hash part or make a more stable alias per replica.
For a busybox service with multiple replicas, setting hostname like this in compose.yml lets the replicas resolve each other by e.g. busybox.1 ;
hostname: {{.Service.Name}}.{{.Task.Slot}}
But doing the same doesn't let the etcd replicas connect with each other... Does etcd need some special consideration?
Advice appreciated!
#homelab #etcd #selfhosting #CollectiveHosting #distributedComputing #fediAsk
Replies (0)
No replies.