Skip to content

Instantly share code, notes, and snippets.

View bgulla's full-sized avatar
🦃
fast and loose is still fast.

Brandon bgulla

🦃
fast and loose is still fast.
  • Rancher Federal
  • Virginia
View GitHub Profile
@bgulla
bgulla / proxmox_cloudinit_generator.sh
Last active May 28, 2020 20:07
[Proxmox] Generates VMs via cloudinit.
#!/bin/bash
TEMPLATE_ID=9000
DISK_EXPAND_SIZE="+10G"
VMID=301
VMNAME=freetacos
VM_MEMORY=2048
IP_GATEWAY="10.0.8.1"
IP_RANGE="10.0.8.223/24"
@bgulla
bgulla / proxmox_cloudinit_generator.sh
Created May 28, 2020 20:07
[Proxmox] Generates VMs via cloudinit.
#!/bin/bash
TEMPLATE_ID=9000
DISK_EXPAND_SIZE="+10G"
VMID=301
VMNAME=freetacos
VM_MEMORY=2048
IP_GATEWAY="10.0.8.1"
IP_RANGE="10.0.8.223/24"
, , _______________________________
,-----------|'------'| | |
/. '-' |-' |_____________________________|
|/| | |
| .________.'----' _______________________________
| || | || | |
\__|' \__|' |_____________________________|
|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|
|________________________________________________________|
---
accessLogs:
enabled: "true"
acme:
challengeType: "dns-01"
dnsProvider:
name: "namecheap"
existingSecretName: "dnsprovider-secret"
email: "[email protected]"
enabled: "true"
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
selector:
matchLabels:
app: nginx
template:
metadata:
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: default
protocol: layer2
UNIFI_HOME=/volume1/docker/data/unifi
#UNIFI_HOME=/opt/docker/data/unifi
mkdir -p ${UNIFI_HOME}
mkdir -p unifi/data
mkdir -p unifi/log
docker rm --force cloudkey
docker run -d --name=cloudkey --restart=always \
--init \
-p 8080:8080 \
-p 8443:8443 \
@bgulla
bgulla / extended-cleanup-rancher2.sh
Created March 5, 2020 16:26 — forked from superseb/extended-cleanup-rancher2.sh
Extended Rancher 2 cleanup (backup your data, use at your own risk)
#!/bin/sh
# Backup your data
# Use at your own risk
# Usage ./extended-cleanup-rancher2.sh
# Include clearing all iptables: ./extended-cleanup-rancher2.sh flush
docker rm -f $(docker ps -qa)
docker rmi -f $(docker images -q)
docker volume rm $(docker volume ls -q)
for mount in $(mount | grep tmpfs | grep '/var/lib/kubelet' | awk '{ print $3 }') /var/lib/kubelet /var/lib/rancher; do umount $mount; done
cleanupdirs="/etc/ceph /etc/cni /etc/kubernetes /opt/cni /opt/rke /run/secrets/kubernetes.io /run/calico /run/flannel /var/lib/calico /var/lib/etcd /var/lib/cni /var/lib/kubelet /var/lib/rancher/rke/log /var/log/containers /var/log/pods /var/run/calico"
import json
import random
import time
import logging
import requests
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
@bgulla
bgulla / main.yml
Created January 13, 2020 17:33
Ansible-playbook to customize Proxmox installs
# _ _
# _ ____ _____ _ __ __ _| |_ ___| |__
# | '_ \ \ / / _ \_____| '_ \ / _` | __/ __| '_ \
# | |_) \ V / __/_____| |_) | (_| | || (__| | | |
# | .__/ \_/ \___| | .__/ \__,_|\__\___|_| |_|
# |_| |_|
#############
# TODO