Kunal

Kunal

Building Custom AI Applications with LLMs and RAG

Introduction: The Power Duo – LLMs and RAG Large Language Models (LLMs) like GPT-4, Llama 2, or Mistral have demonstrated incredible capabilities in understanding and generating human-like text. They are trained on vast amounts of data, enabling them to perform…

Creating an AWS ECS Service with Fargate, ECS Exec, and Terraform

Amazon Elastic Container Service (ECS) is a fully managed container orchestration service that simplifies deploying, managing, and scaling containerized applications. AWS Fargate, a serverless compute engine for containers, eliminates the need to manage underlying infrastructure. ECS Exec enables secure command…

Self-Hosting GitLab on AWS

Over the last year or so I had been looking at migrating our current single-node Gitlab server to a more de-coupled/distributed architecture. The primary purpose was to ensure that a single component would not bring down the entire platform. By…

Custom Logger in Bash

While writing scripts in Bash, adding some nice, reusable functions for logging. #!/bin/bash # Colors for output GREEN=’\033[0;32m’ BLUE=’\033[0;34m’ RED=’\033[0;31m’ YELLOW=’\033[1;33m’ NC=’\033[0m’ # Error handling handle_error() { echo -e “${RED}Error: $1${NC}” >&2 cleanup exit 1 } # Logging function log()…

Delete old pipelines in Gitlab

Gitlab is a great CI/CD tool along with all the benefits of being a SCM tool as well. Having said that, if you are self hosting Gitlab, and want to control the amount of storage, then a little bit of…

Run AWS ECR Image via Docker Compose and Environment Variables

Using Docker Compose to run a Docker container with environment variables from an AWS ECR image involves creating a docker-compose.yml file and defining the necessary configurations. Here’s how you can do it: Replace placeholders like <account-id>, <region>, <repository-name>, <tag>, VAR_NAME1,…

AWS Credentials in a Dockerfile

Using AWS credentials from your local machine in a Docker build process requires careful handling to ensure security. Here’s a step-by-step guide on how to do it: This approach avoids embedding the credentials in the image, but it makes them…

What is Terraform State

Terraform is a tool for building, changing, and versioning infrastructure. One of the core concepts of Terraform is the “state file,” which keeps track of the resources that Terraform manages. The Terraform state file is a JSON file that stores…

Use a Terraform template in Gitlab Pipeline

Overview In GitLab, templates can be used in pipelines to simplify the process of creating a pipeline. Templates are essentially predefined scripts that can be reused across multiple pipelines, making it easier to maintain and manage pipelines across an organization.…