Skip to content

Instantly share code, notes, and snippets.

@tkhrl
tkhrl / create-cloud-init.sh
Created June 22, 2024 12:58 — forked from casperghst42/create-cloud-init.sh
Create a cloud-init Debian 12 image on proxmox
#!/bin/bash
# Author: Casper Pedersen (github.com/casperghst42)
# License: GPL2
wget https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2
virt-customize -a debian-12-generic-amd64.qcow2 --install qemu-guest-agent --install resolvconf --install systemd-resolved --update --run-command 'mkdir -p /etc/network/interfaces.d' --run-command 'echo "auto ens18" >> /etc/network/interfaces.d/ens18' --run-command 'echo "iface ens18 inet manual" >> /etc/network/interfaces.d/ens18'
qm create 100000 --name "debian12-cloudinit-template" --memory 2048 --net0 virtio,bridge=vmbr0
qm importdisk 100000 debian-12-generic-amd64.qcow2 local-lvm -format qcow2
@tkhrl
tkhrl / debian-vm-install.md
Created June 17, 2024 05:19 — forked from scyto/debian-vm-install.md
Installing Debian as VM

This is the base of all my linux VM installs I use for docker etc

Prep Hypervisor (instructions vary based on hypervisor so this is generic)

  • Download netinst ISO from debian website
  • Create a VM on your hypervsor
  • VM Machine Spec:
    • 200GB
    • 2 CPU
    • 4GB RAM
  • Attach to external network
@tkhrl
tkhrl / proxmox-ceph.md
Created June 17, 2024 05:11 — forked from scyto/proxmox-ceph.md
setting up the ceph cluster

CEPH HA Setup

Note this should only be done once you are sure you have reliable TB mesh network.

this is because proxmox UI seems fragile wrt to changing underlying network after configuration of ceph.

All installation done via command line due to gui not understanding the mesh network

This setup doesn't attempt to seperate the ceph public network and ceph cluster network (not same as proxmox clutser network), The goal is to get an easy working setup.

this gist is part of this series

@tkhrl
tkhrl / 00-SEPA XML generation.md
Created June 4, 2024 15:51 — forked from slyvain/00-SEPA XML generation.md
Generate an XML file compliant with SEPA Credit Transfer (SCT) in PAIN 001.001.003 format for the EUR currency.

Introduction

SEPA data formats are based on the ISO 20022 Standard.

The usual banking file format for a SEPA & Non-SEPA Credit Transfer is the Pain (payment initiation) format 001.001.03.

However there is a specific German credit transfer XML format that is supported only by a limited amount of banks, the Pain 001.003.03, but since November 2016, the recommended Standard is 001.001.03.

For more on this, see the german specifications in section DFÜ Agreement Annex 3 – Version 3.0, Chapter 4.

@tkhrl
tkhrl / create-cloud-template.sh
Created June 4, 2024 13:37 — forked from meramsey/create-cloud-template.sh
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1

How to update IP addressing on a Proxmox Cluster

When you change something in your network configuration, rather than its the gateway or the IP addressing, you may come under serious troubleshooting on your Proxmox Cluster, so this document will guide you into the necessary steps needed to update your network settings on Proxmox.

Note : You must follow these steps on every single node of your cluster to let it able to handle the synchronization between each node once.

So firstly, you will need to change the network interface configuration of the system; it is preferable for you to set a static IP:

/etc/network/interfaces
@tkhrl
tkhrl / HighTrafficServerSettings.md
Created December 17, 2023 14:11 — forked from fschiettecatte/HighTrafficServerSettings.md
High Traffic Server Settings on RHEL / AlmaLinux / Rocky / EuroLinux / CentOS 8

High Traffic Server Settings on RHEL / AlmaLinux / Rocky / EuroLinux / CentOS 8

I recently did some work to optimize the network configuration of an AlmaLinux 8 based web server that receives a lot of traffic.

Of course these settings also apply to RHEL / Rocky / EuroLinux / CentOS 8 (hereafter referred to as Linux 8.) I think these should also work on RHEL / AlmaLinux / Rocky / EuroLinux 9 as well but I have not yet tested them.

There is a lot of information on the web for this and it distills down to a minimum recommended configuration, and a recommended configuration.

The minimum recommended configuration should be sufficient for servers with less than 10Gb, and the recommended configuration should be sufficient for servers with 10Gb or more.

@tkhrl
tkhrl / create-service.py
Created November 23, 2022 22:47 — forked from ahmedsadman/create-service.py
Python script to create systemd service
"""
Create systemd service file in Linux from given JSON data file
Author: Ahmed Sadman Muhib
"""
"""
Sample JSON file:
{
"service_name": "test_service",
@tkhrl
tkhrl / create-service.sh
Created November 23, 2022 22:44 — forked from ahmedsadman/create-service.sh
Bash script to create systemd service
#!/usr/bin/bash
##
## Creates Service file based on JSON data
##
# Sample JSON file:
# {
# "service_name": "test_service",
# "description": "Netcore dev server",