Skip to content

Instantly share code, notes, and snippets.

View GeoffMahugu's full-sized avatar
:octocat:
Fullstack Software Developer | DevOps Engineer

Geoffrey Mahugu GeoffMahugu

:octocat:
Fullstack Software Developer | DevOps Engineer
View GitHub Profile
@GeoffMahugu
GeoffMahugu / package.json
Created May 28, 2019 15:05
angular-cypress-package.json
{
"name": "angular-io-example",
"version": "1.0.0",
"private": true,
"description": "Example project from an angular.io guide.",
"scripts": {
"lint": "tslint ./src/**/*.ts -t verbose",
"start": "ng serve",
"test": "ng test",
"build": "ng build --prod",
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export GRADLE_HOME=/opt/gradle/gradle-5.6.2
export PATH=${GRADLE_HOME}/bin:${PATH}
@GeoffMahugu
GeoffMahugu / kubernetes-cheatsheet.md
Last active September 8, 2023 07:16
Kubernetes Cluster

Kubernetes CheatSheet

This documentation lays out a step by step process of getting started on Kubernetes.

Install docker

To install docker we will switch to the root user just to make our work easier.

Ref: https://docs.docker.com/engine/install/ubuntu/

@GeoffMahugu
GeoffMahugu / agilion-k8s-cmds.md
Last active August 6, 2020 20:10
AgilionCluster.md

AGILION K8S CLUSTER MAINTAINACE

This document contains descripion on how to maintain agilion's cluster.

Key Assumptions

* Basic understanding of kubernetes(k8s) and microservice architecture.
* Cluster is up and running (There will be commands to verify the cluster status)
* Master Node configuration:
  -- RAM       >= 2 GB 
@GeoffMahugu
GeoffMahugu / github CICD Cheatsheet
Created June 5, 2020 18:38
GitHub private repo access
Onve you settup a private repo, you will need an access token to access the image.
To login to GitHub repo, first create a file at and add your github password:
``nano ~/TOKEN.txt``
Then run this command, replacing USERNAME with your github username.
``$ cat ~/TOKEN.txt | docker login https://docker.pkg.github.com -u USERNAME --password-stdin
``
@GeoffMahugu
GeoffMahugu / kubernetes-persistent-nfs.md
Last active September 22, 2020 18:53
This is the cheatsheet for an nfs persistent storage database on K8s with dynamic provisioning.

In this documentation, we are going to set-up an nfs-server, nfs-client and test the network and eventually mount a persistent storage into the nfs server.

1. Install NFS

We will install an NFS server on an external machine (In my case: 192.168.1.100) to reduce the risk of system-failure and also allow for hardware optimization. (SSD and RAM)

For this case, we will be using a Unix environment:

  • SSH to Storage Server
@GeoffMahugu
GeoffMahugu / kubernetes-ingres
Last active June 16, 2020 19:04
kubernetes, ingres, nginx
# Prerequisites.
# Instalation
Install MetalLB for bare metal installation.
REF: https://metallb.universe.tf/installation/
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.3/manifests/namespace.yaml
kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.9.3/manifests/metallb.yaml
# On first install only
kubectl create secret generic -n metallb-system memberlist --from-literal=secretkey="$(openssl rand -base64 128)"
kind: ServiceAccount
apiVersion: v1
metadata:
name: nfs-client-provisioner
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: nfs-client-provisioner-runner
rules:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: managed-nfs-storage
labels:
type: nfs
storage: nfs
provisioner: example.com/nfs
volumeBindingMode: WaitForFirstConsumer
parameters: