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 / restic-os-install.sh
Created May 9, 2026 02:25
Install restic and setup backups using openstack application credentials
#!/usr/local/env bash
if [ -z $OS_AUTH_URL ]; then
echo "OS_AUTH_URL is not set"
exit 99
elif [ -z $OS_APPLICATION_CREDENTIAL_ID ]; then
echo "OS_APPLICATION_CREDENTIAL_ID is not set"
exit 99
elif [ -z $OS_APPLICATION_CREDENTIAL_SECRET ]; then
echo "OS_APPLICATION_CREDENTIAL_SECRET is not set"
# This vLLM Dockerfile is used to build images that can run vLLM on both x86_64 and arm64 CPU platforms.
#
# Supported platforms:
# - linux/amd64 (x86_64)
# - linux/arm64 (aarch64)
#
# Use the `--platform` option with `docker buildx build` to specify the target architecture, e.g.:
# docker buildx build --platform=linux/arm64 -f docker/Dockerfile.cpu .
#
# Build targets:
@cloudnull
cloudnull / genestack-dbaas-example.yaml
Created March 20, 2025 22:15
genestack hyperconvered application example manifest
---
# Create the namespace for the demo DBaaS instance
apiVersion: v1
kind: Namespace
metadata:
labels:
kubernetes.io/metadata.name: 1708f792c27b7a9fd42080b5721dd1dd
pod-security.kubernetes.io/audit: privileged
pod-security.kubernetes.io/audit-version: latest
pod-security.kubernetes.io/enforce: privileged
@cloudnull
cloudnull / e2e-genestack-openstack-lab.sh
Last active March 4, 2025 05:41
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
echo "The domain name for the gateway is required, if you do not have a domain name press enter to use the default"
@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