Skip to content

Instantly share code, notes, and snippets.

View josephbolus's full-sized avatar

Joseph Bolus josephbolus

View GitHub Profile
@dhh
dhh / linux-setup.sh
Last active November 15, 2024 19:55
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
@scyto
scyto / swarm-updating-shepherd.md
Created May 15, 2022 02:05
use shepherd to update images

Update Swarm Images

i wanted to update swarm images whenever there is a new image available (even at the risk of breaking something)

it seems watchtower can't do this for swarm stacks/services - only one off containers.

I found this great container from https://github.com/djmaze/shepherd

placement considerations

Must be placed on a manager node.

@scyto
scyto / docker-swarm-architecture.md
Last active November 16, 2024 23:56
My Docker Swarm Architecture
@prologic
prologic / consul.yml
Created October 11, 2021 07:21
Consul Stack (Docker Swarm)
---
version: "3.8"
services:
seed:
image: consul:latest
environment:
- "CONSUL_LOCAL_CONFIG={\"disable_update_check\": true}"
- "CONSUL_BIND_INTERFACE=eth0"
entrypoint:
@shebpamm
shebpamm / kickstart.cfg.j2
Created September 24, 2021 11:32
Kickstart template for RHEL 8
lang en_US
keyboard us
timezone Europe/Helsinki --isUtc
reboot
text
cdrom
bootloader --location=mbr --append="rhgb quiet crashkernel=auto"
zerombr
clearpart --all --initlabel
autopart
@wllmsash
wllmsash / assigning-static-ip-addresses-in-wsl2.md
Last active October 18, 2024 16:44
Assigning Static IP Addresses in WSL2

Assigning Static IP Addresses in WSL2

WSL2 uses Hyper-V for networking. The WSL2 network settings are ephemeral and configured on demand when any WSL2 instance is first started in a Windows session. The configuration is reset on each Windows restart and the IP addresses change each time. The Windows host creates a hidden switch named "WSL" and a network adapter named "WSL" (appears as "vEthernet (WSL)" in the "Network Connections" panel). The Ubuntu instance creates a corresponding network interface named "eth0".

Assigning static IP addresses to the network interfaces on the Windows host or the WSL2 Ubuntu instance enables support for the following scenarios:

Simple envoy configuration with basic authentication and without authorization service

Sometime you need scrape prometheus metrics from external envoy that deploy not to kubernetes environment

You can use iptable or other stuff on external server to allow only trusted IP for scraping metrics - but for dynamic infrastructure some time it's hard to support it.

Envoy can expose this metrics more elegant style - using basic auth

Simple envoy.yaml

@lacek
lacek / README.md
Created November 27, 2020 10:28
MySQL InnoDB Cluster on Docker

Testing MySQL InnoDB Cluster with Docker

  1. Spin up the cluster
docker-compose up -d
docker-compose exec mysql1 mysqlsh -f /init.js
  1. Test access to the cluster
#!/bin/bash
PACKAGE=$(basename "$0")
# .----. _ .-. _ _
# `--. ::_;: :.-. :_;:_;
# ,','.-.: `'.' .--. .-..-.
# .'.'_ : :: . `.' '_.': :: :
# :____;:_;:_;:_;`.__.': ::_;
# .-. :
@pedrolamas
pedrolamas / docker-iptables-fix.sh
Created August 18, 2020 19:32
Script to fix Docker iptables on Synology NAS
#!/bin/bash
currentAttempt=0
totalAttempts=10
delay=15
while [ $currentAttempt -lt $totalAttempts ]
do
currentAttempt=$(( $currentAttempt + 1 ))
echo "Attempt $currentAttempt of $totalAttempts..."