This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Put this script in the source directory of the ipxe project | |
# | |
# The output ipxe-uefi.iso can be used to boot a server with iPXE | |
# | |
cd `dirname $0` | |
cd src | |
make bin-x86_64-efi/ipxe.efi | |
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from cs import CloudStack | |
URL = 'https://xxx.yyyy.zzz/client/api' | |
APIKEY = 'XXXXXXXXXXXXXX' | |
SECRETKEY = 'YYYYYYYYYYYYYYYYY' | |
# NAT Network 1 | |
NETWORKID = '68c537ba-3e30-4498-9fbb-d433aae7bbda' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import argparse | |
def parse_line(line): | |
if not line: | |
return | |
if line[0] == ';': | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Use BGP+EVPN for VXLAN with CloudStack instead of Multicast | |
# | |
# Place this file on all KVM hypervisors at /usr/share/modifyvxlan.sh | |
# | |
# More information about BGP and EVPN with FRR: https://vincent.bernat.ch/en/blog/2017-vxlan-bgp-evpn | |
# | |
DSTPORT=4789 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# | |
# I have a Linux machine between my ISP's router and my switch. Two interfaces | |
# are bridged so I can inspect all traffic coming in and going out. | |
# | |
# | |
# bridge name bridge id STP enabled interfaces | |
# br1 8000.8eb20d8d9b94 no enp0s20f0 | |
# enp0s20f1 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Compact all OSDs on a host while they are stopped/offline | |
# | |
# Author: Wido den Hollander <[email protected]> | |
# | |
df|grep "/var/lib/ceph/osd"|awk '{print $6}'|cut -d '-' -f 2|sort -n|xargs -n 1 -P 10 -I OSD ceph-kvstore-tool bluestore-kv /var/lib/ceph/osd/ceph-OSD compact |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These are just some LUA records I was testing with for PowerDNS | |
# | |
# Author: Wido den Hollander <[email protected]> | |
A "ifportup(25, {'185.66.250.201', '185.87.186.222'})" | |
A "ifportup(25, {'185.66.250.201', '185.87.186.222'}, {selector='all'})" | |
AAAA "ifportup(25, {'2a00:f10:121:a00:4f8:84ff:fe00:1846', '2a00:f10:400:2:488:56ff:fe00:74f'})" | |
AAAA "ifportup(25, {'2a00:f10:121:a00:4f8:84ff:fe00:1846', '2a00:f10:400:2:488:56ff:fe00:74f'}, {selector='all'})" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Simple script to change lights on Philips Hue using cURL | |
# | |
# Source: http://hkionline.net/posts/using-phillips-hue-from-the-command-line | |
# | |
# Author: Wido den Hollander <[email protected]> | |
# | |
# YES! Philips Hue also talks IPv6! :-) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# Calculate the IPv6 address a host will obtain per RFC4862 | |
# | |
# Usage: ./ip6-eui64-address.py --prefix 2001:db8::/64 52:54:00:59:c2:b3 | |
# | |
# Author: Wido den Hollander <[email protected]> | |
# | |
import argparse | |
import ipaddress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Start all OSDs on a host which didnt start for some reason | |
# | |
# Author: Wido den Hollander <[email protected]> | |
# | |
df -h|grep ceph|grep osd|awk '{print $6}'|cut -d '-' -f 2|sort -n|xargs -n 1 -I OSD systemctl reset-failed ceph-osd@OSD | |
df -h|grep ceph|grep osd|awk '{print $6}'|cut -d '-' -f 2|sort -n|xargs -n 1 -I OSD systemctl start ceph-osd@OSD |
NewerOlder