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 / Jenkinsfile
Created January 13, 2020 16:07
Multi-architecture Jenkins Docker Builds with Docker manifest support
pipeline {
environment {
registryCredential = 'harbor-lol-jenk-robot'
DOCKER_IMAGE = sh 'echo ${JOB_NAME} | sed "s/gitea-larkspur//g" | sed "s/master//g"'
registry = "" /*be sure to include trailing slash*/
docker_image_name = "bgulla/rtl-tcp"
docker_img = "${registry}${docker_image_name}"
/* */
push_to_local_registry = true
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
pipeline {
environment {
registryCredential = 'harbor-lol-jenk-robot'
DOCKER_IMAGE = sh 'echo ${JOB_NAME} | sed "s/gitea-larkspur//g" | sed "s/master//g"'
registry = "" /*be sure to include trailing slash*/
docker_image_name = "bgulla/k8s757-flask"
docker_img = "${registry}${docker_image_name}"
/* */
push_to_local_registry = true
@bgulla
bgulla / kickstart.cfg
Last active November 12, 2019 15:44
Kickstarting a CentOS server
#####
# On the host that you want to run your kickstart server (in the folder containing kickstart.cfg):
# docker run --restart=always -p 9999:80 -v ${PWD}/kickstart.cfg:/var/www/html/kickstart.cfg nginx
#####
# Instructions:
# - Boot into a fresh CentOS box. When you get presented with the ASCII menu, press tab then type:
# ks=http://<IP_OF_KICKSTART_BOX>:9999/kickstart.cfg . Then press enter.
## kickstart.cfg
#####
@bgulla
bgulla / rancherOnProx.md
Last active June 17, 2020 16:35
Rancher Install Guide for n00bs

Greenfield Rancher install

Pre-Rancher Steps

Kubernetes Persistent Storage

Head to your synology/freenas and setup a new NFS share just for your kubernetes persistent storage. Make sure to turn off authentication.

Networking - Create a vlan just for your VMs

  1. Create a vlan (10.0.X.1 or 192.168.X.1) just for your VMs in your Unifi Controller, dont worry about firewall or traffic shaping. What I typically do is once I have created the vlan, I go to the Unifi Switch configuration area, and assign the port that the server is being plugged-into as being mapped to my VM-VLAN.
  2. Create a vlan for your Ingress Controller/Metallb. Just create the vlan and we'll worry about the rest later.
@bgulla
bgulla / meterears-preview.py
Created August 14, 2019 12:49
Reading electric meters using a usb-sdr
#!/usr/bin/python
import sys
import os
import platform
import time
import subprocess
import json
import socket
import logging
from influxdb import InfluxDBClient
@bgulla
bgulla / oc-cli-arm64.md
Last active November 18, 2021 03:10
Installing oc-cli on Jetson Nano

Building oc-cli for ARM Architectures

ARM64/AARCH64 (Jetson Nano) or RPi 4

cd $GOPATH
git clone -b release-3.11 https://github.com/openshift/origin.git
sudo apt install libgpgme-dev -y 
mkdir -p src/github.com/openshift
mv origin src/github.com/openshift/
go build -v github.com/openshift/origin/cmd/oc
@bgulla
bgulla / rancher_uninstall.sh
Created July 29, 2019 19:43
Removes rancher from a host
docker rm -f $(docker ps -qa)
docker rmi -f $(docker images -q)
docker volume rm $(docker volume ls -q)
sleep 1
for mount in $(mount | grep tmpfs | grep '/var/lib/kubelet' | awk '{ print $3 }') /var/lib/kubelet /var/lib/rancher; do umount $mount; done
rm -rf /etc/ceph \
/etc/cni \
@bgulla
bgulla / imessage_dump.py
Created June 25, 2019 15:20
Dumps all images from iMessages.
import os
import shutil
mkdir ~/Desktop/imessage
rootDir = "/Users/${USER}/Library/Messages/Attachments"
destDir = "/Users/${USER}/Desktop/imessage"
IGNORE_STRING = "pluginPayloadAttachment"
for dirName, subdirList, fileList in os.walk(rootDir):
#print("Found directory: %s" % dirName)
@bgulla
bgulla / jetson_nano_cheatsheet.md
Last active September 5, 2022 21:29
Notes related to the NVIDIA Jetson Nano dev kit

Jetson Nano Cheatsheet

image text

Below are my personal notes related to the Nvidia Jetson Nano Dev-board.

Performance Management

Nvidia allows your to fine tune the performance of your Jetson nano. More on this here.

Show the current settings

sudo /usr/bin/jetson_clocks.sh --show