Deploying to remote Docker Instance

Hi there, I’ve started playing with Waypoint and really enjoying it so far. I was just curious about deploying my containerized app to a remote docker daemon? I’m running a Docker Swarm in some VMs and would like to use Waypoint to deploy to that cluster instead of the local Docker daemon.

Hey Tom,

I have not used Docker Swarm in a while, how does the connection work, is it just a standard Docker API that the Docker Client would connect to?

If it is as simple as this we could probably make the docker deploy use a different connection than the default. However, I am also guessing you would want to do things like setup memory / cpu constraints and replicas etc?

I think this could be a cool feature, but I am thinking it probably needs some plugin development work. At present we just discover the default Docker connection through either the DOCKER_HOST environment variable or the discover the local API.

Would you mind raising an issue on https://github.com/hashicorp/waypoint/issues describing the functionality you would like to see, please?

Kind regards,

Nic

1 Like

Hi Nic, thanks for the quick response. I can set the DOCKER_HOST variable for now and use that to start the container on the swarm cluster. I don’t know how many folks are using swarm but I think it still has some big customers. If there was some sort of mapping to the service commands : https://docs.docker.com/engine/reference/commandline/service/ that would be cool, I’m not really sure where to start with the plugin development but i’ll get a ticket created tomorrow and see if there is any interest in this.

Tom

Super happy to look at Swarm compatibility, my suspicion is that it will not be too difficult. We would, of course, love your help with plugin development but there are so many different ways in which you can help and contribute to Waypoint. Helping us understand technologies like Swarm is one of those so thank you for your help so far.

I will dig into this on Monday, I think it might be possible to achieve with the current plugin, however it might be better UX to create a Swarm specific plugin.

Kind regards,

Nic

With a remote docker plugin you can kill several birds with one stone. Docker-compose would be another.

Sorry for the delay. Feature Request created : https://github.com/hashicorp/waypoint/issues/627

Thanks, @tomwillfixit, I have created a PR to implement this functionality

2 Likes

Thanks very much Nic! That was super fast :slight_smile: I’ll think a bit more about the Swarm support and maybe reach out to some folks on Twitter to see if anyone is interested in helping create a plugin.

That would be amazing @tomwillfixit, shout out if we can help.

Kind regards,

Nic

Hey Tom,

I am pretty much in the same boat with you, i’m keen if Waypoint can support docker swarm as well. For a workaround, probably we can do the following:-

deploy {
  use "exec" {
    command = ["docker", "stack", "deploy", "-c", "<TPL>", "stackname"]

  template {
    path = "./template/docker-compose.yaml"
  }
 }
}

Official statement made by Mirantis in November 2019:

The primary orchestrator going forward is Kubernetes. Mirantis is committed to providing an excellent experience to all Docker Enterprise platform customers and currently expects to support Swarm for at least two years, depending on customer input into the roadmap. Mirantis is also evaluating options for making the transition to Kubernetes easier for Swarm users.

Swarm will be deprecated, I guess.

According to the following post, it doesn’t mean deprecated.

https://medium.com/@markuman/is-docker-swarm-mode-eol-7a3f316116a3

I have confirmed using deploy use "exec" with <TPL> to execute docker stack deploy works. The problem is the waypoint exec and waypoint logs doesn’t work.