Skip to content

Instantly share code, notes, and snippets.

View swghosh's full-sized avatar

Swarup Ghosh swghosh

View GitHub Profile
@swghosh
swghosh / 00-kube-up.sh
Last active June 16, 2023 14:13
Launch kubeadm bootstrapped single node k8s cluster in a Fedora linux VM. (optionally, create an AWS Fedora VM and add k8s etcd encryption through AWS KMS plugin)
View 00-kube-up.sh
#!/bin/bash
sudo dnf group install -y "Container Management"
sudo dnf install -y golang
go version
sudo yum install -y \
containers-common \
device-mapper-devel \
@swghosh
swghosh / README.md
Last active May 23, 2023 18:26
Manifests for ambient credentials of cert-manager with OpenShift Cert Manager Operator
View README.md
View gist:d789e7343d57295bb860146a3641893c
# YouTube (english) : https://www.youtube.com/watch?v=FtU2_bBfSgM
# YouTube (french) : https://www.youtube.com/watch?v=VjnaVBnERDU
#
# On your laptop, connect to the Mac instance with SSH (similar to Linux instances)
#
ssh -i <your private key.pem> ec2-user@<your public ip address>
#
# On the Mac
@swghosh
swghosh / 00-letsencrypt-prod-certs.yaml
Last active December 1, 2022 11:43
Issuing LetsEncrypt Certificates using (OpenShift) Cert Manager Operator
View 00-letsencrypt-prod-certs.yaml
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: letsencrypt
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: "swghosh@redhat.com"
privateKeySecretRef:
name: letsencrypt
@swghosh
swghosh / resize_disk_image.md
Created November 18, 2022 20:51 — forked from joseluisq/resize_disk_image.md
How to resize a qcow2 disk image on Linux
View resize_disk_image.md

How to resize a qcow2 disk image on Linux

This example takes olddisk.qcow2 and resizes it into newdisk.qcow2, extending one of the guest's partitions to fill the extra space.

1. qcow2 format

1.1. Verify the filesystems of olddisk.qcow2

@swghosh
swghosh / crio_build_and_ignite_k8s_node_e2e.sh
Last active September 3, 2022 08:31
Script to generate a custom ignition config for running k8s-node-e2e test on Fedora CoreOS VM. It builds CRI-O locally in a container, prepares a bundle and uploads it to a GCP bucket for it to be used with the ignition config.
View crio_build_and_ignite_k8s_node_e2e.sh
#!/usr/bin/env bash
set -eou pipefail
# Set these variables
# cri-o repo dir- path to cri-o source
CRIO_DIR=~/repositories/cri-o
# ignition dir- output directory for generated ignition config
IGNITION_OUT_DIR=~/Desktop
# evented pleg- use 0/1 as it's value depending upon whether crio binary should be started with --evented_pleg flag or not
@swghosh
swghosh / .colored_bash_prompt.bashrc
Created March 1, 2022 07:40
Slightly colored terminal prompt with vcs information.
View .colored_bash_prompt.bashrc
#!/usr/bin/env bash
export COLOR_NC='\e[0m' # No Color
export COLOR_BLACK='\e[0;30m'
export COLOR_GRAY='\e[1;30m'
export COLOR_RED='\e[0;31m'
export COLOR_LIGHT_RED='\e[1;31m'
export COLOR_GREEN='\e[0;32m'
export COLOR_LIGHT_GREEN='\e[1;32m'
export COLOR_BROWN='\e[0;33m'
@swghosh
swghosh / xrdp_fedora29.md
Created December 10, 2021 07:08 — forked from jpwhite3/xrdp_fedora29.md
How to configure XRDP on Fedora 29
View xrdp_fedora29.md
@swghosh
swghosh / # python@3.8 - 2020-12-03_20-04-11.txt
Created December 3, 2020 14:39
python@3.8 on macOS 11.0.1 - Homebrew build logs
View # python@3.8 - 2020-12-03_20-04-11.txt
Homebrew build logs for python@3.8 on macOS 11.0.1
Build date: 2020-12-03 20:04:11
@swghosh
swghosh / # python@3.9 - 2020-11-30_02-46-23.txt
Created December 3, 2020 13:47
python@3.9 on macOS 11.0.1 - Homebrew build logs
View # python@3.9 - 2020-11-30_02-46-23.txt
Homebrew build logs for python@3.9 on macOS 11.0.1
Build date: 2020-11-30 02:46:23