Skip to content

Instantly share code, notes, and snippets.

@scyto
scyto / watchtower-template.md
Created February 12, 2022 21:04
watchtower swarm template

Description

This template runs watchtower. This is new for me so still seeing if i like it! (fingers cross this works, yes need to setuyp smtp email at some point, lol)

State Considerations for SWARM

none, this container can be cofigured entirely by env vars so i use those

Network Considerations

none, no published port is needed

@scyto
scyto / infinitude-template.md
Last active February 13, 2022 02:59
infinitude for Carrier Infinity Thermostats (and Bryant)

Description

This template runs my infinitude proxy instance. This enables Carrier Inifinity Thermostats to be controlled by API, web page, home assistant etc) One note please for the love of god never buy a carrier heating system with one of these controls they are terrible in my experience. I inherited it, instead buy a nice generic heating/AC system that can support any standard thermostat.

State Considerations for SWARM

none, this container can be cofigured entirely by env vars so i use those

Network Considerations

none, this published port of 4000 for this container oveeride the interall 3000 because i have container that needed 3000 it can be reached by swarmIP:4000

@scyto
scyto / cloudflareddns-template.md
Created February 13, 2022 03:15
cloudflare DDNS updater swarm template

Description

This template runs my cloudflare dynamic DNS updater. It adjust the default container cron job from 5 minutes to 1 minute because i have failover WAN ports.

State Considerations for SWARM

none, this container can be cofigured entirely by env vars so i use those

Network Considerations

none, this need no special port mappings or other considerations consider using an secret to store the API

@scyto
scyto / unifi-poller.template.md
Last active February 13, 2022 03:24
unifi poller swarm template

Description

This is my most complex stack to date. It runs the unifi-poller (uPoller) application consisting of an influx database, grafana dashboard and the uPoller collector.

State Considerations for SWARM

This has a lot of state (database, provisioning directory for granfa, state for grafana, config file for upoller, etc.)

This time i chose to store each of these in their own glusterfs volume mount using the gluster volumefs driver.

This has the advatages of creating folders that alread have the uid:gid of the grafan container (instead of messing around with chown and chmod)

@scyto
scyto / docker-swarm-portainer.md
Last active March 23, 2023 20:05
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 / traefik-template.md
Last active August 18, 2023 21:51
traefik swarm template

Description

This template runs my experimental traefik server for evaluating if i move to it from handcrafted nginx proxy.

State Considerations for SWARM

traefik requires a static configuration - you need to pick either file based on command line based (or all commands need to be in your stack). you cannot mix these - for example if you put some settigs in a file doing additonal static config via command line then things kike env vars will be ignored i chose to put the static config in a traefik.yml file this seems to be considerd best practice in 2.6 by some i also configured a dynamic files folder - this is for aything that can't or shouldn't be configured in a docker file (middlewares, non-docker related routers etc)

Network Considerations

@scyto
scyto / 001-README.md
Created August 20, 2023 21:33 — forked from shbatm/001-README.md
Home Assistant USBIP Z-Wave Setup w/ More Robust Restart Management
@scyto
scyto / dhcp_option119.py
Created February 20, 2022 06:23 — forked from SmartFinn/dhcp_option119.py
a script for converting domain names to DHCP Option 119 (Domain Search Option)
#!/usr/bin/env python3
"""Command generator for setting DHCP Option 119
This script converts the specified domain names to DHCP Option 119
(Domain Search Option) and prints commands for various DHCP servers.
USAGE:
./dhcp_option119.py DOMAIN ...
EXAMPLE:
@scyto
scyto / openfabric-mesh-net.md
Last active September 22, 2023 03:50
setup openfabric for thunderbolt / ceph network

Enable IPv6 and IPv4

NOTE: as of 9/14/2023 this will only work with a custom patched linux kernel6.5.2 Proxmox have indicated they will back port these patches contact me on the proxmox forum if you wish to roll the patches yourself

Key Parameters

Nodel:

  • IPv4 Address = 10.0.0.81/32
  • IPv6 Address = fc00::81/128

Setup HTTPS Certs with ACME

I use Cloudflare as my external DNS provider and will be using this for my challenge, if you don't use cloudlfare adjust accordingly.

this gist is part of this series

Create Account

  1. navigate to Datcenter > ACME
  2. under accounts click add
  3. the account name is anything useful to you - i recommend using something like <mydomain>-<tld>-acme where mydomain is your DNS domain prefix and tld is the suffice (like com or net etc) so mydomain-com-acme
  4. enter your email