Ayyaz Akhtar's Technical Blog
website·Indexed 31 days ago
https://blog.ayyazakhtar.comA 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.
What's inside Ayyaz Akhtar Blog
- 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.
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-advisorMap 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:Feature AWS Azure GCP On-Premise (pfSense) Network Network VNET VPC VLAN Gateway Gateway VWAN NCC ISP DNS DNS Private Resolver Cloud DNS Pihole Connectivity S2S Connection Peer VPN IPSec Management/VM SSM Azure VM GCP VM Mac 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).
Deploy xmrig for Monero mining using Docker
Run a Monero (XMR) miner using theaakhtar3/xmrigDocker 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/xmrigConfigure 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
Design a multi-zone network architecture
For a secure and organized home or lab network, consider the following logical segments: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).
AWS Azure GCP PFSense Network VNET VPC VLAN Gateway VWAN NCC ISP DNS Private Resolver Cloud DNS Pihole S2S Connection Peer VPN IPSec SSM Azure vm GCP vm Mac 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).
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).
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:
localhostor127.0.0.1 - Port:
5901 - SSH Tunneling: Enabled
- SSH Server: Digital Ocean IPv4 address
- SSH Key: Import the private key generated in Blink.
- Hostname:
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