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 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 / 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 / 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 / gist:33d9ff5d87e433410e77
Created May 6, 2014 12:25
Logstash, collectd and kibana for one host's system resources
{
"title": "System Resources",
"services": {
"query": {
"list": {
"0": {
"query": "collectd_type:\"load\"",
"alias": "Load",
"color": "#70DBED",
"id": 0,
@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 / node-exporter-freebsd_rev2.json
Last active October 22, 2019 03:48
Experiment: Prometheus 2.1.0 and a FreeBSD node_exporter - Grafana dashboard ID 4260
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
@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 ..."
@hbokh
hbokh / SaltShaker_install_en.md
Last active July 13, 2019 11:39
Install SaltShaker on Ubuntu 16.04.1 LTS

This is a "best-effort" in translating the "install.txt" from SaltShaker into English.
I tried all steps myself on a recent Ubuntu-host and latest SaltStack-packages.


This installation note applies to SaltShaker v2.1.3.

SaltShaker on Ubuntu 16.04.1 LTS

NOTE All commands are to be run as user "root".

# 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