Docker Community Forums

Share and learn in the Docker community.

Automation for Docker Cloud


(Abid Omar) #1

What do you use for automation? I have been using Terraform but they don’t have a Docker Cloud provider.

I’m looking for a similar tool that can:

  1. connect to docker cloud, push my stack and deploy it.

  2. get my stack ip address/dns name

  3. setup my cloudflare domains

any ideas


(David Maze) #2

I use Terraform to provision instances, and then Ansible to load containers on to them.

I don’t personally use Docker Cloud, but it looks like you just need to make sure its agent process is running on your target node. For that matter, the (dangerous) curl command shown on that page could be run from a Terraform provisioner block.

For non-trivial things, this is the the domain of Ansible (Salt, Chef, Puppet). For trivial things, use a Terraform provisioner block (maybe attached to a null_resource resource).

Both of these are things Terraform does well. (I’m on AWS, and eventually realized it is easy to just always create a Route 53 DNS record for every instance I create; I avoid needing IP addresses directly as much as I can.)