Skip to content

Instantly share code, notes, and snippets.

View scyto's full-sized avatar

scyto

  • Seattle, WA, USA
  • 12:36 (UTC -07:00)
View GitHub Profile
@scyto
scyto / docker-swarm-architecture.md
Last active April 25, 2025 21:04
My Docker Swarm Architecture

This (and related gists) captures how i created my docker swarm architecture. This is intended mostly for my own notes incase i need to re-creeate anything later! As such expect some typos and possibly even an error...

Installation Step-by-Step

Each major task has its own gist, this is to help with maitainability long term.

  1. Install Debian VM for each docker host
  2. install Docker
  3. Configure Docker Swarm
  4. Install Portainer
  5. Install KeepaliveD
  6. Using VirtioFS backed by CephFS for bind mounts (migrating from glsuterFS - WIP)

Using keepalived for node ingress and dns relaibility

This assumes you have installed a docker swarm

Introduction

When one has a docker swarm a container running on any node in the swarm can be accesed using any IP address of any swarm memeber.

For example if you had a single web server running on port 80, on one node of a swarm you could access the web server with any of the following IP addresses:

  • server1-ip:80
  • server2-ip:80
@scyto
scyto / docker-swarm-portainer.md
Last active April 1, 2025 07:29
Installing Portainer on a swarm

This is how to install portainer on the swarm you created using this gist note this should work on non-swarm installs too!

Setup Portainer

Download the portain stack yaml that will do this for you

curl -L https://downloads.portainer.io/ce2-17/portainer-agent-stack.yml -o portainer-agent-stack.yml
@scyto
scyto / docker-swarm-install.md
Last active February 24, 2025 09:28
bootstrap docker swarm

i like using docker swarm for home labs

assumes you installed docker like this

Initialize Swarm on first docker node (management node)

sudo docker swarm init

it will produced output something like this

@scyto
scyto / debian-docker-install.md
Last active February 24, 2025 09:28
Install docker on debian the easy way

This is the easiest way to install docker and docker compose on debian.

Better yet docker updates can be done by rerunning the script mentioned or using apt upgrade etc

Assumes you followed Debian VM Install Instructions

Install Docker

Login as yourself

curl -fsSL https://get.docker.com -o get-docker.sh
@scyto
scyto / debian-vm-install.md
Last active February 24, 2025 09:19
Installing Debian as VM

This is the base of all my linux VM installs I use for docker etc

Prep Hypervisor (instructions vary based on hypervisor so this is generic)

  • Download netinst ISO from debian website
  • Create a VM on your hypervsor
  • VM Machine Spec:
    • 200GB
    • 2 CPU
    • 4GB RAM
    • Attach to external network