<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nitin Kalburgi</title>
    <description>The latest articles on DEV Community by Nitin Kalburgi (@nitinkalburgi).</description>
    <link>https://dev.to/nitinkalburgi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F989629%2Fcf00a3d5-30ac-4f40-9212-f994bd1f5e6f.png</url>
      <title>DEV Community: Nitin Kalburgi</title>
      <link>https://dev.to/nitinkalburgi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nitinkalburgi"/>
    <language>en</language>
    <item>
      <title>Blue/Green Deployment with Load Balancer and Auto-scaling in AWS</title>
      <dc:creator>Nitin Kalburgi</dc:creator>
      <pubDate>Fri, 27 Jan 2023 06:21:31 +0000</pubDate>
      <link>https://dev.to/nitinkalburgi/bluegreen-deployment-with-load-balancer-and-auto-scaling-in-aws-52o5</link>
      <guid>https://dev.to/nitinkalburgi/bluegreen-deployment-with-load-balancer-and-auto-scaling-in-aws-52o5</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is Blue/Green Deployment?&lt;/strong&gt;&lt;br&gt;
A blue/green deployment is a deployment strategy in which we create two separate, but identical environments. One environment (blue) is running the application version which is live and currently serving the production environment. One environment (green) is running the new application version with new changes. Using a blue/green deployment strategy increases application availability and reduces deployment risk by simplifying the rollback process if a deployment fails, also ensuring zero downtime for our release. Once testing has been completed on the green environment, live application traffic is directed to the green environment and the blue environment is deprecated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Terminologies:&lt;/strong&gt;&lt;br&gt;
Green Nodes - The EC2 Instances which are currently serving the live production environment.&lt;br&gt;
Blue Nodes  - The EC2 Instances with the new changes which has to be released in production.&lt;br&gt;
Blue Load Balancer - The load balancer serving the live production environment.&lt;br&gt;
Green Load Balancer - The load balancer which will be used for Green environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Infrastructure required:&lt;/strong&gt;&lt;br&gt;
We need to create a new "Green Load Balancer" and a new target group "Target Group - 2" and attach it to "Green Load Balancer" which forwards the traffic with traffic weight 100%. Also create a new target group "Green Target Group" which we'll be using later.&lt;br&gt;
The current live production environment will have a "Blue Load Balancer" which has a rule that forwards traffic to a target group "Target-Group-1" with traffic weight 100%.&lt;br&gt;
Attach target group "Target-Group-2" to "Blue Load Balancer" with traffic weight 0%. So, the current running environment won't be affected.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl1smveag6o42xoq9yn5l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl1smveag6o42xoq9yn5l.png" alt="Image description" width="686" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Deployment Steps:&lt;br&gt;
Step-1: Green Deployment&lt;/p&gt;

&lt;p&gt;As part of Green Deployment Job we are detaching the target group which is attached to "Green Load Balancer" auto-scaling group .i.e. "Target Group-2 and we'll attach the "Green target group" which we have created earlier. Later we'll deploy the new version of application in this for green testing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyl5rdx2m9ks9phr993u3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyl5rdx2m9ks9phr993u3.png" alt="Image description" width="404" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step-2: Blue Deployment&lt;/p&gt;

&lt;p&gt;As part of Blue Deployment Job we again deploy the new version of application to "Target Group-2" and switch the weight to send all traffic from this. Detach the "Green target group" from green auto scaling group and attach the one which is at 0% in Blue .i.e. "Target Group-1".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fldwgij73h3zgj3y1t2s0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fldwgij73h3zgj3y1t2s0.png" alt="Image description" width="600" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step-3: Reduce old blue Instances&lt;/p&gt;

&lt;p&gt;The last step after the testing in new version would be reduce the old version instances capacity from old "Blue Auto Scaling Group" and bring it to zero.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9qmdkj1tl8tjk1w1wgc9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9qmdkj1tl8tjk1w1wgc9.png" alt="Image description" width="585" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Blue/Green Deployment is completed.&lt;/p&gt;

</description>
      <category>gratitude</category>
      <category>writing</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>How to Spin an EC2 Instance in AWS?</title>
      <dc:creator>Nitin Kalburgi</dc:creator>
      <pubDate>Sat, 07 Jan 2023 13:32:34 +0000</pubDate>
      <link>https://dev.to/nitinkalburgi/how-to-spin-an-ec2-instance-in-aws-4n1k</link>
      <guid>https://dev.to/nitinkalburgi/how-to-spin-an-ec2-instance-in-aws-4n1k</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is EC2 Instance?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ever wondered how you can create and maintain your own Virtual Machines in just few clicks? EC2 Instances come for your rescue. In this we are going to learn how to spin an EC2 Instance in AWS. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS account - If you don't have one make sure you get one 
            created before proceeding further.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step - 1&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Login to your console [&lt;a href="https://aws.amazon.com/console/" rel="noopener noreferrer"&gt;https://aws.amazon.com/console/&lt;/a&gt;] &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Search for the service "EC2" you'll land on the following page.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F82n4nstr9nu7rinh69dp.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F82n4nstr9nu7rinh69dp.jpeg" alt="Image description" width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see currently there are no instances running. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate in Instances tab from dashboard and click on Launch 
Instance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4c5aof1if41a4ksz6ic3.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4c5aof1if41a4ksz6ic3.jpeg" alt="Image description" width="800" height="177"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You'll end up on the below page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvc9slvpqrdxuagremrnc.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvc9slvpqrdxuagremrnc.jpeg" alt="Image description" width="523" height="648"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enter the instance name i.e MyFirstInstance and select the storage and launch type. For this tutorial I would be using t2.mirco and Amazon Linux machine as an launch template. (So I won't incur any costs)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step - 2&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We need to create a new key pair.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd5ecrqpwbdtr6h2d0w8n.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd5ecrqpwbdtr6h2d0w8n.jpeg" alt="Image description" width="763" height="807"&gt;&lt;/a&gt;&lt;br&gt;
Make sure you don't loose you .pem or .ppk file as that would be used to ssh into your instance.(We can also use Instance connect which is way easier)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step -  3&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For networking we'll be creating new security group which allows to ssh from anywhere i.e 0.0.0.0/0&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhwjiij42n33cni9uuumv.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhwjiij42n33cni9uuumv.jpeg" alt="Image description" width="800" height="565"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Leaving the rest of the settings as default. Click on the launch Instance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw8sdt6l861l282xx2q27.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw8sdt6l861l282xx2q27.jpeg" alt="Image description" width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_Viola! You have successfully launched an EC2 Instance.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
