Skip to content

Instantly share code, notes, and snippets.

View cloudnull's full-sized avatar
👨‍🚒
Yup

Kevin Carter cloudnull

👨‍🚒
Yup
View GitHub Profile
import json
import urlparse
import requests
from storyboardclient.v1 import client
# Trello Constants
TRELLO_BOARD_ID = 'TRELLOBOARD_ID'
heat_template_version: rocky
description: >
Configure tuned
parameters:
ServiceData:
default: {}
description: Dictionary packing service data
type: json
{
"nodes": [
{
"name": "controller-node1",
"pm_type": "ipmi",
"ports": [
{
"address": "52:54:00:e6:db:01",
"physical_network": "ctlplane"
}
@cloudnull
cloudnull / fedora-virt-setup.sh
Last active September 10, 2020 21:15
fedora 30 virt server setup to be used with macvlan - virtualbmc is also installed and setup as a daemon.
#hostname setup
hostnamectl --static --pretty --transient set-hostname compute2.rk-home
# Storage for my nvme drive
parted --script --align=optimal /dev/nvme0n1 mklabel gpt -- mkpart libvirt XFS 0% 100%
parted --script /dev/nvme0n1 print
mkfs.xfs -f -i size=2048 -L libvirt /dev/nvme0n1
@cloudnull
cloudnull / config-undercloud.sh
Last active January 21, 2022 17:15
VM and vBMC Setup - installation and setup example
# install tripleo repos
# This will pull the latest version RPM
PKG=$(curl https://trunk.rdoproject.org/centos7/current/ | grep python2-tripleo-repos- | awk -F'"' '{print $8}')
# This will install it
yum install -y https://trunk.rdoproject.org/centos7/current/${PKG}
yum -y upgrade
# ansible-playbook -i $THISFILE network_config.yml
all_systems:
vars:
rax_systemd_resolved:
DNS: "69.20.0.164"
FallbackDNS: "69.20.0.196 208.67.222.222 8.8.8.8"
Cache: yes
children:
@cloudnull
cloudnull / traceroute.py
Last active July 28, 2022 00:00
simple ansible traceraoute callback plugin used to run a traceroute whenever a node is "UNREACHABLE". NOTE: This callback plugin requires the pacakge `pytraceroute` to be installed.
from __future__ import absolute_import
__metaclass__ = type
import socket
import time
from traceroute.core import Tracer
from ansible import constants as C
from ansible.plugins.callback import CallbackBase
@cloudnull
cloudnull / traceroute.py
Created April 24, 2019 02:43
simple ansible traceraoute callback plugin used to run a traceroute whenever a node is "UNREACHABLE".
from __future__ import absolute_import
__metaclass__ = type
import socket
import time
from traceroute.core import Tracer
from ansible import constants as C
from ansible.plugins.callback import CallbackBase
sysctl -w net.ipv4.ip_forward=1 | tee /etc/sysctl.d/10-wireguard.conf
sysctl -w net.ipv4.conf.all.proxy_arp=1 | tee -a /etc/sysctl.d/10-wireguard.conf
pushd /etc/wireguard
wg genkey | tee privatekey | wg pubkey > publickey
wg genpsk > preshared
popd
# osquery
## DOCS - https://osquery.readthedocs.io/en/stable/
osqueryi "select * from deb_packages where name like 'linux-image%';"
osqueryi "select * from os_version;"
# fleet
## DOCS - https://github.com/kolide/fleet/tree/master/docs
fleetctl query --query "select * from deb_packages where name like 'linux-image%';" --labels='All Hosts'