Skip to content

Instantly share code, notes, and snippets.

View peterska's full-sized avatar

Peter Skarpetis peterska

  • Sydney Australia
View GitHub Profile
@Alexey-Tsarev
Alexey-Tsarev / zfs_install.sh
Last active March 2, 2021 14:00
ZFS 0.8 at Raspberry Pi
#!/usr/bin/env sh
set -e
set -x
CUR_PWD="$(pwd)"
cd "$(dirname $0)"
if [ ! -d zfs ]; then
# https://github.com/zfsonlinux/zfs/wiki/Building-ZFS
@cheethoe
cheethoe / gist:49d9c1d0003e44423e54a060e0b3fbf1
Last active April 14, 2022 21:01
Rook v0.8.0 device/osd removal
# This will use osd.5 as an example
# ceph commands are expected to be run in the rook-toolbox
1) disk fails
2) remove disk from node
3) mark out osd. `ceph osd out osd.5`
4) remove from crush map. `ceph osd crush remove osd.5`
5) delete caps. `ceph auth del osd.5`
6) remove osd. `ceph osd rm osd.5`
7) delete the deployment `kubectl delete deployment -n rook-ceph rook-ceph-osd-id-5`
8) delete osd data dir on node `rm -rf /var/lib/rook/osd5`
@detiber
detiber / README.md
Last active April 16, 2023 02:21
Using CFSSL as an external CA for kubeadm

CFSSL as an external CA for non-ha kubeadm intialized clusters

Using cfssl to Create an External CA Infrastructure

Install cfssl

# This requires an existing Go environment with GOPATH set
go get -u github.com/cloudflare/cfssl/cmd/...
@squidpickles
squidpickles / README.md
Last active January 31, 2024 12:48
Multi-platform (amd64 and arm) Kubernetes cluster

Multiplatform (amd64 and arm) Kubernetes cluster setup

The official guide for setting up Kubernetes using kubeadm works well for clusters of one architecture. But, the main problem that crops up is the kube-proxy image defaults to the architecture of the master node (where kubeadm was run in the first place).

This causes issues when arm nodes join the cluster, as they will try to execute the amd64 version of kube-proxy, and will fail.

It turns out that the pod running kube-proxy is configured using a DaemonSet. With a small edit to the configuration, it's possible to create multiple DaemonSets—one for each architecture.

Steps

Follow the instructions at https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/ for setting up the master node. I've been using Weave Net as the network plugin; it see

@mohakshah
mohakshah / Instructions.md
Last active July 15, 2023 04:58
Building ZFS on Raspberry Pi 3 running Rasbpian

Introduction

This is a tutorial for building and installing the latest release version (0.7.3 as of writing) of "ZFS on Linux" on a Raspberry Pi 3 running Raspbian Stretch. Specifically, we'll be building the dkms version of ZoL, which saves you the hassle of re-compiling the kernel modules after every kernel update. Even though ZoL added support for building dkms packages for debian in version 0.7.3, the build process on a Raspberry Pi 3 is not quite straight-forward. Hopefully, these instructions will make it easier.

Steps

  1. Install the build dependencies.
$ sudo apt-get update
$ sudo apt-get install build-essential autoconf libtool gawk alien fakeroot
$ sudo apt-get install dkms zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev parted lsscsi wget ksh
@alexellis
alexellis / k8s-pi.md
Last active April 11, 2024 14:17
K8s on Raspbian
@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active February 3, 2024 18:53
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@alram
alram / ceph_journal_migration.sh
Last active May 6, 2021 17:14
Ceph journal migration
#!/bin/bash
journal_device="/dev/sda"
osds=(0 1 2 3 4)
num_journal_part=${#osds[@]}
i=1
while [ $i -le $num_journal_part ]
do
disk_id=`uuidgen`
sgdisk --new=${i}:0:+5120M --change-name="${i}:ceph journal" --partition-guid=${i}:${disk_id} --typecode=${i}:45b0969e-9b03-4f30-b4c6-b4b80ceff106 --mbrtogpt ${journal_device}
@ncw
ncw / README.txt
Last active February 20, 2024 19:30 — forked from spikebike/client output
Client side certificates with go
This demonstrates how to make client side certificates with go
First generate the certificates with
./makecert.sh test@test.com
Run the server in one terminal
go run server.go
/*
usbdevs - list mounted USB devices & their volume paths on Mac OS X
References:
- http://stackoverflow.com/questions/2459414/osx-how-to-get-a-volume-name-or-bsd-name-from-a-iousbdeviceinterface-or-locati
- http://superuser.com/questions/103755/whats-up-with-stat-on-mac-os-x-darwin-or-filesystems-without-names
- http://stackoverflow.com/questions/1698124/how-to-tell-if-a-given-path-is-mounted-removable-media-in-mac-os-x
- http://developer.apple.com/mac/library/samplecode/VolumeToBSDNode/Introduction/Intro.html