Skip to content

Generate auto-signed TLS certificates for your docker swarm cluster

Notifications You must be signed in to change notification settings

robertbio/swarm-is-easy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Generate auto-signed TLS certificates for your docker swarm cluster

An entrypoint for people seeking resources about how we can deploy a docker swarm cluster, securize docker connection, generate certificates. It's really simple with docker machine, but I had difficulties finding online tutorial.

The script is not perfect, you have to enter informations about certificates. Think to fill the "common name" field with the hostname of your machine.

##How it works Docker swarm require the same Certificate Authority to sign the swarm master, which control the cluster, and the nodes.

  1. The script generate the CA, the certificate to make the swarm master running under TLS.

  2. Generating the client keys, so you'll have access to your master (could be useful).

  3. Send via ssh the CA to the nodes, and generates certificate.

  4. Change the systemd startup script of docker to use the certificate and listen port 2376 (not working if you're not using systemd).

  5. Use the new_swarm.sh script to launch swarm container on node & swarm controller on master with the certificate.

  6. Tada ! (Or maybe it's not working, I'm sorry) ##To read :

Docker TLS documentation

Docker Swarm documentation

####The excellent Sheerun :

His blog for explanation on how docker with TLS works

His script to securize docker

Special thanks to Armand Grillet for loosing his hair trying to solve this problem on the first versions of docker swarm.

About

Generate auto-signed TLS certificates for your docker swarm cluster

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%