Skip to content

Instantly share code, notes, and snippets.

View jacobweinstock's full-sized avatar

Jacob Weinstock jacobweinstock

  • Colorado, USA
  • 19:21 (UTC -06:00)
View GitHub Profile
@jacobweinstock
jacobweinstock / kube-vip
Last active August 31, 2023 00:31
patch
--- /etc/kubernetes/manifests/kube-vip 2023-08-31 00:24:31.233317454 +0000
+++ kube-vip.patched 2023-08-31 00:25:09.561332983 +0000
@@ -11,6 +11,8 @@
env:
- name: vip_arp
value: "true"
+ - name: svc_election
+ value: "true"
- name: port
value: "6443"
@jacobweinstock
jacobweinstock / hardware.yaml
Last active July 17, 2023 21:23
Tinkerbell with Cloud init (optionally install a single node Kubernetes cluster)
apiVersion: tinkerbell.org/v1alpha1
kind: Hardware
metadata:
name: hp-demo
namespace: tink-system
spec:
disks:
- device: /dev/nvme0n1
userData: >-
#cloud-config
@jacobweinstock
jacobweinstock / notification.sh
Last active June 24, 2023 00:00
example Rufio webhook producer
#!/usr/bin/env bash
# This will send an example webhook notification.
# example power notification: notification.sh -u https://example.com/webhook -s superSecret1
# example boot device notification: notification.sh -u https://example.com/webhook -s superSecret1 -p boot_device
# show the help: notification.sh -h
set -eo pipefail
hmac256 () {
@jacobweinstock
jacobweinstock / BYO-DHCP.uml
Last active April 7, 2023 20:49
Tinkerbell Bring your own DHCP service
title Bring your own DHCP service
participant Machine
participant DHCP
participant Boots
rbox over Machine,DHCP: 192.168.5.5 represents the IP from which the Boots service is available
group #2f2e7b In firmware iPXE #white
autonumber 1
@jacobweinstock
jacobweinstock / dnsmasq.conf
Created March 16, 2023 00:50
DHCP server configurations that have been tested with the Tinkerbell Stack
port=0
# Tinkerbell requires that the Host must use a reservation (static ip).
dhcp-host=52:54:00:ee:0d:0b,thedoctor,192.168.2.144
dhcp-option=6,8.8.8.8
dhcp-option=3,192.168.2.1
dhcp-range=192.168.2.0,static
# This is the part that gets us through the iPXE infinite boot loop. https://ipxe.org/howto/chainloading
dhcp-match=tinkerbell, option:user-class, Tinkerbell
@jacobweinstock
jacobweinstock / 1-walkthrough.md
Last active April 11, 2024 01:02
Tinkerbell machine provisioning demo

Walk through demo

Demo of installing Ubuntu 22.04 on an HP EliteDesk.

Install the Tinkerbell stack

  1. Satisfy Stack installation prerequisites.
    • k3d cluster create --network host --no-lb --k3s-arg "--disable=traefik,servicelb" --k3s-arg "--kube-apiserver-arg=feature-gates=MixedProtocolLBService=true" --host-pid-mode
    • Command pulled from the sandbox repo.
  2. Clone the Tinkerbell chart repo.
@jacobweinstock
jacobweinstock / hw.yaml
Created January 6, 2023 19:44
use a custom ipxe script with tinkerbell hardware.yaml
apiVersion: tinkerbell.org/v1alpha1
kind: Hardware
metadata:
annotations:
name: "pxe-uefi"
namespace: tink-system
spec:
disks:
- device: /dev/nvme0n1
interfaces:
@jacobweinstock
jacobweinstock / state.txt
Created December 20, 2022 16:20
tink server state machine
server
┌────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ next │
│ ┌────────────────────────────────────────────────┐ │
│ │ │ │
│ ▼ │ │
│ ┌───────────┐ ┌──────────┐ ┌─────┴─────┐ ┌──────────┐ │
│ │ │ │ │ success │ │ end │ │ │
────────► │ pending ├───────────► │ running ├─┬───────► │ success ├─────────►│ complete │ │
│ │ │ received │ │ │ │ │ │ │ │
@jacobweinstock
jacobweinstock / infrastructure-components.yaml
Last active October 8, 2022 02:44
infrastructure-components.yaml
apiVersion: v1
kind: Namespace
metadata:
labels:
cluster.x-k8s.io/provider: infrastructure-tinkerbell
control-plane: controller-manager
name: capt-system
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
@jacobweinstock
jacobweinstock / test
Created June 13, 2022 23:09
test ipxe script
#!ipxe
set
autoboot