thojkooi / terraform-digitalocean-docker-swarm-mode

Terraform module for provisioning a Docker Swarm mode cluster on DigitalOcean
https://registry.terraform.io/modules/thojkooi/docker-swarm-mode/digitalocean
MIT License
63 stars 27 forks source link

coreos / bash #18

Closed ghost closed 6 years ago

ghost commented 6 years ago

is... this only meant to be used with something that comes with docker and bash pre-installed?

what about using it with coreos?

thojkooi commented 6 years ago

I've not tried this with coreos. I will take a look and see if it works ok or if it can easily be adapted to work with it.

thojkooi commented 6 years ago

It works fine with CoreOS. I didn't realise when I wrote my earlier reply that the default image actually is coreos-alpha (It's been a little while since I last looked at it).

But yes, it does require that docker and bash are pre-installed. It also requires that the Swarm communication ports are opened on the machine's firewall, e.i. iptables, firewalld or ufw.

Otherwise, you can install Docker using user-data - the provision script will wait until the Docker daemon is up and running. This is an example using centOS 7 and a bash script as user data to install Docker CE.

Or prepare a snapshot on DigitalOcean which comes with everything pre-installed and pass that as the image (how I run the module myself).

ghost commented 6 years ago

<3

ghost commented 6 years ago

installed on the dev machine, not the cluster? I know docker would need to be installed on the cluster. - Thank you for answering my question :D

thojkooi commented 6 years ago

Docker does not need to be installed on the dev machine, unless you want to use the Docker CLI to connect to a remote docker API.