Skip to content

Instantly share code, notes, and snippets.

View hbokh's full-sized avatar
🔪
Yak shaving

Henk hbokh

🔪
Yak shaving
View GitHub Profile
@hbokh
hbokh / Vagrantfile
Last active February 25, 2020 19:13
Script to deploy Cobbler 2.8.5 and test cobblerclient & terrafrom-provider-cobbler in CentOS7
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |vb|
# change the network card hardware for better performance
vb.customize ["modifyvm", :id, "--nictype1", "virtio" ]
vb.customize ["modifyvm", :id, "--nictype2", "virtio" ]
@hbokh
hbokh / Vagrantfile
Last active July 17, 2020 07:53
Script to deploy Cobbler 3 and test terrafrom-provider-cobbler in Fedora 31
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--nictype1", "virtio" ]
vb.customize ["modifyvm", :id, "--nictype2", "virtio" ]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
@hbokh
hbokh / deploy.sh
Last active February 21, 2020 09:25
Terraform Docker provider to run Cobbler 3.x
#!/bin/bash
set -e
# This script assumes Fedora 31 is being used.
# It will create a standard Cobbler environment that can be used for acceptance testing.
# With this enviornment spun up, the config should be:
# COBBLER_URL=http://127.0.0.1:25151
# COBBLER_USERNAME=cobbler
@hbokh
hbokh / 01_cobbler_terraform_debug.md
Last active February 8, 2020 16:25
Debugging Cobbler & Terraform (apply / add a new system)

Cobbler and Terraform

terraform apply - system - fail

2020-02-08T15:16:03 - INFO | authenticate; ['cobbler', True]
2020-02-08T15:16:03 - INFO | REMOTE get_item(system,ubuntu001); user(?)
2020-02-08T15:16:03 - DEBUG | get_item; ['system', 'ubuntu001']
2020-02-08T15:16:03 - DEBUG | done with get_item; ['system', 'ubuntu001']
2020-02-08T15:16:03 - INFO | REMOTE new_item(system); user(cobbler)
@hbokh
hbokh / demo_connect.py
Last active January 19, 2020 16:31
Some Cobbler 3 scripts to quickly test XMLRPC. Install on the Cobbler host, login config: cobbler/cobbler.
#!/usr/bin/python3
"""
Copyright 2007-2009, Red Hat, Inc and Others
Michael DeHaan <michael.dehaan AT gmail>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
@hbokh
hbokh / LXC-Jessie-SaltStack.sh
Created July 16, 2019 07:10
Create a LXC template by using debootstrap.
# Source: https://gist.github.com/frieder/9f86ad859b98431c0b67b6458b3577b7
#
# This snippet shows how to create a LXC template by using debootstrap.
# This is a response to https://bitbucket.org/flybyte/dab-templates which does the same
# but has the limitation that it will result in a system that uses sysvinit while
# with this approach the system will use systemd.
mkdir -p /srv/debian && cd /srv/debian
echo " ==> Start debootstrap ..."
# rtl_fm -f 169.65M -M fm -s 22050 -p 83 -g 40 -E dc -F 0 -l 15 -A fast | ~/bin/multimon-ng -a FLEX -t raw /dev/stdin
Found 1 device(s):
multimon-ng 1.1.7
(C) 1996/1997 by Tom Sailer HB9JNX/AE4WA
(C) 2012-2019 by Elias Oenal
Available demodulators: POCSAG512 POCSAG1200 POCSAG2400 FLEX EAS UFSK1200 CLIPFSK FMSFSK AFSK1200 AFSK2400 AFSK2400_2 AFSK2400_3 HAPN4800 FSK9600 DTMF ZVEI1 ZVEI2 ZVEI3 DZVEI PZVEI EEA EIA CCIR MORSE_CW DUMPCSV X10 SCOPE
Enabled demodulators: FLEX
0: Realtek, RTL2838UHIDIR, SN: 00000001
@hbokh
hbokh / buildlog_20181104-084242.txt
Created November 4, 2018 09:02
Packer - build output with driver string `hvf` added to `post-processor/vagrant/libvirt.go#L42`
==> qemu: Gracefully halting virtual machine...
2018/11/04 08:51:06 packer: 2018/11/04 08:51:06 Executing shutdown command: echo '1ma63b0rk3d' | sudo -E -S poweroff
2018/11/04 08:51:06 packer: 2018/11/04 08:51:06 [DEBUG] Opening new ssh session
2018/11/04 08:51:06 packer: 2018/11/04 08:51:06 [DEBUG] starting remote command: echo '1ma63b0rk3d' | sudo -E -S poweroff
2018/11/04 08:51:06 packer: 2018/11/04 08:51:06 [ERROR] Remote command exited without exit status or exit signal.
2018/11/04 08:51:06 packer: 2018/11/04 08:51:06 Waiting max 5m0s for shutdown to complete
2018/11/04 08:51:08 packer: 2018/11/04 08:51:08 VM shut down.
==> qemu: Running post-processor: vagrant
==> qemu (vagrant): Creating Vagrant box for 'libvirt' provider
qemu (vagrant): Copying from artifact: build/2018-11-04-07-42-42/base-stretch
@hbokh
hbokh / settings.cfg
Last active October 21, 2018 16:22
Quake 3 Arena - configuration baseq3/settings.cfg
// Base
seta com_hunkmegs "512"
seta r_hdr "1"
seta r_allowSoftwareGL "0"
// Display
seta r_displayrefresh "0"
seta r_mode "-1"
seta r_customheight "1200"
seta r_customwidth "1920"
@hbokh
hbokh / nixos-pxe-install.md
Last active July 28, 2018 10:41
Install NixOS using PXE (not iPXE!)

NiXOS install through PXE

Based on: https://lastlog.de/blog/posts/nixos_pxe_booting.html

Get NixOS minimal ISO-image:

wget https://d3g5gsiof5omrk.cloudfront.net/nixos/18.03/nixos-18.03.132847.aec217852f2/nixos-minimal-18.03.132847.aec217852f2-x86_64-linux.iso