Skip to content

Instantly share code, notes, and snippets.

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

Kevin Carter cloudnull

👨‍🚒
Yup
View GitHub Profile
@cloudnull
cloudnull / tripleo-ansible-module-usage.yaml
Created November 16, 2021 15:22
All modules used across all tripleo repos
add_host:
groups:
aliases:
- group
- groupname
type: list
name:
aliases:
- host
- hostname
@cloudnull
cloudnull / ansible-pylibssh-test.py
Last active September 1, 2021 12:02
testiing the performance pylibssh from the ansible team
from __future__ import print_function
import time
from pylibsshext.errors import LibsshSessionException
from pylibsshext.session import Session
host = '172.16.27.26'
user = 'centos'
password = 'secrete'
key_file = "/home/centos/.ssh/id_rsa"
@cloudnull
cloudnull / .zshrc
Created July 19, 2021 15:41
Alias used to start and stop webcam access. Assumes the kernel module `v4l2loopback` is loaded.
# Make sure you load the v4l2 kernel module
# $ modprobe v4l2loopback exclusive_caps=1 max_buffer=2
alias m200-webcam='gphoto2 --set-config="/main/capturesettings/liveviewsize=Medium" --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -deinterlace -threads 0 -vf lut3d=${HOME}/Documents/GC_Cinestyle-Rec709.cube -f v4l2 $1'
@cloudnull
cloudnull / scan-ansible-archive-for-modules.py
Last active July 27, 2021 17:40
quick and dirty tool to scan an ansible archive and return a complete list of modules used throughout the archive.
import argparse
import collections
import json
import os
import subprocess
import yaml
from yaml import scanner
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e48d6ef
--- /dev/null
+++ b/README.md
@@ -0,0 +1,44 @@
+# TripleO Deployment Templates
+
+These templates are used to deploy my home cloud environment which I use for
+development purposes. While this is a development cloud, and small, it does

Unifying TripleO Orchestration with Task-Core and Directord

@cloudnull
cloudnull / test-global-with-inheritance.py
Last active June 26, 2021 05:34
Showing a global dictionary not being shared across processes. Only test-with-manager.py passes the assertion.
import multiprocessing
ITEM_CONTAINER = dict(a=0, b=1,)
CONTROL_CONTAINER = dict(a=0, b=1, c=2, d=3, e=4, f=5)
def _acquire_in_thread_inheritance(test, d):
d[test] = len(d.keys())
print(d, type(d), id(d))
@cloudnull
cloudnull / unifi-debian11-install.sh
Last active January 7, 2024 21:25
Install the latest Unifi Controller on Debian 11
#!/usr/bin/env bash
set -ev
set -o pipefail
# Install dependencies
apt update
apt -y install apt-transport-https ca-certificates wget dirmngr gnupg gnupg2 software-properties-common
# Install old mongo (requried).
@cloudnull
cloudnull / heat-stack-delete.bash
Last active February 5, 2021 21:59
TripleO Manual heat delete
export PW=$(sudo podman exec -ti $(sudo podman ps | awk '/heat_api$/ {print $1}') grep '^connection=mysql' /etc/heat/heat.conf | awk -F':' '{print $3}' | awk -F'@' '{print $1}')
export STACK=${STACK:-overcloud}
sudo podman exec -ti mysql bash -c "mysql -u heat -p${PW} heat -e \"delete from resource_data where resource_id in (select id from resource where stack_id in (select id from stack where name = '$STACK'));\""
sudo podman exec -ti mysql bash -c "mysql -u heat -p${PW} heat -e \"delete from resource where stack_id in (select id from stack where name = '$STACK);\""
sudo podman exec -ti mysql bash -c "mysql -u heat -p${PW} heat -e \"delete from event where stack_id in (select id from stack where name = '$STACK');\""
sudo podman exec -ti mysql bash -c "mysql -u heat -p${PW} heat -e \"delete from stack where name = '$STACK';\""
@cloudnull
cloudnull / nopenstack-kvm-vm-create.sh
Last active November 11, 2023 13:43
Create KVM VMs similar to OpenStack with cloud init, networking, and such.
#!/bin/bash
set -ev
set -o pipefail
if [[ -f "/etc/default/vm-defaults" ]]; then
source /etc/default/vm-defaults
fi
export NAME=${NAME:-TargetVM}