Skip to content

Instantly share code, notes, and snippets.

View Drallas's full-sized avatar
🎈

Drallas

🎈
  • Planet Earth
  • 16:35 (UTC +02:00)
View GitHub Profile
@scyto
scyto / docker-auto-label.md
Last active October 5, 2023 21:54
docker auto label

Auto Label

This container puts a label on each machine based on a config that matches service names. If the service is running the label gets a 1 and if the label get as 0 its not running. this can be used with constraints to either locate serices on a node with another service OR make sure a service doesn't land on a node with another service

I would love to find a better version of this that does this without the need for the manual config file (you can use a file bindmount instead of a config if you prefer)

Swarm Consideration

State is all read-only in a config

Enable Dual Stack (IPv4 and IPv6) OpenFabric Routing

This will result in an IPv4 and IPv6 routable mesh network that can survive any one node failure or any one cable failure. Alls the steps in this section must be performed on each node

Note for ceph do not dual stack - either use IPv4 or IPv6 addressees for all the monitors, MDS and daemons - despite the docs implying it is ok my findings on quincy are is it is funky....

this gist is part of this series

Create Loopback interfaces

Doing this means we don't have to give each thunderbolt a manual IPv6 or IPv4 addrees and that these addresses stay constant no matter what.

@scyto
scyto / glsuterfs-volume-plugin.md
Last active September 27, 2023 07:29
installing a glusterfs volume plugin

Description

I wanted a simpler way to assign gluster volumes in new stacks without having to create directories by hand There are variety of community plugins for this.

I chose to use this one https://github.com/chrisbecke/glusterfs-volume It creates a directory called <stackname>_<volumename> for each volume defined in the stack.

Pre-reqs

Assume you setup glusterfs per this gist here

@scyto
scyto / docker-swarm-architecture.md
Last active April 29, 2024 19:12
My Docker Swarm Architecture
@JonnyWong16
JonnyWong16 / sync_playlists_to_users.py
Last active April 20, 2024 12:14
Sync Plex playlists to shared users.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Description: Sync Plex playlists to shared users.
# Author: /u/SwiftPanda16
# Requires: plexapi
from plexapi.exceptions import NotFound
from plexapi.server import PlexServer