Skip to content

Instantly share code, notes, and snippets.

View jmarhee's full-sized avatar

jmarhee

View GitHub Profile
#!/bin/bash
RANCHER_URL=$RANCHER_API_URL
API_TOKEN=$RANCHER_API_TOKEN
OLD_ROLE_NAME="Restricted Admin"
NEW_ROLE_NAME=""
get_role_id_by_name() {
local role_name=$1
@jmarhee
jmarhee / os-files-etc-fstab
Last active February 11, 2025 19:16
Goes into $ELEM/os-files/etc/fstab
## Default SLE Micro root filesystem
LABEL=ROOT / btrfs ro 0 0
LABEL=ROOT /.snapshots btrfs defaults,subvol=@/.snapshots 0 0
LABEL=ROOT /home btrfs defaults,subvol=@/home 0 0
LABEL=ROOT /opt btrfs defaults,subvol=@/opt 0 0
LABEL=ROOT /root btrfs defaults,subvol=@/root,x-initrd.mount 0 0
LABEL=ROOT /srv btrfs defaults,subvol=@/srv 0 0
LABEL=ROOT /var btrfs defaults,subvol=@/var,x-initrd.mount 0 0
LABEL=EFI /boot/efi vfat defaults 0 0
LABEL=ROOT /boot/writable btrfs defaults,subvol=@/boot/writable 0 0
#!/bin/bash
# Create a namespace for the benchmark
kubectl create namespace storage-benchmark
# Deploy Rancher Local Path Provisioner
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
# Deploy DirectPV (assuming you have a YAML file for DirectPV deployment)
kubectl apply -f directpv-deployment.yaml
{
"app-id": "com.example.Clio",
"runtime": "org.freedesktop.Platform",
"runtime-version": "21.08",
"sdk": "org.freedesktop.Sdk",
"command": "clio",
"modules": [
{
"name": "clio",
"buildsystem": "simple",
#!/bin/bash
# Define header size (IP + ICMP headers)
HEADER_SIZE=28
# Define the starting MTU size (adjust as needed)
START_MTU=1472
# Define the minimum MTU size (optional, adjust as needed)
MIN_MTU=100 # Common minimum Ethernet MTU
rkeConfig:
chartValues:
rke2-cilium:
kubeProxyReplacement: true
k8sServiceHost: 127.0.0.1
k8sServicePort: 6443
@jmarhee
jmarhee / harvester-boot.sh
Created May 1, 2024 17:24
Boots a two-node Harvester cluster.
#!/bin/bash
CLUSTER_TAG=harvester-$(openssl rand -hex 6)
ISO=/var/lib/libvirt/images/harvester-v1.3.0-amd64.iso
for i in {1..2}; do \
VM_NAME=$(openssl rand -hex 4); \
sudo qemu-img create /var/lib/libvirt/images/${CLUSTER_TAG}-${VM_NAME}-ROOT_VOL.img 180G; \
sudo qemu-img create /var/lib/libvirt/images/${CLUSTER_TAG}-${VM_NAME}-DATA_VOL.img 250G; \
sudo virt-install \
@jmarhee
jmarhee / rke2-commands.md
Last active September 20, 2024 18:06 — forked from superseb/rke2-commands.md
RKE2 commands

RKE2 commands

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server

Install Elemental with virt-install on KVM

Using virt-install to install SUSE Elemental on KVM.

Prerequisites

When creating your Machine Registration Endpoint in the Rancher UI, ensure that registration.emulated-tpm-seed is set to -1, if you plan to add more than a single machine using the ISO you will be building.

For example:

import java.util.Scanner;
public class NashEquilibrium {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int[][] game = new int[2][2];
System.out.println("Enter the payoff matrix for Player 1 (separate values with spaces):");
for (int i = 0; i < 2; i++) {
for (int j = 0; j < 2; j++) {