Skip to content

Instantly share code, notes, and snippets.

View the-k-node's full-sized avatar
:electron:
In e-universe

Kiran Kumar SG the-k-node

:electron:
In e-universe
View GitHub Profile
@the-k-node
the-k-node / cloudSettings
Created June 5, 2021 05:53
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-06-05T05:53:58.253Z","extensionVersion":"v3.4.3"}
@the-k-node
the-k-node / LinuxBootProcess.md
Created June 3, 2021 05:21
Linux Boot Process with all steps that linux follows and proceeds from one step to another

Linux boot process 🐧

Following steps

  1. BIOS (Basic input and output system)
  2. MBR (Master boot record)
  3. GRUB (Grand unified boot loader)
  4. Kernel
  5. Init
  6. Runlevel program
@the-k-node
the-k-node / containerd + libcontainer.md
Last active August 31, 2021 14:03
Docker's Containerd runtime & libcontainer driver or library simplified

Containerd for Docker 🚢🐳

Containers

  • What are containers?
  • Containers are isolated workspaces & are implemented using Linux namespaces and cgroups
  • Why we should use containers?
    • A container image format
    • A method for building container images (Dockerfile/docker build)
  • A way to manage container images (docker images, docker rm , etc.)
@the-k-node
the-k-node / VRF.md
Last active June 11, 2021 07:51
Setting up 2 different VRFs for 3 hosts

VRF

Setting up 2 different VRFs for 3 hosts

  • For establishing BGP connections between each Host and its corresponding leaf (router), we can advertise loopback IPs of Host to their respective Routers.

  • Create 2 VRFs and add required hosts on each of them, use these commands on Spine - R4,

    # net add vrf vrf-1 vrf-table auto
    

net add interface swp1 vrf vrf-1 #swp1 - 10.5.1.1

@the-k-node
the-k-node / marathon-to-traefik-app.json
Last active June 10, 2021 17:54
Basic & Docker Marathon application json file for sending its data to traefik
{
"id": "basic-5",
"cmd": "while [ true ] ; do echo 'Hello KKKK' ; sleep 5 ; done",
"cpus": 0.1,
"mem": 10.0,
"instances": 1,
"labels":{
"traefik.enable": "true",
"traefik.http.routers.router0.rule": "Host(`192.168.100.242:80`)"
}
@the-k-node
the-k-node / Mesos Master + Zookeeper + Marathon.md
Last active June 10, 2021 17:54
Mesos + Zookeeper + Marathon setup

Mesos Master, Marathon, & Zookeeper

  • Setup for java dependencies

    $ sudo apt-get update
    $ sudo apt install openjdk-16-jre-headless
    $ sudo apt install openjdk-11-jre-headless
    $ update-alternatives --config java

Namespaces

  • Namespaces are a kernel mechanism for limiting the visibility that a group of processes has of the rest of a system.

  • The purpose of namespaces is to wrap a particular global system resource in an abstraction that makes it appear to the processes within the namespace that they have their own isolated instance of the global resource.

  • For example - you can limit visibility to certain process trees, network interfaces, user IDs or filesystem mounts.

  • namespaces were originally developed by Eric Biederman, and the final major namespace was merged into Linux 3.8.

@the-k-node
the-k-node / EVPN - VxLAN.md
Last active August 31, 2021 14:00
creating a Velan overlay for a e-bgp underlay network to facilitate hosts to communicate

VxLAN overlay on e-BGP:

topology

  • In above topology, we see R4 is Spine and R1, R2, & R3 are leaves in a Spine-leaf architecture.

  • After establishing the BGP between R1, R2, R3, & R4, we need to setup loopback interfaces for all leaves to enable VTEP and activate neighbors through evpn address family

    • On R1,
@the-k-node
the-k-node / bgp-configuration.md
Last active June 10, 2021 17:55
Configuring BGP on Ubuntu+FRR and Cumulus VX systems

BGP configuration among 3 nodes(R1,R2,R3) and 1 router(R4):

  • Ubuntu + FRR

    • VMs' configuration:

      Host adapter IP/mask
      R1 enp0s3 10.5.1.2/30
      R2 enp0s3 10.5.1.6/30
@the-k-node
the-k-node / Replication.md
Last active May 10, 2021 10:23
Aerospike replication technique to migrate the partitions among the cluster nodes

Aerospike Data Replication

  • Aerospike uses certain standards and techniques for the data replication among its nodes.

  • The Aerospike Data Migration module intelligently balances data distribution across all nodes in the cluster, ensuring that each bit of data replicates across all cluster nodes and datacenters. This operation is specified in the system replication factor configuration.

  • Each node uses a distributed hash algorithm to divide the primary index space into data slices and assign owners. Each primary key is hashed into a 160-byte digest using the RipeMD160 algorithm.

  • Data Distribution Diagram: