<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sneha Somwanshi on Medium]]></title>
        <description><![CDATA[Stories by Sneha Somwanshi on Medium]]></description>
        <link>https://medium.com/@sneha?source=rss-420a154a23b4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*iCVsXaf4Nb1De6ocjyWudg.jpeg</url>
            <title>Stories by Sneha Somwanshi on Medium</title>
            <link>https://medium.com/@sneha?source=rss-420a154a23b4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 16:59:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sneha/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Trek to Triund]]></title>
            <link>https://medium.com/sneha-s-travel-diary/trek-to-triund-cd02397f77c9?source=rss-420a154a23b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd02397f77c9</guid>
            <category><![CDATA[himalayas]]></category>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[triund]]></category>
            <dc:creator><![CDATA[Sneha Somwanshi]]></dc:creator>
            <pubDate>Fri, 04 Dec 2015 15:51:19 GMT</pubDate>
            <atom:updated>2016-01-06T07:26:46.391Z</atom:updated>
            <content:encoded><![CDATA[<p>In May 2015, I visited McLeodGanj and stayed at hotel Greenwood Inn (recommended). My hotel receptionist suggested that Triund provides the best view of the Dhauladhar mountains. He confidently called out the trek as an easy one. Thanks to him, he encouraged me and my husband to trek to Triund. It was not an easy one though.</p><p>This is what Triund looked like from my hotel Terrace. Triund is located somewhere near the dark green hump you see in this picture, below the snow capped mountain peaks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aTWZGLUz66JAxGtgpiM6ng.jpeg" /><figcaption>Triund from Hotel Greenwood, McLeodGanj</figcaption></figure><p>We left hotel at 8am and walked to Dharamkot Chowk. The road was quiet, green and full of small rocks. At Dharamkot, we took a shortcut behind the transformer. We walked through a pine forest for an hour and reached Golu devi mata mandir. Most tourists drive till this point and then start the climb. You will find the small tea/cold-drink huts every few kms. As the altitude increased, we took more breaks. Gatorade helped us keep our pace. The last 2 kms were the most difficult and it took us 2 hours to climb the last stretch.</p><p>On the way, we met shepherds. They travel up after February with sheep. In later half of the summer, they even go further by crossing Triund. In summer, shepherds stay in open with their sheep. As we progressed,the terrain changed. We were walking over sedimentary rocks around a large valley full of pine trees.</p><p>After walking for 5 hours, we finally reached our destination. After a turn, suddenly snow capped mountains appeared in front of us. Here is that picturesque view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pZDHigdN_7T8DON9tbfZFg.jpeg" /><figcaption>Spectacular Dhauladhar Mountains seen from Triund</figcaption></figure><p>There were already 30–40 people roaming around. The natives were selling maggie and tea. One could rent the tents for 700INR and stay overnight, but the place was noisy. A large group was playing loud music hence we decide to get back. The view is totally worth the difficult climb. We reached back hotel at 8pm. We trekked total of 18km. If you are visiting Dharamshala, don’t miss Triund.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd02397f77c9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sneha-s-travel-diary/trek-to-triund-cd02397f77c9">Trek to Triund</a> was originally published in <a href="https://medium.com/sneha-s-travel-diary">Sneha’s travel diary</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blue Green Deployments in data center]]></title>
            <link>https://medium.com/devops-learnings/blue-green-deployments-in-data-center-e704f93f9f70?source=rss-420a154a23b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/e704f93f9f70</guid>
            <dc:creator><![CDATA[Sneha Somwanshi]]></dc:creator>
            <pubDate>Mon, 29 Dec 2014 09:58:39 GMT</pubDate>
            <atom:updated>2014-12-29T09:59:37.822Z</atom:updated>
            <content:encoded><![CDATA[<h2>Blue Green Deployments in datacenter</h2><p>At <a href="https://my.thoughtworks.com/community/clients/sony_electronics">a</a> client, one of the major challenge with production deployments was to have zero downtime. In such case blue-green deployment model worked out to be the best option.</p><h3><strong>How it Works?</strong></h3><p>In blue-green model, two identical application stacks are maintained (for convenience, I will refer to our application server instances and service instances as a stack, database deployments are done separately . One of the stack is always live, let us say green is live and blue is standby. When we want to deploy a new build to production, we deploy it on blue stack and do thorough testing. Once new build seems to work fine, the blue stack goes live and green becomes standby. This helps us do a quick rollback if issues are identified during deployment or sanity check.</p><h3><strong>What are the challenges ?</strong></h3><ol><li>The tricky bit here is to switch between blue and green stacks with almost no downtime.</li><li>An overhead here is to maintain two stacks and hence adds to the cost.</li></ol><p><strong>Well, obviously we overcame it !</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*A0aZ8gvZg84ZkkX32pqjDg.png" /></figure><p>To solve the cost issue, instead of having one stack always in standby mode, we divide our production infrastructure among two stacks and keep both stacks live. This is done by creating two Chef environments — production_blue &amp; production_green, as shown above. During deployment, we detach the blue stack from the live ELB and attach it to standby elb. Then deploy the new artifact to it. Once the sanity testing is done, then the blue stack is made live. Now we repeat steps for the other stack.</p><p>Next, is to achieve zero downtime. AWS takes a few seconds to serve requests from an instance after we attach it. Our infrastructure is currently hosted in AWS but it is supposed to be datacentre ready, where we can’t reliably predict the time needed for DNS entries to propagate. To work-around this we relied on health checks: we implemented two health check HTTP endpoints for app — GET /live and GET /standby. Live ELB polls /live and Standby ELB polls /standby. On an app instance, only one health-check will return 200 OK, which we refer to as enabled, and the other will return 500. This can be controlled by using the HTTP endpoint: POST /enable/(live|standby). In the normal state, blue and green stacks are attached to the Live ELB and poll /live.</p><p>Say, we want to deploy the new artifact on the blue stack:</p><ul><li>We start by enabling /standby end-point on all the instances of the blue stack</li><li>This causes the Live ELB to remove the blue instances from service and ensures that the no new requests are sent to these instances but the old requests are served without any failure</li><li>We detach blue stack instances and attach them to the Standby ELB once the old requests are served and traffic reduces to zero</li><li>The new artifact is shipped to blue stack instances</li><li>After the deployment, the /live endpoint is enabled and they are re-attached to Live ELB</li><li>The same process is repeated for the green stack.</li></ul><h3>This helped us achieve practically zero downtime !</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e704f93f9f70" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devops-learnings/blue-green-deployments-in-data-center-e704f93f9f70">Blue Green Deployments in data center</a> was originally published in <a href="https://medium.com/devops-learnings">DevOps Learnings</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Choosing the right tool to provision AWS Infrastructure]]></title>
            <link>https://medium.com/devops-learnings/choosing-the-right-tool-to-provision-aws-infrastructure-b0a9bd460e21?source=rss-420a154a23b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0a9bd460e21</guid>
            <dc:creator><![CDATA[Sneha Somwanshi]]></dc:creator>
            <pubDate>Mon, 22 Dec 2014 08:25:25 GMT</pubDate>
            <atom:updated>2015-03-12T10:19:35.570Z</atom:updated>
            <content:encoded><![CDATA[<p>This article might help you choose the right provisioning tool if you are looking to migrate or build complex infrastructure on AWS.</p><p>We were faced with a task of migrating over 300 servers from the client’s data center to AWS. It required building 7 similar environments, with subtle differences. We were a team composed of DevOps consultants, and one seasoned operations engineer. We wanted to migrate as soon as possible, to free up resources in the client’s data center and bring down costs. Thankfully, Configuration management using Chef was in place, which made the task less daunting.</p><h2>What we were looking for?</h2><p>We required a tool which met the following criteria:</p><ol><li>Ability to provision AWS VPC resources</li><li>Modularity: To begin with, we wanted to automate provisioning of one environment and reuse it to build other environments.</li></ol><p>We narrowed our search down to: CloudFormation and Terraform.</p><p>Both are template driven tools and help developers maintain Infrastructure as Code. The idea is to treat infrastructure code same as the software code.</p><p>CloudFormation is provided by AWS. It can provision almost every service/resource provided by AWS. On the other hand, Terraform is an open source tool and is drawing attention within the DevOps community. It is a tool created by HashiCorp — creators of widely used tools like Vagrant, packer, consul.</p><p>CloudFormation and Terraform both can make incremental changes to infrastructure.</p><h2>Comparison between CloudFormation and Terraform</h2><h3>1. Describing resources</h3><p>Terraform allows a developer to describe resources using a friendly DSL written in<a href="https://github.com/hashicorp/hcl">hashicorp HCL</a>, which is internally parsed by GO. It enables us to write modules which can be reused to build duplicate environments. Terraform’s DSL leaves only one thing to be desired: it is not possible to use Go’s language features to write succinct code.</p><p>On the other hand, CloudFormation templates are JSON documents, which are verbose and can be complex for developers to understand. We are forced to duplicate the template for each environment. As infrastructure grows, this bunch of JSON documents can get difficult to manage. cfn-dsl, provides a ruby DSL around CloudFormation, but it is very basic.</p><p>Terraform snippet</p><pre>resource &quot;aws_instance&quot; &quot;nat&quot; {<br>    ami = &quot;${var.aws_nat_ami}&quot;<br>    availability_zone = &quot;us-east-1b&quot;<br>    instance_type = &quot;m1.small&quot;<br>    key_name = &quot;${var.aws_key_name}&quot;<br>    security_groups = [&quot;${aws_security_group.nat.id}&quot;]<br>    subnet_id = &quot;${aws_subnet.us-east-1b-public.id}&quot;<br>    associate_public_ip_address = true<br>    source_dest_check = false<br>}<br> <br>resource &quot;aws_subnet&quot; &quot;us-east-1b-public&quot; {<br>    vpc_id = &quot;${aws_vpc.nat-vpc.id}&quot;<br>    cidr_block = &quot;10.0.0.0/24&quot;<br>    availability_zone = &quot;us-east-1b&quot;<br>}</pre><p>CloudFormation snippet</p><pre>&quot;usEast1bPublic&quot;: {<br>    &quot;Type&quot;: &quot;AWS::EC2::Subnet&quot;,<br>    &quot;Properties&quot;: {<br>        &quot;VpcId&quot;: {<br>            &quot;Ref&quot;: &quot;VPC&quot;<br>        },<br>        &quot;CidrBlock&quot;: &quot;10.0.0.0/24&quot;,<br>        &quot;AvailabilityZone&quot;: &quot;us-east-1b&quot;<br>    }<br>},</pre><pre>&quot;Nat&quot;: {<br>    &quot;Type&quot;: &quot;AWS::EC2::Instance&quot;,<br>    &quot;Properties&quot; : {<br>      &quot;AvailabilityZone&quot;: &quot;us-east-1b&quot;,<br>      &quot;DisableApiTermination&quot;: &quot;FALSE&quot;,<br>      &quot;ImageId&quot;: &quot;ami-2e1bc047&quot;,<br>      &quot;InstanceType&quot;: &quot;m1.small&quot;,<br>      &quot;SubnetId&quot;: {<br>            &quot;Ref&quot;: &quot;usEast1bPublic&quot;<br>        },<br>      &quot;KeyName&quot;: &quot;gwt_gdc_to_aws_migration&quot;,<br>      &quot;Monitoring&quot;: &quot;false&quot;<br>    }<br>}</pre><h3>2. Visibility of changes to be applied</h3><p>Most provisioning tools, including CloudFormation, execute changes directly to infrastructure. Infrastructure developers have to work-out the effects of a change, which becomes intractable in a large infrastructure.</p><p>Terraform helps here by doing infrastructure changes in two phases: planning and execution. In the planning phase, Terraform draws an action plan. The plan includes all actions to be taken: what resources will be created, destroyed or modified. At this point, the developer can choose to review and then apply changes. Next, in the execution phase, it applies changes to infrastructure. Separate planning and execution phases provides visibility and control on infrastructure changes.</p><h3>3. Handling failure</h3><p>When provisioning fails, both tools react differently. CloudFormation provides an option to rollback the entire execution, or fix deviations manually. In rare cases, the stack can go into a frozen state and can not be recovered, without help from Amazon support center.</p><p>On the other hand, Terraform marks the resource as “tainted” and in the next execution, it will remove the tainted resources and will attempt to re-provision them.</p><p>I prefer Terraform’s way of handling failure, because it does not re-build successfully provisioned resources and only focusses on tainted resources.</p><h3>4. Support for AWS Resources</h3><p>CloudFormation can provision almost all services provided by AWS like VPC, Auto Scaling groups, Amazon CloudWatch, AWS Elastic Beanstalk applications, AWS OpsWorks etc.</p><p>Terraform supports most of the building blocks required for setting up AWS VPC. But it lacked few building blocks, which slowed us down. For example, when we started using it, it did not support CRUD operations for network acts, virtual private gateway. The cross zone load-balancing and disk encryption was not supported. We managed to work around this, by contributing to Terraform. We also used cloudFormation for setting up virtual private gateway, since it was one time activity.</p><p>This may be a crucial deciding factor for you, while considering project timelines.</p><h3>5. Community involvement</h3><p>CloudFormation is maintained by AWS and is closed for changes proposed by public.</p><p>On the other hand, I could contribute to Terraform for provisioning AWS resources like network ACL, toggle cross-zone load balancing and instance tenancy selection. Though Terraform is at a nascent stage, its maintainers are open to Pull Requests and they actively provide feedback and merge those.</p><h3>6. State management</h3><p>At the core of Terraform lies its state management. On every infrastructure update, it records the state of resources locally or remotely in a JSON file. It does not retrieve the current state of infrastructure from cloud provider, instead it refers to the local state.</p><p>If multiple developers are working on the same environment, they are forced to share the same state file. If there is no state file, Terraform will duplicate resources for you. We worked-around this problem by keeping a centralised single copy of state file.</p><p>Terraform does not reverse sync the state of real infrastructure. If developers make manual changes to infrastructure, they will go unnoticed. We worked around this problem, by strictly prohibiting manual changes to environments.</p><p>CloudFormation on other hand does not store any state. Multiple developers can work on an environment without any conflicts.</p><h3>7. Cloud agnostic</h3><p>Cloud Formation is an AWS product. If you want to spread your infrastructure across different cloud vendors, CloudFormation is restrictive.</p><p>On another engagement, we partnered with a client to build a template driven open-source tool for the vcloud platform. We could not reuse it for other cloud providers so knew that it can be limiting. Terraform has addressed this by not having a vendor lock-in. Terraform configuration can be used across cloud providers.</p><h3>8. Stability</h3><p>Terraform’s latest release is 0.3.6. It is not a mature and stable tool yet, however it is gradually moving in that direction. CloudFormation on other hand, is stable and is tried and tested.</p><h2>Our choice</h2><p>We selected Terraform over CloudFormation, primarily because it enabled us to write reusable scripts and it gave us better visibility on infrastructure updates. Though it is early to predict its future, we like the vision of Terraform. Of course, they have a long way to go to become a stable product. It is definitely a tool which will change the way we manage infrastructure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0a9bd460e21" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devops-learnings/choosing-the-right-tool-to-provision-aws-infrastructure-b0a9bd460e21">Choosing the right tool to provision AWS Infrastructure</a> was originally published in <a href="https://medium.com/devops-learnings">DevOps Learnings</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>