Created
July 15, 2015 20:08
-
-
Save andrewwatson/deb53c5367533e3dfe6b to your computer and use it in GitHub Desktop.
running docker machine and docker from terraform local-exec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provisioner "local-exec" { | |
command = "docker-machine create -d generic --generic-ssh-user=ubuntu --generic-ip-address=${self.public_ip} --generic-ssh-key ${var.key_path} --engine-opt dns=172.17.42.1 --engine-opt dns-search=service.consul discovery-${count.index}" | |
} | |
provisioner "local-exec" { | |
command = "docker --tlsverify --tlscacert=\"$HOME/.docker/machine/machines/discovery-${count.index}/ca.pem\" --tlscert=\"$HOME/.docker/machine/machines/discovery-${count.index}/cert.pem\" --tlskey=\"$HOME/.docker/machine/machines/discovery-${count.index}/key.pem\" -H=tcp://${self.public_ip}:2376 ps" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment