View docker-ipv6-nat.sh
#!/bin/sh
#
# ONLY USE IPV6 NAT FOR TESTING PURPOSES
#
# IPV6 IN PRODUCTION SHOULD RUN WITHOUT NAT!
#
ip6tables -t nat -A POSTROUTING -s fd00::/64 -j MASQUERADE
dockerd --ipv6 --fixed-cidr-v6=fd00::/64
View rbd-iscsi-tgt.conf
<target iqn.2015.01.rbd.example.com:iscsi>
driver iscsi
bs-type rbd
readonly true
backing-store rbd/rbdimage1
initiator-address 192.168.72.50
initiator-address 192.168.72.51
initiator-address 192.168.72.52
initiator-address 192.168.79.60
initiator-address 192.168.79.61
View ceph-build-rpm.sh
#
# Commands to clone Ceph and build RPMs from Source using Docker
#
# Modify to your needs
#
# Author: Wido den Hollander <wido@widodh.nl>
docker pull centos:7
docker run -ti centos:7 /bin/bash
yum install -y git rpm-build rpmdevtools
View ceph-cluster-pool.py
#!/usr/bin/env python
#
# Simple Python script which creates a few RADOS connections and randomly uses them to perform
# stat calls on Objects
#
# Script was used to diagnose some problems a customer experienced with his Ceph cluster
#
# Author: Wido den Hollander <wido@widodh.nl>
#
import random
View gist:1359f814007392644cf7ed68ec08bb63
#!/bin/sh
#
# Author: Wido den Hollander <wido@widodh.nl>
#
set -e
TIMEOUT=5
HEALTH=$(ceph --connect-timeout=$TIMEOUT health|head -n 1|awk '{print $1}')
View kernel-cleanup.sh
#!/bin/sh
# Cleanup all old kernels and associated packages from the system
set -x
IFS='
'
# more than 1 might very well be broken!
retention=1
View serf.service
[Unit]
Description=SERF
Documentation=https://www.serf.io/
[Service]
Type=simple
ExecStart=/usr/local/bin/serf agent -bind=[2001:db8::100] -rejoin -join=[2001:db8::100] -join=[2001:db8::101] -join=[2001:db8::102] -event-handler=/usr/local/bin/serf-event-handler
Restart=always
RestartSec=10s
View rgw.vcl
vcl 4.0;
import std;
import directors;
acl purge {
"::1";
"127.0.0.1";
}
View varnishbanner.py
#!/usr/bin/env python3
"""
Very simple Proof of Concept to read lines coming from
varnishncsa and send them out as events using Serf.
In this case Varnish is used in front of Ceph RGW and
we want to achieve cache consistency.
Send out a event using Serf when a PUT, POST or DELETE
is received so that all nodes can issue a varnish ban.
View ceph-backup-crush-to-git.sh
#!/bin/sh
#
# Backup the CRUSHMap of a Ceph cluster in TXT format in a Git repo
#
# The directory supplied as $1 needs to exist and contain a Git repository
# Initialize one with 'git init'
#
# Then just run this script in a CRON
#
# Author: Wido den Hollander <wido@widodh.nl>