Ayyaz Akhtar's Technical Blog

website·Indexed 31 days ago

https://blog.ayyazakhtar.com

A collection of technical guides and tutorials covering DevOps, cloud networking, and software engineering. Topics include AWS multi-cloud and hybrid networks, Kubernetes, Node.js multi-threading, VLAN implementation with pfSense, observability solutions using Docker, and system design principles.

Tokens
14K
Snippets
48
Records
116
Agent score
50%

What's inside Ayyaz Akhtar Blog

  1. Overview of Automated Cloud Advisor for AWS Cost Optimization

    Automated Cloud Advisor is an extensible open-source tool designed to facilitate cost optimization in AWS by identifying and collecting data on under-utilized resources. It is deployed as a set of CloudFormation stacks that handle data collection, and the resulting data can be visualized using a Kibana dashboard.
  2. Use Automated Cloud Advisor for AWS cloud optimization

    Automated Cloud Advisor is an open-source project available on GitHub that provides automated guidance for cloud infrastructure. It is maintained by Disney Streaming.
    # Clone the Automated Cloud Advisor repository
    git clone https://github.com/disneystreaming/automated-cloud-advisor
  3. Map cloud vendor network components for multi-cloud integration

    When integrating AWS, Azure, GCP, and On-Premise (pfSense) environments, the following component mappings are used for the network architecture:
    FeatureAWSAzureGCPOn-Premise (pfSense)
    NetworkNetworkVNETVPCVLAN
    GatewayGatewayVWANNCCISP
    DNSDNSPrivate ResolverCloud DNSPihole
    ConnectivityS2SConnectionPeer VPNIPSec
    Management/VMSSMAzure VMGCP VMMac
  4. Understand Kubernetes Cluster Architecture

    A Kubernetes cluster consists of a Control Plane and Worker Nodes to automate application deployments at scale.

    Control Plane Node (The Brain):

    • API Server: The RESTful HTTPS front end of the cluster.
    • Cluster Store (etcd): The source of truth holding the desired state of all cluster components.
    • Controller Manager: Reconciles the observed state with the desired state.
    • Scheduler: Assigns tasks to capable worker nodes.

    Worker Node (The Execution):

    • Kubelet: Agent that handles workloads and reports status back to the control plane.
    • Runtime: Manages the container lifecycle (typically using containerd).
    • Kube-proxy: Handles cluster networking and load balancing.

    Traffic Flow:

    • North-South: Traffic between Client <-> VPC <-> Ingress.
    • East-West: Traffic between different Availability Zones (AZ A <-> AZ B <-> AZ C).
  5. Deploy xmrig for Monero mining using Docker

    Run a Monero (XMR) miner using the aakhtar3/xmrig Docker image. To maximize performance on ARM devices like Raspberry Pi, ensure you use a native ARM architecture image to avoid emulation bottlenecks. You will need a Monero wallet and a mining pool URL (e.g., pool.hashvault.pro:443).
    # Replace ${POOL} and ${WALLET} with your actual pool URL and wallet address
    docker run -d \
        --name xmrig \
        -e URL=${POOL} \
        -e WALLET=${WALLET} \
        -e NODE_NAME=$(hostname) \
        --cpus="2" \
        --cpu-quota=400000 \
        --cpu-period=100000 \
        aakhtar3/xmrig
  6. Configure an AWS VPC for multi-cloud hybrid networking

    To establish a base network in AWS for a hybrid cloud architecture, create a Virtual Private Cloud (VPC) with the following specifications:

    • Name: vpc-aws
    • IPv4 CIDR block: 172.16.11.0/24
    • Availability Zones (AZs): 2
    • Public Subnets: 0
    • Private Subnets: 2
    • NAT/Endpoints: None
  7. Build a multi-cloud highly available logically connected network

    This guide outlines the architecture for creating four distributed networks (AWS, Azure, GCP, and an On-Premise pfSense network) and combining them into a single highly available logically connected network. The implementation focuses on:

    • Scaling Mesh network topology for point-to-point connections.
    • Implementing dynamic routing between Autonomous Systems (AS) using Border Gateway Protocol (BGP).
    • Encrypting network traversal over VPN tunnels using Internet Protocol Security (IPSec).
    AWSAzureGCPPFSense
    NetworkVNETVPCVLAN
    GatewayVWANNCCISP
    DNSPrivate ResolverCloud DNSPihole
    S2SConnectionPeer VPNIPSec
    SSMAzure vmGCP vmMac
  8. Define system design requirements

    When scoping a system design problem, categorize requirements into Functional and Non-Functional types:

    • Functional Requirements: Define the core features and what the system is trying to build (e.g., 1-on-1 chat for mobile/web, news feed notifications).
    • Non-Functional Requirements: Define how the system should behave, focusing on user experience and system constraints (e.g., end-to-end encryption, high availability, reliability, and low latency for new posts).

    Additionally, consider the Architecture (High Availability, Failover, RPO/RTO) and Key Performance Indicators (Observability and Metrics).

  9. Design a multi-cloud highly available logically connected network

    The objective is to create four distributed networks (AWS, Azure, GCP, and an On-Premise pfSense network) and combine them into a single highly available logically connected network. Key architectural requirements include:

    • Implementing a Mesh network topology to support additional point-to-point connections.
    • Using Border Gateway Protocol (BGP) for dynamic routing between Autonomous Systems (AS).
    • Encrypting network traversal over VPN tunnels using Internet Protocol Security (IPSec).
  10. Connect to Kali Linux GUI using JumpDesktop

    Configure JumpDesktop on iPad to connect to the VNC server using an SSH tunnel to ensure security.

    • Hostname: localhost or 127.0.0.1
    • Port: 5901
    • SSH Tunneling: Enabled
    • SSH Server: Digital Ocean IPv4 address
    • SSH Key: Import the private key generated in Blink.
  11. Configure VLANs and Interfaces in pfSense

    To create network segments in pfSense, you must define VLANs with a specific priority and ID, then assign them to interfaces. After adding the VLAN, you must edit the interface to enable and configure it, then apply the changes.
    Navigation path: Interfaces -> Assignments -> Add VLANs -> Add Interfaces -> Edit Interface -> Save -> Apply