In our deployment scenarios we need each stack to be exactly deployed in one and only one of the available hosts. This can be defined manually from Rancher UI but it's error prone: if the admin forgets it the Rancher scheduler could deploy containers to other hosts causing disastrous issues (e.g. to nginx on the same host without lb in front of them, etc.).
We need to find a way to automate the affinity, without relying on "fixed" affinity labels in Docker compose.
In our deployment scenarios we need each stack to be exactly deployed in one and only one of the available hosts. This can be defined manually from Rancher UI but it's error prone: if the admin forgets it the Rancher scheduler could deploy containers to other hosts causing disastrous issues (e.g. to nginx on the same host without lb in front of them, etc.). We need to find a way to automate the affinity, without relying on "fixed" affinity labels in Docker compose.
Maybe this can help: https://rancher.com/docs/rancher/v1.6/en/cattle/scheduling/#global-service