Skip to content

Instantly share code, notes, and snippets.

@heartshare
heartshare / .gitignore
Created Jun 16, 2021 — forked from pdxjohnny/.gitignore
Setting Up k3s for Serverless (knative) on a $5 DigitalOcean Droplet Using k3d
View .gitignore
.terraform/
*.pem
*.tf
*.tfstate
*.yaml
*.backup
istio-*/
cert-manager-*/
*.swp
env
@heartshare
heartshare / proxmox-get-vm-ip.sh
Created May 12, 2021 — forked from pschmitt/proxmox-get-vm-ip.sh
Get the IP address of a VM hosted on Proxmox
View proxmox-get-vm-ip.sh
#!/usr/bin/env bash
usage() {
echo "$(basename $0) VM"
}
get_vm_id() {
qm list | awk '/'"${1}"'/ { print $1 }'
}
View Proxmox-RancherOS-Portainer Ultimate Setup.md
View Proxmox-RancherOS Ultimate Setup.md

WARNING MAY BE INCORRECT AND INCOMPLETE, USE AT YOUR OWN RISK

Install Proxmox, RancherOS, in a VM with Rancher 2.0 and Portainer

Setup Proxmox

  1. Install Proxmox 5.3
  2. Console/SSH into Proxmox
  3. nano /etc/apt/sources.list
  4. edit the file to look like this
@heartshare
heartshare / config.yml
Created Apr 8, 2021 — forked from zhangjiankun97/config.yml
Create VM and install rancheros by cloud-init on Proxmox VE.
View config.yml
#cloud-config
rancher:
network:
interfaces:
eth0:
address: 192.168.1.20/24
gateway: 192.168.1.1
mtu: 1500
dhcp: false
dns:
@heartshare
heartshare / README.md
Created Jan 6, 2021 — forked from triangletodd/README.md
k3s in LXC on Proxmox
View README.md

On the host

Ensure these modules are loaded

cat /proc/sys/net/bridge/bridge-nf-call-iptables

Disable swap

sysctl vm.swappiness=0
swapoff -a
@heartshare
heartshare / Pi3_as_WiFi_AP_Bridge.md
Created Dec 20, 2020 — forked from umardx/Pi3_as_WiFi_AP_Bridge.md
Using a Raspberry Pi 3 as a Wifi access point and bridge
View Pi3_as_WiFi_AP_Bridge.md

The specificity of my setup, is that the Raspberry won’t be a router but a bridge. DHCP is thus delegated to the main ADSL router and all devices connected to the AP will appear on the same network than other devices. The instructions below are based on a fresh Raspbian lite install so that it can be reproduced easily.

Install the required packages :

$ sudo apt-get install -y bridge-utils hostapd

To create a bridge, we need to enable ip_forward in the kernel, for that, edit /etc/sysctl.conf and remove comment (#) from the following line :

@heartshare
heartshare / zfs.md
Created Dec 14, 2020 — forked from Alveel/zfs.md
My ZFS setup for backuppc
View zfs.md

Partitioning

# Logical volume is on an SSD/NVMe
lvcreate <vgname> --size 4G --name slog

zpool create tank raidz2 -o ashift=12 -O atime=off -O canmount=off -O compression=lz4 -O normalization=formD -O mountpoint=/opt/backups -O xattr=sa \
    /dev/vdb /dev/vdc /dev/vdd /dev/vde /dev/vdf /dev/vdg
zfs create tank/backuppc
zfs create tank/incoming
View raspberry-pi-2-3-and-4-wireless-bridge-ubuntu-server-18.04-arm+netplan.md

Raspberry Pi 2/3B/B+/4B Wireless Bridge using Ubuntu Server 18.04 ARM Image and Netplan

The initial goal of this project is to use the raspberry pi in place of my Wireless Range Extender and then going from 3 wireless networks (2.4ghz, 2.4ghz extended, 5ghz) at home to only one (5ghz). This way I'm reducing the exposition to radio waves for the whole familly at home.

Let's go technical

Ok, enough drama for now, let's go technical. 😁

Setup

@heartshare
heartshare / Proxmox-Backup-to-Google-Drive
Created Dec 11, 2020 — forked from nathandarnell/Proxmox-Backup-to-Google-Drive
A script to backup Proxmox backups to Google Drive and delete any over a certain limit
View Proxmox-Backup-to-Google-Drive
#All backups go to here automatically:
#/var/lib/vz/dump
#install rclone if uninstalled or update available
#downloads page is http://rclone.org/downloads/
wget http://downloads.rclone.org/rclone-current-linux-amd64.zip
# version on webpage is http://downloads.rclone.org/rclone-v1.33-linux-amd64.zip
# from: http://blog.mattwynne.net/2008/04/26/fetch-and-parse-html-web-page-content-from-bash-wow/
# Download ZIP, keep zip in working folder, check future runs against HTML piped through w3c for newer versions
# from: http://tips.webdesign10.com/scrape-web-pages-gnu-linux-shell: