docker
docker copied to clipboard
docker stack deploy compatible
docker stack deploy
(soon to be integrated with kubernetes or using kompose
) is not compatible with container_name
, I just commented it out but it is not clear from the outside if this was just cosmetics or if it's required for the functioning of this compose file.
If cosmetics, could you drop it?
+1
@blaggacao Did you managed to deploy it to Docker Swarm?
@matjazmav I'm currently waiting for some upstream upgrades (basically GA of Rancher 2.0) so to shift all infrastructure to k8s. Untill then I unfortunately do not have much time to invest further in this..
I have a working compose file tested on our local cluster: https://github.com/Kelvinrr/docker-postgis-citus/blob/master/docker-compose.yml
From my experience, name doesn't matter, although someone correct if otherwise. Most of the problems in running on swarm was the manager. I worked around the issues in the compose file:
-
All services must run the same project, docker swarm doesn't seem to automatically assign project names. Manager filters events on project name to detect workers and add them to master.
-
Docker python API only gets events from the node it is on. Temporary solution: change deploy mode to global so all nodes have a manager. Better solution: single manager node which gets events from all swarm nodes, solution seems non obvious and the temp fix was easy enough.
-
If a worker is stood up before the mananger starts to look for workers, the worker may not be added (depends_on is ignored on docker swarm), temporary solution is to scale workers to 0 and back to a normal scale, good enough for experimentation. Better solution: update manager with a smarter protocol for adding workers.
Overall, I think the solution for docker stack compatibility is a update to https://github.com/citusdata/membership-manager
Alternatively, workers can be added manually and circumvent manager.py entirely.
Still no progress for the docker stack ?