Posts

Using Kafka with Docker and NodeJS

Image
Introduction to Kafka Kafka is an open-source , distributed messaging system that functions on a publish/subscribe model. It is widely used by numerous large companies for high-performance , real-time data streaming. Developed by LinkedIn since 2011, Kafka has grown into the most popular distributed streaming platform. It can handle vast amounts of records with high efficiency. Advantages of Kafka Open-source : Freely available and continuously improved by a large community. High-throughput, high-frequency : Capable of processing large volumes of data across topics continuously. Automatic message storage : Allows for easy message retrieval and verification. Large user community : Offers extensive support and shared resources. Basic Concepts If you're new to Kafka and Message Queues, here are some key concepts to understand: Producer : Creates and sends data to the Kafka server, where data is sent as messages in byte array format. Consumer : One or more consumers subscribe to

Kubernetes Pod Cheatsheet

Image
Introduction This article is here to guide you on using Pod  in Kubernetes . I'll give you some concepts and commands that Kubernetes often uses to handle Pod . Pod Introduction A Pod is the smallest deployable unit in Kubernetes . Here are some key points about Pods: Multiple Containers : A Pod can contain more than one container, and there's no limit to how many containers you can run inside a Pod. These containers are relatively tightly coupled and share resources such as disk. Shared Resources : All the containers inside a Pod are connected via localhost and share the same memory space. They also share storage (volumes), IP address, and configuration information. Unique IP Address : Each Pod gets a unique IP address. Ephemeral Nature : Pods are ephemeral in nature; they can be created, deleted, and updated. Prerequisites Before we begin, make sure you have the following: For Kubernetes systems, you can use minikube or have permissions to provision resources on cloud pro

Deploy ReactJS application to Firebase in 5 minutes

Image
Introduction Firebase Firebase is a product of Google that helps developers build, manage, and grow their apps easily. It’s designed to make app development faster and more secure. In this article, I'll guide you through deploying a ReactJS application on Firebase . Google provides Firebase hosting for free, offering stable speed and SSL certificates, making it ideal for creating HTTPS-supported websites. Creating a React Application Firstly, you need to create a React Application project or use an existing one. You can use tools like vite , create-react-app , or Nx/Nrwl . The project initialization process is straightforward and can be easily found. Here, I'll use Nx, a build system that provides various tools for developing projects in multiple programming languages. You can learn more about Nx/React here . After successfully initializing and running the React application, the result should look like this: Next, let's proceed to build the React application. If you

Using Terraform to Create VM Instances and Connect via SSH

Image
Introduction In the previous article, I introduced some basic concepts about Terraform , as well as the advantages of using Terraform . If you're not familiar with it yet, take a look to get some basic knowledge before diving into the next topics . In this article, I will guide you through writing Terraform files to deploy a Virtual Machine (VM) instance to the Google Cloud Provider . Creating a Service Account If you already have a Google Cloud account with the necessary permissions, you can log in to work with Terraform as I instructed in the previous article. However, if for some reason you can't log in, or if you need a better authentication method, you can create a Service Account to use. In simple terms, a Google Cloud account is allowed to create Service Accounts . Each Service Account is assigned roles , and each role has corresponding permissions allowing the Service Account to perform specific tasks based on permissions . To create a Service Account , use th

Using Terraform to deploy a docker image on Google Kubernetes Engine

Image
Introduction to Terraform Terraform is an Infrastructure as Code (IaC) tool developed by HashiCorp . It allows you to build, change, and version your infrastructure safely and efficiently. Here are some key features of Terraform : Human-Readable Configuration Files : Terraform lets you define both cloud and on-prem resources in human-readable configuration files that you can version, reuse, and share. Multi-Cloud Support : Terraform can manage infrastructure on multiple cloud platforms. Providers enable Terraform to work with virtually any platform or service with an accessible API. Lifecycle Management : The core Terraform workflow consists of three stages: Write : Define resources across multiple cloud providers and services. Plan : Terraform creates an execution plan describing what it will create, update, or destroy. Apply : On approval, Terraform performs the proposed operations in the correct order, respecting any resource dependencies. State Management : Terraform keeps track