Skip to content

Instantly share code, notes, and snippets.

View full-sized avatar

Zachary Loeber zloeber

View GitHub Profile
View deploy-syncthing.sh
#!/bin/bash
# Installs and configures a user syncthing deployment on Ubuntu
# Add the release PGP keys:
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
# Add the "stable" channel to your APT sources:
echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
@zloeber
zloeber / gist:d01a6dde6bce82b216b6631d2ed0d612
Created April 6, 2020 03:45
Kubernetes Terraform App Deployment Brief Example
View gist:d01a6dde6bce82b216b6631d2ed0d612
resource kubernetes_namespace deployment {
metadata {
name = var.namespace
}
}
// Example Secrets to expose as env vars in deployment
resource kubernetes_secret appsecrets {
metadata {
name = "appsecrets"
@zloeber
zloeber / minikube-up.sh
Created April 2, 2020 13:17
minikube-up.sh
View minikube-up.sh
#!/bin/bash
# Work around script to get minikube running on Ubuntu 19.10
# - Updates local firewall settings (ufw)
# - Whacks your local ./.kube and ./.minikube folders!
# - Runs sudo commands to get things running but does not require sudo to run thereafter
export MINIKUBE_WANTUPDATENOTIFICATION=false
export MINIKUBE_WANTREPORTERRORPROMPT=false
export MINIKUBE_HOME=$HOME
export CHANGE_MINIKUBE_NONE_USER=true
View gist:f9667986bbfa264eae7c2df902a29def
name: ado-var-group-sync
trigger:
batch: true
branches:
include:
- master
paths:
include:
- config/*
View gist:d1920706d1663946033f43e703d4d5a9
## ado-variable-group.yml
# Use az cli to update or create an ADO variable group like a crazy person
# sourceFile is a generic .env file with entries in VAR=VALUE format.
parameters:
sourceFile: ''
groupName: ''
overwrite: 'true'
adoProject: ''
adoOrg: ''
View gist:bc3e48aa20001c81b718fdcfc4f58ce5
# Login
az login --service-principal \
--username "${SPNAPPID}" \
--password "${SPNSECRET}" \
--tenant "${TENANTID}"
# Add the cli extension
az extension add --name azure-devops
# Profit!
View gist:80453b3ce0630ab5851e492eb463d52a
count(kured_reboot_required) BY (instance) * ON (instance) GROUP_LEFT (node) kured_reboot_required > 0
@zloeber
zloeber / kured-helmfile.yml
Created March 14, 2020 18:27
kured-helmfile
View kured-helmfile.yml
helmDefaults:
tillerless: true
tillerNamespace: platform
atomic: true
verify: false
wait: false
timeout: 600
recreatePods: false
force: true