Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍🚒
Yup

Kevin Carter cloudnull

👨‍🚒
Yup
View GitHub Profile
@cloudnull
cloudnull / tripleo-ansible-module-usage.yaml
Created Nov 16, 2021
All modules used across all tripleo repos
View tripleo-ansible-module-usage.yaml
add_host:
groups:
aliases:
- group
- groupname
type: list
name:
aliases:
- host
- hostname
@cloudnull
cloudnull / ansible-pylibssh-test.py
Last active Sep 1, 2021
testiing the performance pylibssh from the ansible team
View ansible-pylibssh-test.py
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 Jul 19, 2021
Alias used to start and stop webcam access. Assumes the kernel module `v4l2loopback` is loaded.
View .zshrc
# 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 Jul 27, 2021
quick and dirty tool to scan an ansible archive and return a complete list of modules used throughout the archive.
View scan-ansible-archive-for-modules.py
import argparse
import collections
import json
import os
import subprocess
import yaml
from yaml import scanner
View train-master-update.diff
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
View task-core+directord.rst

Unifying TripleO Orchestration with Task-Core and Directord

@cloudnull
cloudnull / test-global-with-inheritance.py
Last active Jun 26, 2021
Showing a global dictionary not being shared across processes. Only test-with-manager.py passes the assertion.
View test-global-with-inheritance.py
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-debian10-install.sh
Created Apr 10, 2021
Install the latest Unifi Controller on Debian 10
View unifi-debian10-install.sh
#!/usr/bin/env bash
# Install dependencies
apt install apt-transport-https ca-certificates wget dirmngr gnupg gnupg2 software-properties-common multiarch-support
# Install old mongo (requried).
wget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | apt-key add -
echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.4 main" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list
wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb
dpkg -i libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb
@cloudnull
cloudnull / heat-stack-delete.bash
Last active Feb 5, 2021
TripleO Manual heat delete
View heat-stack-delete.bash
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 Sep 27, 2021
Create KVM VMs similar to OpenStack with cloud init, networking, and such.
View nopenstack-kvm-vm-create.sh
#!/bin/bash
set -ev
set -o pipefail
if [[ -f "/etc/default/vm-defaults" ]]; then
source /etc/default/vm-defaults
fi
export NAME=${NAME:-TargetVM}