Skip to content

Instantly share code, notes, and snippets.

View akamas's full-sized avatar

SAnker akamas

View GitHub Profile
@akamas
akamas / rke2-commands.md
Created March 19, 2023 21:28 — 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
@akamas
akamas / k3s-etcd-commands.md
Created March 19, 2023 21:27 — forked from superseb/k3s-etcd-commands.md
k3s etcd commands

k3s etcd commands

etcd

Setup etcdctl using the instructions at https://github.com/etcd-io/etcd/releases/tag/v3.4.13 (changed path to /usr/local/bin):

Note: if you want to match th etcdctl binaries with the embedded k3s etcd version, please run the curl command for getting the version first and adjust ETCD_VER below accordingly:

curl -L --cacert /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt --cert /var/lib/rancher/k3s/server/tls/etcd/server-client.crt --key /var/lib/rancher/k3s/server/tls/etcd/server-client.key https://127.0.0.1:2379/version
@akamas
akamas / create-nginx-in-front-of-github.sh
Created March 19, 2023 21:08 — forked from superseb/create-nginx-in-front-of-github.sh
Front github.com with self signed certificate to test custom CA in tooling
#!/bin/bash
while true; do
docker ps && break
echo "waiting for docker to respond"
sleep 3
done
echo "Generating nip.io based on found external IP"
FOUNDIP=$(docker run --rm --net=host appropriate/curl https://api.ipify.org)
FQDN="git.${FOUNDIP}.nip.io"
@akamas
akamas / nfs-tunnel.md
Last active November 6, 2022 18:24 — forked from proudlygeek/nfs-tunnel.md
Mount NFS Folder via SSH Tunnel

or easy:

autossh -M <monitor_SSH_port> -N -L <your_local_port>:localhost:2049 <remote_server_user>@<remote_server> -f
mount -t nfs -o port=<your_local_port> localhost:/home/proudlygeek /mnt/nfs-share

1. Install NFS on Server

Install the required packages (Ubuntu 12.04):

apt-get install nfs-kernel-server portmap
@akamas
akamas / online-net_systemd-network-configuration.md
Created November 6, 2022 18:20 — forked from jkhsjdhjs/online-net_systemd-network-configuration.md
online.net: systemd Network Configuration with (r)DNS

online.net: systemd Network Configuration with (r)DNS

Introduction

This document will guide you through the process of setting up your online.net network addresses, DNS servers and rDNS records. For IPv4 we will use systemd-networkd (part of systemd) and odhcp6c (OpenWrt embedded DHCPv6-client) together with iproute2 for IPv6. For DNS we'll use systemd-resolved.

systemd is the default init process on Arch Linux, Debian GNU/Linux, Fedora, Ubuntu and more. iproute2 is also preinstalled there. So, if you're using a distribution that uses systemd, this tutorial should work for you. If you're using Gentoo Linux first make sure that you're using systemd.

Table of Contents

@akamas
akamas / README.md
Last active November 6, 2022 18:18 — forked from zealot128/README.md
Gitlab Autoscaling Infrastructure on Hcloud with internal caching

Order and provision a Hetzner Cloud based Gitlab-Runner Docker-machine autoscaling infrastructure

See my blog for more information.

  • Adjust settings in vars.auto.tfvars.
  • Run with terraform init && terraform apply

Content:

@akamas
akamas / cloudflare-ddns-update.sh
Created November 6, 2022 18:16 — forked from foobarhl/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
## Based on https://gist.github.com/Tras2/cba88201b17d765ec065ccbedfb16d9a with updates to use
## per-zone configurable access tokens available in the API sections of your Cloudflare profile
## - [email protected]
@akamas
akamas / 00-cloud-config.yml
Created November 6, 2022 18:14 — forked from janeczku/00-cloud-config.yml
Annotated RancherOS Cloud-init configuration snippets
#cloud-config
# Set the hostname for this machine (takes precedence over hostname assigned by DHCP lease).
hostname: myhost
# Authorize SSH keys for the `rancher` sudoer user
ssh_authorized_keys:
- ssh-rsa AAA...ZZZ example1@rancher
@akamas
akamas / HiDrive-urls.mk
Created October 11, 2022 05:01
Alle URLs für HiDrive-CloudStorage von Strato (damit du immer und überall deine Daten syncen kannst)
Dienst/Protokoll Server Port
SFTP sftp.hidrive.strato.com 22
FTPS ftp.hidrive.strato.com 21
FTPES (expl. SSL/TLS) ftp.hidrive.strato.com 21
WebDAV (SSL) https://webdav.hidrive.strato.com 443
SMB Windows \\smb3.hidrive.strato.com\root 445
SMB Linux/Unix //smb3.hidrive.strato.com/root 445
SMB macOS / iOS / iPadOS smb://smb3.hidrive.strato.com/root 445
rSync (SSH) rsync.hidrive.strato.com 22
SCP scp.hidrive.strato.com 22
@akamas
akamas / !proxmox_setup.sh
Created September 18, 2022 20:09 — forked from ilude/proxmox-setup-notes.md
How to setup a community version of Proxmox VE 5.x-7.x
# copy and paste oneliner below to run
# curl -s https://gist.githubusercontent.com/ilude/32aec45964bc1207810f7e6e49544064/raw/%21proxmox_setup.sh?$(date +%s) | /bin/bash -s
# Disable Commercial Repo
sed -i "s/^deb/\#deb/" /etc/apt/sources.list.d/pve-enterprise.list
# Add PVE Community Repo
echo "deb http://download.proxmox.com/debian/pve $(grep "VERSION=" /etc/os-release | sed -n 's/.*(\(.*\)).*/\1/p') pve-no-subscription" > /etc/apt/sources.list.d/pve-no-enterprise.list
# setup no nag script to run on upgrade