Skip to content

Instantly share code, notes, and snippets.

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

Kevin Carter cloudnull

👨‍🚒
Yup
View GitHub Profile
# 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'

Fleet Platform

Date: 2018-10-25
tags:RPC-Fleet, platform

This specification outlines the Rackspace Private Cloud Fleet Platform. The general idea governing "platform" is provide a foundation for all Rackspace Private Cloud deployments regardless of product, purpose, and operating system.

@cloudnull
cloudnull / 0-enp2s0.network
Last active February 12, 2021 22:39
Compute node systemd-networkd setup with bonding
[Match]
Name = enp2s0
[Network]
Address = 172.16.25.52/22
@cloudnull
cloudnull / .gitignore
Last active March 19, 2019 02:47
test
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc
build/
@cloudnull
cloudnull / 10-bond0.netdev
Created October 3, 2018 02:03
networkd on controller
[NetDev]
Name=bond0
Kind=bond
[Bond]
Mode=802.3ad
TransmitHashPolicy=layer2
MIIMonitorSec=1s
LACPTransmitRate=fast
@cloudnull
cloudnull / 0-nspawn_host-mv-eth0.netdev
Last active October 3, 2018 02:02
networkd on compute host
# Ansible managed
[NetDev]
Kind=macvlan
Name=mv-eth0
[MACVLAN]
Mode=bridge
@cloudnull
cloudnull / osa-ubuntu-post-distro-upgrade.sh
Last active August 3, 2021 14:36
upgrade venvs on compute
#!/usr/bin/env bash
# When upgrading from 16.04 to 18.04 a lot of new packages get installed and a lot of old packages get removed.
# The upgrade process can break things we rely on within the virtual environments we run openstack services within.
# This script will correct issues in the venvs by fixing broken symlinks to system libraries we require.
for venv in $(find /openstack/venvs/* -maxdepth 0 -type d); do
# Update the venvs in place with the new system python
virtualenv --no-wheel --no-pip --no-setuptools --always-copy --python=/usr/bin/python "${venv}"
if ! mountpoint /var/lib/nova; then
killall -9 qemu-system-x86_64
mkfs.xfs -Kf /dev/mapper/vg00-nova00
mount /dev/mapper/vg00-nova00 /mnt
mv /var/lib/nova/{*,.*} /mnt/
mount /dev/mapper/vg00-nova00 /var/lib/nova
chown -R nova:nova /var/lib/nova
chown -R libvirt-qemu:kvm /var/lib/nova/save
echo '/dev/mapper/vg00-nova00 /var/lib/nova xfs defaults 0 2' | tee -a /etc/fstab
fi
@cloudnull
cloudnull / gist:56d7f55b9c5f91abceec7a8f16f6e1b8
Created July 30, 2018 13:07
openstack-ansible project return - return a list of all projects under the openstack-ansible group.
#!/usr/bin/env python
import requests
import yaml
USAGE = """
This simple script returns all of the projects from the openstack-ansible group.
Common usage:
python /tmp/get-openstack-ansible-projects.py | grep os_ | xargs -i git clone "https://github.com/{}"
@cloudnull
cloudnull / kernel-purge.sh
Created May 10, 2018 20:16
Purge old kernels and install a new one, only one.
#!/usr/bin/env bash
export KERNEL_VERSION="4.4.0-22"
export KERNEL_TARGET="linux-image-extra-${KERNEL_VERSION}-generic"
export KERNEL_HEADERS="linux-headers-${KERNEL_VERSION}-generic"
# Ensure apt is updated
apt-get update
# Remove old kerenls, all of them and their deps.