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 / e2e-genestack-openstack-lab.sh
Last active March 3, 2025 03:00
End to End Genestack on OpenStack
set -o pipefail
set -e
if [ -z "${ACME_EMAIL}" ]; then
read -rp "Enter a valid email address for use with ACME, press enter to skip: " ACME_EMAIL
export ACME_EMAIL="${ACME_EMAIL:-}"
fi
if [ -z "${GATEWAY_DOMAIN}" ]; then
@cloudnull
cloudnull / genestack.sh
Created February 24, 2025 03:46
installs steps genestack
sudo git clone --recurse-submodules -j4 https://github.com/rackerlabs/genestack /opt/genestack
sudo /opt/genestack/bootstrap.sh
sudo chown ubuntu:ubuntu -R /etc/genestack
#
# Setup inventory, this is manual.
# RE: https://raw.githubusercontent.com/cloudnull/genestack-baseline/refs/heads/main/inventory/inventory.yaml
#
source /opt/genestack/scripts/genestack.rc
@cloudnull
cloudnull / gist:ad74744cce99d957e63fd7548478d73c
Created February 12, 2025 05:00
list rabbitmq queues that have a value greater than 0
rabbitmqctl list_vhosts --silent | xargs -i rabbitmqctl list_queues --vhost {} | awk '{if ($2>0) print $0}'
@cloudnull
cloudnull / gist:1380032e5234e893ace762c641814170
Created February 12, 2025 04:59
My OpenStack Cloud Flavors
openstack --os-cloud default flavor create --description "General Purpose (INTEL 12700T) VM 1 vCPU 2 GB RAM" --ram 2048 --vcpu 1 --disk 10 --ephemeral 0 --swap 0 --property "hw:mem_page_size=any" --property ":category=general_purpose" --property ":architecture=x86_architecture" --property "aggregate_instance_extra_specs:INTEL_12700T=required" gp.0.1.2
openstack --os-cloud default flavor create --description "General Purpose (INTEL 12700T) VM 1 vCPU 4 GB RAM" --ram 4096 --vcpu 1 --disk 10 --ephemeral 0 --swap 0 --property "hw:mem_page_size=any" --property ":category=general_purpose" --property ":architecture=x86_architecture" --property "aggregate_instance_extra_specs:INTEL_12700T=required" gp.0.1.4
openstack --os-cloud default flavor create --description "General Purpose (INTEL 12700T) VM 2 vCPU 2 GB RAM" --ram 2048 --vcpu 2 --disk 40 --ephemeral 0 --swap 1024 --property "hw:mem_page_size=any" --property ":category=general_purpose" --property ":architecture=x86_architecture" --property "aggregate_instance_
@cloudnull
cloudnull / unifi-debian12-install.sh
Created February 4, 2025 08:58
Install the latest Unifi Controller on Debian 12
#!/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 gnupg curl
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \
@cloudnull
cloudnull / QueueMaxSetting.sh
Last active January 27, 2025 15:10
Set the NIC Hardware Queue RX and TX to more appropriate values
#!/usr/bin/env bash
set -e
# NOTE(cloudnull): This script is intended to be run on a system that has
# multiple physical network interfaces. The script will
# disable the hardware offload for the interfaces and set
# the RX and TX queue sizes to 90% of the maximum value
# to avoid packet loss.
#
# This script was written because the default values for
@cloudnull
cloudnull / genestack-longhorn.md
Last active December 21, 2024 05:01
Genestack Longhorn Deployment

Longhorn

Longhorn is a lightweight, reliable, and highly available distributed block storage solution designed for Kubernetes. By default, it stores its data in /var/lib/longhorn on each host node, keeping volumes close to where the workloads are running. This local-path approach can reduce latency and boost performance, making Longhorn a fantastic choice for hyperconverged environments. In a hyperconverged setup, compute, networking, and storage resources are consolidated on the same nodes, eliminating the need for separate storage servers. With Longhorn’s default storage path and straightforward deployment, clusters become simpler to manage and scale—while still maintaining robust data protection, snapshots, and backups across the infrastructure.

Setup and Installation of the Longhorn Storage Provider

@cloudnull
cloudnull / install-macos-keystone.sh
Created July 7, 2024 15:25
Install openstack keystone on OSX
# This simple setup fixes the following error on MacOS.
#
# scrypt-1.2.1/libcperciva/crypto/crypto_aes.c:6:10: fatal error: 'openssl/aes.h' file not found
# #include <openssl/aes.h>
# ^~~~~~~~~~~~~~~
# 1 error generated.
# error: command '/usr/bin/clang' failed with exit code 1
# [end of output]
#
# note: This error originates from a subprocess, and is likely not a problem with pip.
@cloudnull
cloudnull / ovn_db_sync.py
Created June 28, 2024 16:59
OVN DB sync that doesn't break everything when working in an environment that coexists. Basically this lets OVN and Neutron work together instead of against one another.
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
@cloudnull
cloudnull / flake.nix
Created April 6, 2024 06:16 — forked from voidus/flake.nix
Build a cloudinit image in nixos
{
description = "A nixos cloudinit base image without nixos-infect";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";