Terraform Pull Request Automation

Terraform is one of the most widely used Iaac Tool. It is Free and Open Source tool provided by HashiCorp. Using Terraform you can provision Infrastructure in Multiple Cloud Platforms like AWS, GCP and Azure etc.

Every Organisation maintains the code on the version controlled system (VCS) like GitHub, Bitbucket etc. Whenever a developer makes a change in the IaaC they raise a pull request and then after ‘N’ number of reviews and comments it is accepted, during this back and forth developers will run the terraform commands multiple times either from the Local System or…


Highly Available and Fault Tolerant Solution

Overview

Whenever you run an Infrastructure on Cloud you want to make sure that it is Highly Available, so that if due to some reason if something goes wrong it don’t impact the end user. WordPress is a highly popular content management system (CMS). It is most commonly used for blogs but can also be used for running e-commerce sites, message boards, and many other popular use cases.

Problem Statement

Whenever you install a WordPress on Machines you have config files related to WP. Now if you install the WordPress on multiple machine each machine will have…


We were running MySQL database on EC2 Instance for our Application, It was a good choice when we started but after our application started growing and we started receiving more data, it was becoming more difficult for us to manage that MySQL server, so we have decided to Migrate all our data from self managed MySQL (MySQL on EC2) to AWS Aurora MySQL.

AWS Database Migration Service

Benefits of using Aurora MySQL:

  1. Available and Durable
  2. Higher Security
  3. High Scalability and Performance
  4. Compatible with MySQL
  5. Fully Managed

Amazon Aurora features a distributed, fault-tolerant, self-healing storage system. It delivers high performance and availability with up to 15 low-latency read replicas, point-in-time…


Now a days Serverless is rapidly growing Technology in Cloud Computing world. Most of the companies are moving from traditional architecture to either containerised architecture or serverlesss architecture.

AWS is one of the most popular and powerful cloud. It has lot of services and has a great support for serverless technologies.

AWS Lambda is one of the powerful service for running serverless workloads along with the combination of other service such as API Gateway, DynamoDB, S3, etc..

In Software development we all have a requirement of using some external dependencies, when it comes to deploy the code with external packages…


In Part-1 of this tutorial I have explained how you can run sample node js applications in AWS ECS. In this tutorial I will explain how to Create CI/CD Pipeline using AWS Code-Pipeline.

You can download the source code from my GitHub account.

Prerequisites

  1. Code Commit Repository
  2. You should have VPC created in your account with Public and Private Subnets and Private subnets should have a route to NAT Gateway.
  3. AWS ECS Cluster with Service Running Task Definition (Refer: Part — I)
  4. AWS ECR Repository
  5. Permission to Create IAM roles, policies

Architecture Diagram

AWS ECS CI/CD

Let’s Get Started

Push your code to your existing Code Commit Repository. We…


Amazon Elastic Container Service (ECS) is Amazon’s solution for running and orchestrating Docker containers. It provides an interface for defining and deploying Docker containers to run on clusters of EC2 instances.

In this blog post I will explain how to run simple node.js application in Amazon EC2 Container Service (ECS) and then in the next part we will create CI/CD Pipeline.

You can download the source code from my GitHub account.

Prerequisites

  1. You should have VPC created in your account with Public and Private Subnets and Private subnets should have a route to NAT Gateway.
  2. Amazon Elastic Container Service (ECS) Cluster


Restore Data from S3 Glacier and Deep Archive

Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance. S3 provides a wide range of cost-effective storage classes which support different data access levels at corresponding rates.

We generally use S3 LifeCycle Policy to transition objects automatically over time from one storage class to another for cost savings. We can use S3 Glacier and Deep Archive for archiving our objects which can be required once or twice in a year. …


In my previous blog I have explained how you can run your Django Application in a production environment using Docker.

In this blog I will use AWS Elastic Container Service (ECS) which is a fully managed service for running Docker Container and we will deploy sample Django Application.

You can download source code from my GitHub repository.

What is AWS Elastic Container Service (ECS)?

Amazon Elastic Container Service (ECS) is a highly scalable, high performance container management service that supports Docker containers and allows you to easily run applications on a managed cluster of Amazon EC2 instances.

Prerequisite

  1. You should have VPC created in your account with Public…


Production Ready Solution using Docker

In my previous blog I have explained how you can run your Django application with nginx and gunicorn which is perfect for running Django in production environment.

In this post I am going to explain how you can easily manage your Django application with Docker.

What is a docker?

Docker is a containerization tool used for spinning up isolated, reproducible application environments.

Architecture Diagram

You can download the source code from my GitHub repository. This Project is build using Python3.

To test this application go to django-harsh/hello_django/ and run following command

python hello/manage.py 0.0.0.0:8000

Go to the browser and type <ec2-dns:8000> you will see the django…


A Production Ready Solution.

Django is an efficient, versatile and dynamically evolving web application development framework. Nowadays Django is becoming more powerful in designing web applications.

Running a local server of Django is not a recommended way in production because it’s just a test server not a production ready server. So to run Django in production is to run with Gunicorn and use Nginx as a reverse proxy so it gives more security to our application.

Request flow of Django with Gunicorn and Nginx as a reverse proxy.
Request flow of Django with Gunicorn and Nginx as a reverse proxy.
Request Flow

In this blog post I will explain to you how you can run your Django application in the Production environment. So Let’s get started.

Prerequisites:

  1. Amazon Ubntu(16.04) EC2 instance…

Harshvijaythakkar

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store