Skip to content

Instantly share code, notes, and snippets.

View AasSuhendar's full-sized avatar
🎯
Focusing

Aas Suhendar AasSuhendar

🎯
Focusing
View GitHub Profile
@AasSuhendar
AasSuhendar / CKAD.md
Created June 6, 2024 16:47 — forked from veggiemonk/CKAD.md
CKAD exam preparation
@zidenis
zidenis / 5_steps_for_creating_templates_and_vms_on_proxmox_using_linux_distros_cloud_images.md
Last active July 3, 2024 14:13
Creating Templates and Virtual Machines on Proxmox using cloud images from various Linux distributions.

5 Steps for Creating Templates and Virtual Machines on Proxmox using Linux Distro's Cloud Images

This tutorial guides you through the process of creating Templates and Virtual Machines on Proxmox using cloud-based images from various Linux distributions. We provide clear instructions for Alma Linux 9, Amazon Linux 2, CentOS 9, Fedora 38, Oracle Linux 9, RHEL 9, Rocky Linux 9, and Ubuntu 23.04 Lynx Lobster.

Note: The instructions have been tested on Proxmox 8.0.4.

Let's begin by choosing the cloud-based image. If you already have your preferred Linux distribution, skip to the 1st step.

To assist in making informed choices when selecting a Linux distribution for your virtual machines, we've compiled a table showcasing key characteristics of each cloud image. This table provides a snapshot of important attributes, including kernel version, Python version, number of processes initialized after boot, number of packages installed, free memory after boot, VM disk size, root partition disk size, used size on t

@bgulla
bgulla / Makefile
Created April 17, 2023 20:31
RKE2/K3s Nvidia GPU-Operator installation
prep:
helm repo add nvidia https://helm.ngc.nvidia.com/nvidia \
&& helm repo update
install:
helm install --wait nvidiagpu \
-n gpu-operator --create-namespace \
--set toolkit.env[0].name=CONTAINERD_CONFIG \
--set toolkit.env[0].value=/var/lib/rancher/k3s/agent/etc/containerd/config.toml \
--set toolkit.env[1].name=CONTAINERD_SOCKET \
# Install prerequisites
sudo apt-get -y update
sudo apt-get -y install ca-certificates curl gnupg lsb-release
# Setup Docker's repository
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get -y update
@nschairer
nschairer / README.md
Last active January 15, 2024 13:23 — forked from ryu1kn/README.md
Getting GCP access token from a service account key JSON file

Getting GCP access token from a service account key

Use your service account's key JSON file to get an access token to call Google APIs.

Good for seeing how things work, including the creation of JWT token.

To create a JWT token, you can replace create-jwt-token.sh script with tools like step.

If you just want to get an access token for a service account,

@dimaskiddo
dimaskiddo / ssh-hardening.sh
Last active June 8, 2024 19:11
SSH Hardening Script
#!/bin/bash
# SSH Hardenning Script
# Created By Dimas Restu Hidayanto (dimas.restu@student.upi.edu)
echo "--------------------------------------"
echo "SSH Hardening"
echo "dimas.restu@student.upi.edu"
echo "--------------------------------------"
echo ""
@dimaskiddo
dimaskiddo / promethus-zfs.md
Created July 30, 2021 04:56
Prometheus Time-Series Database for Monitoring with ZFS

Prometheus Time-Series Database for Monitoring with ZFS

What's Prometheus

Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud. Since its inception in 2012, many companies and organizations have adopted Prometheus, and the project has a very active developer and user community. It is now a standalone open source project and maintained independently of any company

How to Install Prometheus with ZFS

In this guide we will use Debian based Linux distribution version 10 (Buster). If you are using an Cloud Instance like in Amazon Web Service you can use the default provided Ubuntu Amazon Machine Image (AMI) Debian 10 (Buster) 64-bit when you are provisioning it

@TonyPythoneer
TonyPythoneer / q2.yaml
Last active July 19, 2024 19:45
CKAD Lightning Lab - Part 1
"""
Create a Persistent Volume called log-volume. It should make use of a storage class name manual. It should use RWX as the access mode and have a size of 1Gi. The volume should use the hostPath /opt/volume/nginx
Next, create a PVC called log-claim requesting a minimum of 200Mi of storage. This PVC should bind to log-volume.
Mount this in a pod called logger at the location /var/www/nginx. This pod should use the image nginx:alpine.
"""
apiVersion: v1
kind: PersistentVolume
@superseb
superseb / k3s-etcd-commands.md
Last active July 23, 2024 09:52
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

Install docker latest with ZFS as storage driver on Ubuntu 18.04.

Reminder before we go deep down in to the installation.

ZFS is only supported on Docker Engine - Community with Ubuntu 14.04 or higher, with the zfs package (16.04 and higher) or zfs-native and ubuntu-zfs packages (14.04) installed.

In this tutorial I'm using an aws ec2 instance with fresh installed Ubuntu 18.04 Let's get started