All Projects → tiangolo → Dockerswarm.rocks

tiangolo / Dockerswarm.rocks

Docker Swarm mode rocks! Ideas, tools and recipes. Get a production-ready, distributed, HTTPS served, cluster in minutes, not weeks.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Dockerswarm.rocks

docker-ssl-reverse-proxy
Easy-to-use auto-SSL reverse proxy as a Docker container based on Caddy and Let’s Encrypt
Stars: ✭ 22 (-96.23%)
Mutual labels:  letsencrypt, https
docker-nginx-certbot
Automatically create and renew website certificates for free using the Let's Encrypt certificate authority.
Stars: ✭ 367 (-37.16%)
Mutual labels:  letsencrypt, https
docker-letsencrypt-django-nginx-proxy-uwsgi-postgres
Docker + Letsencrypt + Django + Nginx-Proxy + uWSGI 教學
Stars: ✭ 26 (-95.55%)
Mutual labels:  letsencrypt, https
Letsencrypt Zimbra
Files to automate the deploy of letsencrypt certificates to Zimbra
Stars: ✭ 138 (-76.37%)
Mutual labels:  https, letsencrypt
Certmagic
Automatic HTTPS for any Go program: fully-managed TLS certificate issuance and renewal
Stars: ✭ 3,864 (+561.64%)
Mutual labels:  https, letsencrypt
Nginxconfig.io
⚙️ NGINX config generator on steroids 💉
Stars: ✭ 14,983 (+2465.58%)
Mutual labels:  https, letsencrypt
django-template
The ultimate Django template: production ready Django 3.2 with Docker, HTTPS and CI/CD using Github actions ‎️‍🔥
Stars: ✭ 20 (-96.58%)
Mutual labels:  letsencrypt, https
Docker Nginx Gunicorn Flask Letsencrypt
Boilerplate code for setting up Nginx + Gunicorn + Flask + automated LetsEncrypt certificates (https) using docker-compose.
Stars: ✭ 117 (-79.97%)
Mutual labels:  https, letsencrypt
Acme Client Quick
get let's encrypt cert in five minutes
Stars: ✭ 295 (-49.49%)
Mutual labels:  https, letsencrypt
letsencrypt-www
Probably the easiest way to create | renew | deploy certificate
Stars: ✭ 27 (-95.38%)
Mutual labels:  letsencrypt, https
Ansible Role Certbot
Ansible Role - Certbot (for Let's Encrypt)
Stars: ✭ 477 (-18.32%)
Mutual labels:  https, letsencrypt
Pebble
A miniature version of Boulder, Pebble is a small RFC 8555 ACME test server not suited for a production certificate authority. Let's Encrypt is hiring! Work on Pebble with us.
Stars: ✭ 359 (-38.53%)
Mutual labels:  https, letsencrypt
Armor
Uncomplicated, modern HTTP server
Stars: ✭ 1,629 (+178.94%)
Mutual labels:  https, letsencrypt
Guacamole Install Rhel 7
Apache Guacamole installation bash script for RHEL 7 and CentOS 7 including options for Nginx, HTTPS, SSL, LDAP, Let's Encrypt certificates and more
Stars: ✭ 174 (-70.21%)
Mutual labels:  https, letsencrypt
Serverpilot Letsencrypt
Automate the installation of Let's Encrypt SSL on the free plan of ServerPilot
Stars: ✭ 129 (-77.91%)
Mutual labels:  https, letsencrypt
httpsbook
《深入浅出HTTPS:从原理到实战》代码示例、勘误、反馈、讨论
Stars: ✭ 77 (-86.82%)
Mutual labels:  letsencrypt, https
Certificaat
General-purpose ACME client
Stars: ✭ 88 (-84.93%)
Mutual labels:  https, letsencrypt
Certbot
Dockerized HTTPS with Let's Encrypt
Stars: ✭ 91 (-84.42%)
Mutual labels:  https, letsencrypt
django-yadpt-starter
Yet Another Django Project Template skeleton for Django projects
Stars: ✭ 28 (-95.21%)
Mutual labels:  letsencrypt, https
Certes
A client implementation for the Automated Certificate Management Environment (ACME) protocol
Stars: ✭ 357 (-38.87%)
Mutual labels:  https, letsencrypt

dockerswarm.rocks

Why?

Docker is a great tool (the "de facto" standard) to build Linux containers.

Docker Compose is great to develop locally with Docker, in a replicable way.

Docker Swarm Mode is great to deploy your application stacks to production, in a distributed cluster, using the same files used by Docker Compose locally.

So, with Docker Swarm Mode you have:

  • Replicability, use the same files as when developing locally.
  • Simplicity and speed for development and deployment.
  • Robustness and security, with fault-tolerant clusters.

Docker Swarm mode

If you have Docker installed, you already have Docker Swarm, it's integrated into Docker.

You don't have to install anything else.

Note

Whenever you read here "Docker Swarm" we are actually talking about "Docker Swarm mode".

Not the deprecated product called "Docker Swarm".

Alternatives

Some of the main alternatives are:

To use any of them you need to learn a huge new set of concepts, configurations, files, commands, etc.

About Docker Swarm mode

Docker Swarm mode is comparable to them.

But it, with all the ideas described here, is what I would recommend for teams of less than 200 developers, or clusters of less than 1000 machines.

This includes small / medium size organizations (like when you are not Google or Amazon), startups, one-man projects, and "hobby" projects.

Try it.

Set up a distributed cluster ready for production.

...In about 20 minutes.

If it doesn't work for you, then you can go for Kubernetes, Mesos or any other.

Those are great tools. But learning them might take weeks. So, the 20 minutes spent here are not much (and up to here you already spent 3 minutes).

Single server

With Docker Swarm mode you can start with a "cluster" of a single server.

You can set it up, deploy your applications and do everything on a $5 USD/month server.

And then, when the time to grow comes, you can add more servers to the cluster.

With a one-line command.

And you can create your applications to be ready for massive scale from the beginning, starting from a single small server.

About Docker Swarm Rocks

This is not associated with Docker or any of the tools suggested here.

It's mainly a set of ideas, documentation and tools to use existing open source products efficiently together.

Prerequisites

  • To know some Linux.
  • To know some Docker.

Install and set up

Install a new Linux server with Docker

  • Create a new remote VPS ("virtual private server").
  • Deploy the latest Ubuntu LTS ("long term support") version. At the time of this writing it's Ubuntu 18.04.
  • Connect to it via SSH, e.g.:
ssh [email protected]
  • Define a server name using a subdomain of a domain you own, for example dog.example.com.
  • Make sure the subdomain DNS records point to your VPS's IP address.
  • Create a temporal environment variable with the name of the host to be used later, e.g.:
export USE_HOSTNAME=dog.example.com
  • Set up the server hostname:
# Set up the server hostname
echo $USE_HOSTNAME > /etc/hostname
hostname -F /etc/hostname

Note: If you are not a root user, you might need to add sudo to these commands. The shell will tell you when you don't have enough permissions. Note that sudo does not preserve environment variables by default, but this can be enabled via the -E flag.

  • Update packages:
# Install the latest updates
apt-get update
apt-get upgrade -y
  • Install Docker following the official guide...
  • ...or alternatively, run the official convenience script:
# Download Docker
curl -fsSL get.docker.com -o get-docker.sh
# Install Docker using the stable channel (instead of the default "edge")
CHANNEL=stable sh get-docker.sh
# Remove Docker install script
rm get-docker.sh
  • If you are setting up multiple nodes (servers/VPSs), repeat these steps for each one.
    • Make sure you use a different domain/subdomain for each node.

Set up swarm mode

In Docker Swarm Mode you have one or more "manager" nodes and one or more "worker" nodes (that can be the same manager nodes).

The first step is to configure one (or more) manager nodes.

  • On the main manager node, run:
docker swarm init

Note: if you see an error like:

Error response from daemon: could not choose an IP address to advertise since this system has multiple addresses on interface eth0 (138.68.58.48 and 10.19.0.5) - specify one with --advertise-addr

...select the public IP (e.g. 138.68.58.48 in this example), and run the command again with --advertise-addr, e.g.:

docker swarm init --advertise-addr 138.68.58.48

Add manager nodes (optional)

  • On the main manager node, for each additional manager node you want to set up, run:
docker swarm join-token manager
  • Copy the result and paste it in the additional manager node's terminal, it will be something like:
 docker swarm join --token SWMTKN-1-5tl7yaasdfd9qt9j0easdfnml4lqbosbasf14p13-f3hem9ckmkhasdf3idrzk5gz 172.173.174.175:2377

Add worker nodes (optional)

  • On the main manager node, for each additional worker node you want to set up, run:
docker swarm join-token worker
  • Copy the result and paste it in the additional worker node's terminal, it will be something like:
docker swarm join --token SWMTKN-1-5tl7ya98erd9qtasdfml4lqbosbhfqv3asdf4p13-dzw6ugasdfk0arn0 172.173.174.175:2377

Check it

  • Check that the cluster has all the nodes connected and set up:
docker node ls

It outputs something like:

ID                            HOSTNAME             STATUS    AVAILABILITY    MANAGER STATUS    ENGINE VERSION
ndcg2iavasdfrm6q2qwere2rr *   dog.example.com      Ready     Active          Leader            18.06.1-ce
3jrutmd3asdf1ombqwerr9svk     cat.example.com      Ready     Active          Reachable         18.06.1-ce
i9ec9hjasdfaoyyjqwerr3iqa     snake.example.com    Ready     Active          Reachable         18.06.1-ce

Done

That's it.

You have a distributed Docker swarm mode cluster set up.

Check other sections in the documentation at https://dockerswarm.rocks to see how to set up HTTPS, you still have time, the 20 minutes are not over yet.

Then you can see how to deploy stacks, etc.

You already did the hard part, the rest is easy.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].