Skip to content

Instantly share code, notes, and snippets.

View Drallas's full-sized avatar
🎈

Drallas

🎈
  • Planet Earth
  • 20:38 (UTC +01:00)
View GitHub Profile
@scyto
scyto / docker-auto-label.md
Last active September 6, 2024 03:57
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 gist is part of this series

This assumes you are running Proxmox 8.2 and that the line source /etc/network/interfaces.d/* is at the end of the interfaces file (this is automatically added to both new and upgraded installations of Proxmox 8.2).

This changes the previous file design thanks to @NRGNet for the suggestions to move thunderbolt settings to a file in /etc/network/interfaces.d it makes the system much more reliable in general, more maintainable esp for folks using IPv4 on the private cluster network (i still recommend the use of the IPv6 FC00 network you will see in these docs)

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

@scyto
scyto / glsuterfs-volume-plugin.md
Last active November 14, 2024 18:28
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 November 13, 2024 11:24
My Docker Swarm Architecture
@JonnyWong16
JonnyWong16 / sync_playlists_to_users.py
Last active October 15, 2024 03:54
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