<?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[Continuous Deployment - Medium]]></title>
        <description><![CDATA[Continuous Deployment and DevOps - Medium]]></description>
        <link>https://medium.com/continuous-deployment?source=rss----20e2b0fc5cff---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Continuous Deployment - Medium</title>
            <link>https://medium.com/continuous-deployment?source=rss----20e2b0fc5cff---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 12:24:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/continuous-deployment" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Going Serverless with Snap CI, Amazon API Gateway, Lambda, and Swagger]]></title>
            <link>https://medium.com/continuous-deployment/going-serverless-with-snap-ci-amazon-api-gateway-lambda-and-swagger-4fa5fc556b85?source=rss----20e2b0fc5cff---4</link>
            <guid isPermaLink="false">https://medium.com/p/4fa5fc556b85</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[continuous-deployment]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Snap CI]]></dc:creator>
            <pubDate>Tue, 19 Jul 2016 18:38:05 GMT</pubDate>
            <atom:updated>2016-07-19T18:38:05.071Z</atom:updated>
            <content:encoded><![CDATA[<p>Posted by <a href="https://blog.snap-ci.com/authors/suzie-prince/">Suzie Prince</a></p><p>We talk to <a href="https://snap-ci.com/">Snap CI</a> user Richard Coombes from <a href="http://thetab.com/">The Tab</a> about their use of serverless architecture. As we <a href="https://blog.snap-ci.com/blog/2016/05/03/serverless-architecture-burst-traffic-applauze/">have heard</a> from other Snap users at Applauze, serverless technologies support fast moving organisations by facilitating their ability to scale quickly. The lower costs of trying out new ideas is a big reason why going serverless makes sense for quick-moving organizations like The Tab who need to deploy quickly and easily. Hear from Richard as he tells us more.</p><h4>What can you tell us about The Tab and what you are working on?</h4><p>The Tab is a platform for young journalists to report and write, professionally and independently. It was founded at Cambridge University in 2009.</p><p>Our core site is in WordPress. That’s our business critical thing. But then, the real magic that we do is around the outside of that. As an example, we have a Facebook <a href="https://www.messenger.com/t/TheTabOfficial">messenger bot called Tabitha</a> that keeps authors updated with how their stories are performing, and tells readers when stories are breaking. As another example, we have an onboarding site that gets new authors to sign up. We’ve also got a native app which gets a lot of push notifications.</p><p>So these parts around the main site are what the tech team here is really working on and we’re trying out unknown things quite a lot of the time. Specifically in the online publishing space. It’s a fairly new place to be. Some of the ideas that we come up with are great, and others don’t work out so well, so we build a lot of data and analytics and we see how things do. I’d say with a decent chunk of stuff we develop we then pivot the functionality once we learn how our authors use it. Or we learn something from it and turn it into something else.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RBN5q-b-hDAcHaH_.png" /></figure><h4>Can you tell us what particularly got you interested in serverless architecture? What are you trying out right now?</h4><p>It’s a bunch of reasons. Firstly, we’re effectively a startup and we don’t really have an infrastructure engineer, or anyone looking after servers. So whatever we build, one of the devs is going to have to monitor and keep up to date. If a server goes down, one of us is going to get a call and it might be on the weekend or outside of work hours.</p><p>Secondly, another big thing for us is there’s no real overhead, so we can try things out pretty quickly. We’re not fine-tuning installs of operating systems or other things. It means we can build things quickly. As a startup, building things means that they might not be successful, we might throw it away and move on to something else. We’re not really trying to eke out the last bit of power out of a piece of infrastructure.</p><p>The last thing is that there’s no commitment in terms of ongoing costs and it removes that whole need to really plan what servers you’re going to have, and then the difficult decisions about who gets access to what, etc. With serverless through the cloud, it’s such a low cost that we can try things out. If they don’t work, it’s fine. If they do work, potentially we can go back at a later date, and change the settings. But there’s no kind of upfront planning needed, it’s kind of try things and get on with building them and leave the other stuff to someone else who’s going to do it better than anyone here at our set-up, because we’re not network engineers or anything like that.</p><h4>Tell us a little bit more about the architecture you have.</h4><p>We have a WordPress core platform and then we’ve built what’s effectively a data warehouse. We have a bunch of micro-services, some of which are in Lambda, and some of which are Beanstalk workers. They suck in data from various places-so they ingest stuff like Facebook Insights data, and some of the core WordPress content such as the stories and the users.</p><p>The concept is that the API is our main place you go to to get data that’s not in the core platform. We call it <a href="https://en.wikipedia.org/wiki/Skynet_(Terminator)">“Skynet”</a> because we’re nerds, but it’s where we produce what we call “meaningful insights”. So we’ve wrapped that database in an API (using API Gateway), and various services connect to that API. For example, our native iOS app uses the feed from there. We apply some trending data to it so that whenever someone comes to the native app, they always get something new to look at it. It’s going on Google realtime viewing data.</p><p>It’s also used for the actual main Tab site. If you log in as an author, when you look at your stories on the main site, you’ll see the number of people looking at them right now, page views and how you rank against other members of your university or college.</p><h4>What tools are you using? And how well do they work for you?</h4><p>We’re using Amazon’s API Gateway and Lambda quite extensively. The database we’re using with the API is an RDS MySQL instance.</p><p>It’s definitely a mixed picture with API Gateway. My impression is that API Gateway does very much feel like a V1, perhaps a V0.5 product. The UI on the Amazon side is really horrible, like to the point where none of the API methods are even sorted alphabetically. It’s probably the worst of the AWS user interfaces to work with, so that’s why we’re so keen to try and automate as much of it as possible.</p><p>I don’t think the concept of stages for deployment works very well in API Gateway because you can develop something, select where you want to deploy it to, but you can never see the multiple versions that exist. It just kind of feels tacked on and, again, it’s all done through the UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EUfP5tXVkKw6NA_M.png" /></figure><p>It’s been a bit of a learning curve to get <a href="http://swagger.io/">Swagger</a> working and then use Snap CI to push… We actually just have separate API Gateway instances. But using Snap CI and using Swagger, we’ve kind of massaged it enough that it works pretty well.</p><p>I’d say the only issue we really face is that when there are errors in deployment, the Amazon-side logs are not massively verbose. But as a development process, we knock out API methods really quickly now and they’re super-reliable and they scale. Because we’re publishing stories, there are times when traffic jumps up quite a lot. In those situations, it’s a huge advantage to us that the API Gateway has all the caching built in and we never see any of the server stuff. I think that itself makes the growing pains-dealing with Amazon’s slightly clunky documentation-worth it.</p><h4>How do you keep your code clean when using this many services?</h4><p>We were using a large number of Lambda functions but then we realized that packaging and deploying them-especially when we had dev and test versions, and multiple environments-resulted in exponential complexity. So we combined them and brought them all into one codebase: so there is only one named Lambda function we’re pushing to. We have an index.js that then has multiple routes depending on an input parameter to package all the functions needed by the API.</p><p>For notifications, we’ve piped all our Lambda notifications into CloudWatch, and now we use that to alert us in PagerDuty if anything critical happens. Otherwise, it would be hard for us to keep track of what’s actually coming through just because the sheer verbosity of Lambda.</p><p>We still had some challenges trying to get that codebase properly unit tested. We found a node library called aws-lambda-mock-context, a <a href="https://github.com/SamVerschueren/aws-lambda-mock-context">mock context library</a>, in which the code can get a bit verbose, but it works, so we can actually test those Lambda functions as if they were running on Lambda. It was initially quite hard to develop and test without coding things manually, but we’ve kind of squared that off as well.</p><h4>What is your testing story? What is your local development story?</h4><p>You can test a lot of the Lambda stuff using the mock context library and Mocha, these get triggered on build and we try to take a test-driven approach to development. A lot of the interesting work happens in the functions, so most of the logic and things like that can actually be tested over there. In addition, we deploy frequently so the deltas that get deployed are not significant each time. Due to that, even if something does go wrong, we’ll know exactly where it did go wrong because there’s not too much that changes between different versions. We have some Runscope tests that run when a deployment happens so we know if it deployed successfully.</p><h4>In a <a href="https://medium.com/@coomberc/building-a-testable-continuously-deployed-api-using-amazon-api-gateway-3654addd5a0e#.9n1cav9jn">previous post</a> about this process, you said “But you can quite quickly get stuck in an untestable and hard-to-deploy mess.” Why?</h4><p>If you didn’t use any tooling, you didn’t use anything like Snap CI or any of the unit tests, it would be pretty easy to get stuck. If you were making changes to the API Gateway just using the clunky UI and… It’s probably true of all development but it felt particularly bad here because you have code in places that you don’t even know it’s there. I think getting a deployment process in place for stuff like API Gateway and Lambda is probably even more critical than most places where you can zip up a project-and with lots of small serverless microservices you can’t just hop on a server and see what’s running.</p><p><em>Special thanks to Richard Coombes from The Tab for speaking with us. You can read his related piece,</em><a href="https://medium.com/@coomberc/building-a-testable-continuously-deployed-api-using-amazon-api-gateway-3654addd5a0e#.9n1cav9jn"><em>“Building a testable/continuously deployed API using Amazon API Gateway,”</em></a><em> on Medium.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fa5fc556b85" width="1" height="1" alt=""><hr><p><a href="https://medium.com/continuous-deployment/going-serverless-with-snap-ci-amazon-api-gateway-lambda-and-swagger-4fa5fc556b85">Going Serverless with Snap CI, Amazon API Gateway, Lambda, and Swagger</a> was originally published in <a href="https://medium.com/continuous-deployment">Continuous Deployment</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 Key Deployment Pipeline Patterns]]></title>
            <link>https://medium.com/continuous-deployment/3-key-deployment-pipeline-patterns-3ca75475ecc5?source=rss----20e2b0fc5cff---4</link>
            <guid isPermaLink="false">https://medium.com/p/3ca75475ecc5</guid>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Snap CI]]></dc:creator>
            <pubDate>Tue, 26 Jan 2016 18:28:03 GMT</pubDate>
            <atom:updated>2016-01-26T18:28:03.426Z</atom:updated>
            <content:encoded><![CDATA[<p>Posted by <a href="https://blog.snap-ci.com/authors/ken-mugrage/">Ken Mugrage</a></p><p>25 January 2016</p><p>Teams have been automating the build, test and deploy processes of their software for many years, but usually in a very specific “one off” manner. This piece walks through 3 key patterns, among many, to setting up a successful deployment pipeline.</p><h3>Build Things Once</h3><p>When you’re taking software from initial code change to production in an automated fashion, it’s important that you deploy the exact same thing you’ve tested.</p><p>Once you’ve built a binary, you should upload that back to your CD server or artifact repository for later use.</p><p>When you’re ready to deploy to a downstream system, you should fetch and install that build artifact. This way you make sure that you’re running your functional tests on the exact thing you built and that you’re going to deploy.</p><h3>Verify on a Production-Like Environment</h3><p>Ideally you should be staging and testing on the same set up. If your staging and production environments are exactly the same, you can use them interchangeably in a blue/green deployment pattern. It’s hard to imagine a better way to be sure your software will work when you turn users loose on it.</p><p>If you’re deploying to very large environments where it’s just not practical to have an exact duplicate, you should still duplicate the technology. In other words, if your web application runs on a cluster of 1,000 machines in production, you should verify that application on a cluster, even if it’s only two machines.</p><p>One of the reasons people are so excited about advancements in container technology is the help they provide for this.</p><h3>Non-Linear Workflows</h3><p>It’s not uncommon for teams to practice Continuous Integration on small parts of code before “throwing it over the wall” to someone else to put together with other parts of the application. In these cases, it’s usually OK to set up a linear flow. The entire thing might run end to end in just a few minutes.</p><p>Don’t feel like you need to emulate the often seen business diagram of pipelines that show unit-test, then functional tests, then security tests etc. The purpose of those diagrams is to show intent, not implementation. If you’re able, run as much as possible at the same time for faster feedback.</p><p><em>This article originally appeared in the DZone Continuous Delivery Guide. You can download the guide for free </em><a href="https://dzone.com/guides/continuous-delivery-3"><em>here</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ca75475ecc5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/continuous-deployment/3-key-deployment-pipeline-patterns-3ca75475ecc5">3 Key Deployment Pipeline Patterns</a> was originally published in <a href="https://medium.com/continuous-deployment">Continuous Deployment</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[eBook] CD Strategies — Techniques for Implementation]]></title>
            <link>https://medium.com/continuous-deployment/ebook-cd-strategies-techniques-for-implementation-175a3efa5ede?source=rss----20e2b0fc5cff---4</link>
            <guid isPermaLink="false">https://medium.com/p/175a3efa5ede</guid>
            <category><![CDATA[continuous-deployment]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[continuous-delivery]]></category>
            <dc:creator><![CDATA[Snap CI]]></dc:creator>
            <pubDate>Mon, 07 Dec 2015 20:42:25 GMT</pubDate>
            <atom:updated>2015-12-07T20:42:25.026Z</atom:updated>
            <content:encoded><![CDATA[<p>Our popular CD Strategies blog posts are now compiled for you to <a href="http://www.slideshare.net/ThoughtWorks/continuous-deployment-strategies">download</a> as a free eBook. Learn about things like Canary and Blue/Green Releases and how to implement them.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.slideshare.net%2Fslideshow%2Fembed_code%2Fkey%2FcWM0p99rZMWJsJ&amp;url=http%3A%2F%2Fwww.slideshare.net%2FThoughtWorks%2Fcontinuous-deployment-strategies&amp;image=http%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fsnapebookcdstrategies2015-151204003027-lva1-app6892-thumbnail-4.jpg%3Fcb%3D1449260682&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=slideshare" width="425" height="355" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b403c9c5173134695afcef057fa480b/href">https://medium.com/media/7b403c9c5173134695afcef057fa480b/href</a></iframe><p><em>The series was originally featured on Snap CI’s </em><a href="https://blog.snap-ci.com/"><em>The Pipeline blog</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=175a3efa5ede" width="1" height="1" alt=""><hr><p><a href="https://medium.com/continuous-deployment/ebook-cd-strategies-techniques-for-implementation-175a3efa5ede">[eBook] CD Strategies — Techniques for Implementation</a> was originally published in <a href="https://medium.com/continuous-deployment">Continuous Deployment</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Who’s got long pipelines?]]></title>
            <link>https://medium.com/continuous-deployment/who-s-got-long-pipelines-12375e99e1a?source=rss----20e2b0fc5cff---4</link>
            <guid isPermaLink="false">https://medium.com/p/12375e99e1a</guid>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[deployment-pipelines]]></category>
            <dc:creator><![CDATA[Snap CI]]></dc:creator>
            <pubDate>Mon, 09 Nov 2015 22:58:38 GMT</pubDate>
            <atom:updated>2015-11-09T22:58:38.130Z</atom:updated>
            <content:encoded><![CDATA[<p>Ever since Snap CI was created in 2013, it has always had deployment pipelines at the core. From the beginning, one of the challenges has been to inform users on the concept of the pipeline itself, which is <a href="http://martinfowler.com/bliki/DeploymentPipeline.html">central to Continuous Delivery</a> and continues to be a <a href="https://blog.snap-ci.com/blog/2014/07/22/why-snapci-and-travisci-are-not-the-same-thing/">unique aspect of Snap</a> in the hosted CI/CD space.</p><p>Custom <a href="https://blog.snap-ci.com/blog/2015/07/23/multi-stage-builds/">multi stage pipelines</a> in Snap afford a lot of flexibility to model your application delivery workflow and can support best practices like <a href="https://blog.snap-ci.com/blog/2015/10/06/enabling-trunk-based-development/">Trunk Based Development</a> effectively.</p><p>When Snap first came out, users were still warming up to the idea of custom stages and had two or three stages at most. However, we are now seeing an increase in the number of custom stages set up per build pipeline, and we couldn’t be more thrilled! Granular stages provide much better visibility into the deployment process, apart from many <a href="https://blog.snap-ci.com/blog/2015/07/23/multi-stage-builds/">other advantages</a>.</p><p>But one of the impacts of users setting up more stages per pipeline was that some users were getting the dreaded horizontal scrollbar when the number of stages exceeded a threshold dependent on screen width.</p><p>Last week, we rolled out a more responsive interface for our pipeline history page to get rid of the horizontal scrollbar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EOlsFq06E4cmJ541.png" /></figure><p>This is, of course, a tiny fix. We wanted to give better experiences to affected users even as we wrap up efforts on getting <a href="https://blog.snap-ci.com/categories/docker/">Docker</a> out in Beta and double our build worker capacity to keep up with recent user growth. Soon after all that is done, we will bring on more usability improvements including improvements on the current layout!</p><p>What do you think of our project pipeline UI? Feel free to send any suggestions or feature requests to <a href="/service/mailto:support@snap-ci.com">support@snap-ci.com</a>.</p><p><em>This article was originally published on </em><a href="http://snap.ci/1MkVuBS"><em>Snap CI’s The Pipeline Blog</em></a><em>. Written by </em><a href="https://blog.snap-ci.com/authors/vishal-naik/"><em>Vishal Naik</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12375e99e1a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/continuous-deployment/who-s-got-long-pipelines-12375e99e1a">Who’s got long pipelines?</a> was originally published in <a href="https://medium.com/continuous-deployment">Continuous Deployment</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementation Techniques for Canary Releases]]></title>
            <link>https://medium.com/continuous-deployment/implementation-techniques-for-canary-releases-c5ce6360d09e?source=rss----20e2b0fc5cff---4</link>
            <guid isPermaLink="false">https://medium.com/p/c5ce6360d09e</guid>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <dc:creator><![CDATA[Snap CI]]></dc:creator>
            <pubDate>Tue, 04 Aug 2015 20:43:15 GMT</pubDate>
            <atom:updated>2015-08-04T20:44:54.260Z</atom:updated>
            <content:encoded><![CDATA[<p>In the previous article on <a href="https://medium.com/continuous-deployment/continuous-deployment-strategies-32e2f7badd2">Continuous Deployment Strategies</a>, we explored at a high level some of the popular CD strategies.</p><p>This article describes some of the implementation techniques for performing Canary Releases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/0*751pBYe3uC49bk32.png" /></figure><p>Just like <a href="https://medium.com/continuous-deployment/blue-green-deployments-1572bcf5e79c">Blue/Green Deployments</a>, one would start by deploying the application to a small subset of your servers.</p><p>Once the subset of servers is deployed to, you may then route requests for a few users to the new set of servers.</p><p>This strategy lets you do a lot of interesting things:</p><ul><li>test the performance of the application</li><li>perform A/B tests based on demographics and user profiles, for example “users between the ages of 20–25 living in Iowa”</li><li>get feedback from a subset of beta testers or users from your company</li></ul><p>As your confidence in the deployment improves, you can deploy your application to more and more servers, and route more users to the new servers.</p><h3>Long running migration phase</h3><p>Because one or more versions of your application may be running in production for some period of time, your application and its components (webservices, microservices, database) needs to be backward-compatible so that it works with at least one or two previous versions of your application. This <a href="http://martinfowler.com/bliki/ParallelChange.html">Parallel-Change Pattern</a> is a simple and effective way to implement backward-incompatible changes between application interfaces.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5ce6360d09e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/continuous-deployment/implementation-techniques-for-canary-releases-c5ce6360d09e">Implementation Techniques for Canary Releases</a> was originally published in <a href="https://medium.com/continuous-deployment">Continuous Deployment</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]]></title>
            <link>https://medium.com/continuous-deployment/blue-green-deployments-1572bcf5e79c?source=rss----20e2b0fc5cff---4</link>
            <guid isPermaLink="false">https://medium.com/p/1572bcf5e79c</guid>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <dc:creator><![CDATA[Snap CI]]></dc:creator>
            <pubDate>Tue, 04 Aug 2015 20:41:24 GMT</pubDate>
            <atom:updated>2015-08-04T20:43:53.415Z</atom:updated>
            <content:encoded><![CDATA[<p>In the previous article on <a href="https://medium.com/continuous-deployment/continuous-deployment-strategies-32e2f7badd2">Continuous Deployment Strategies</a>, we explored at a high level some of the popular CD strategies.</p><p>This article describes some of the implementation techniques for performing blue/green deployments.</p><p>To recap — Blue/green is a technique for deployments where the existing running deployment is left in place. A new version of the application is installed in parallel with the existing version. When the new version is ready, cut over to the new version by changing the load balancer configuration.</p><p>The basic idea behind this technique is to be able to route users to either the green set of servers, or the blue set of servers.</p><p>This can be achieved in multiple ways:</p><ul><li>Changing the load balancer/router</li><li>Changing public DNS records</li><li>Load Balancer + Internal DNS records</li></ul><h3>Changing the load balancer/router</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FBpZY79qfrm8uVMt.png" /></figure><p>Using this technique you would change the load balancer or request router to point to either the blue server or the green server.</p><h3>Changing public DNS records</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*YckmgCXPhSh-G2OG.png" /></figure><p>Using this technique involves load-balancing at the DNS level by changing either the CNAME or the A records. When users request a DNS entry for your website, your DNS server could return the IP address for either the blue server or the green server. This particular approach would require that the time to live (TTL) is set to a very small value.</p><p>This particular approach is not recommended for changing public DNS records because some DNS servers run some browsers don’t respect the low TTL values on the DNS entry, they will cache the DNS records for longer than the TTL. This may leave a subset of your users not being able to access your website.</p><h3>Load Balancer + Internal DNS records</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/0*TmGw4w-i6O93iBSF.png" /></figure><p>This approach is a combination of the two techniques we’ve seen so far.</p><p>In this technique, instead of changing public DNS records, we’ll change internal (private) DNS records. Since the internal network and the DNS server can be managed and configured to respect TTLs, this approach works a lot better than changing public DNS records.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1572bcf5e79c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/continuous-deployment/blue-green-deployments-1572bcf5e79c">Blue/Green Deployments</a> was originally published in <a href="https://medium.com/continuous-deployment">Continuous Deployment</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Deployment Strategies]]></title>
            <link>https://medium.com/continuous-deployment/continuous-deployment-strategies-32e2f7badd2?source=rss----20e2b0fc5cff---4</link>
            <guid isPermaLink="false">https://medium.com/p/32e2f7badd2</guid>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[continuous-deployment]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <dc:creator><![CDATA[Snap CI]]></dc:creator>
            <pubDate>Tue, 04 Aug 2015 20:35:29 GMT</pubDate>
            <atom:updated>2015-08-04T20:35:35.463Z</atom:updated>
            <content:encoded><![CDATA[<p>Not very long ago, during the days of Perl/CGI and PHP (and even today); deployments involved ftp-ing your files to the webserver directory and running a bunch of migrations by shelling into the webserver.</p><p>Modern webapps and application servers have evolved quite a bit since then, but many developers continue to use similar strategies to perform deployments. FTP has been replaced by git pull followed by bundle install or npm install and then restarting the appserver that you use.</p><p>Along with similar deployment strategies, many developers also continue to use the same servers for months and years on end. But even with the right patches, updates, etc, after a while it’s easy to end up with a “snowflake server”: a server with a delicate, unique configuration that does not lend itself to change. A solution to this is the “phoenix server.” Here’s a little more about both these concepts.</p><h3><a href="http://martinfowler.com/bliki/SnowflakeServer.html">Snowflake servers</a></h3><p>While this approach may work great for small webapps, it quickly falls apart when you’re managing anything but a couple of servers.</p><p>It is generally difficult to set up a new server if your existing server has problems. If you’re looking to scale by adding more servers, it’s difficult to keep each server’s software, configuration and services in sync. You may not be in a position to replicate a production (or production-like) environment for testing.</p><p>Over time, one loses track of the magic configuration files, packages and services that are installed on the production machines.</p><h3><a href="http://martinfowler.com/bliki/PhoenixServer.html">Phoenix servers</a></h3><p>Some these issues can be addressed by using a bit of configuration management tools like <a href="https://www.chef.io/">chef</a>, <a href="https://puppetlabs.com/">puppet</a>, or <a href="http://www.ansible.com/home">ansible</a>among a few others.</p><p>These tools help avoid configuration drift, the sort of one-off changes that go unnoticed and undocumented.</p><p>An important point to note is that these tools only apply the configuration that they are asked to. If you applied any additional configuration outside of what these tools are aware of, or if you forgot to un-apply or remove some configuration, you’d be out of luck. This what <a href="https://github.com/ranjib">Ranjib Dey</a> calls the <a href="http://server.dzone.com/articles/infrastructure-tooling-anti">Accumulator Anti-Pattern</a>.</p><p>A much better alternative is to tear down servers periodically and apply configuration changes every once in a while. This helps avoid and catch any configuration drift outside of configuration management tools. Eventually one can move to deploying new servers on every configuration change. This strategy is known as an <a href="http://martinfowler.com/bliki/ImmutableServer.html">Immutable Server</a>.</p><h3>How does this apply to Continuous Deployment?</h3><p>Continuous Deployment requires that at a very minimum, you have: * a solid foundation of tests that gives you confidence in your software * a set of automation tools and scripts that give you confidence that your deployment will succeed, or rollback in case of issues</p><p>A few of the more popular continuous deployment strategies include blue/green deployments and canary releases, which I’ve briefly outlined below.</p><h3>Blue/green deployments</h3><p>This is one of the simplest CD strategies to implement and get started with.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eg0KdnCWv9ysnApg.png" /></figure><p>Blue/green is a technique for deployments where the existing running deployment is left in place. A new version of the application is installed in parallel with the existing version. When the new version is ready, cut over to the new version by changing the load balancer configuration.</p><p>This makes rollback really simple and gives time to make sure that the new version works as expected before putting it live.</p><h3>Canary releases</h3><p>This is named after the “canary in a coal mine” metaphor. The metaphor originates from the times when miners used to carry caged canaries into the mines with them: if there were any dangerous gases (methane or carbon monoxide) in the mine, the canary would die before the gas levels reached levels hazardous to humans.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/0*ql-oeyVmsqn3rWHr.png" /></figure><p>Canary releasing is similar to blue/green, although only a small amount of the servers are upgraded. Then, using a cookie or similar, a fraction of users are directed to the new version.</p><p>This allows for the load and functionality of the site to be tested with a small group of users. If the application behaves as expected, migrate more and more servers to the new version until all the users are on the new version.</p><p>This technique can also be used to do some interesting multi-variant testing and performance testing.</p><h3>Next steps</h3><p>In my next post, I’ll get into the implementation techniques of blue/green deployments. A subsequent post will talk about implementing canary releases. Hope you will find this series very useful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32e2f7badd2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/continuous-deployment/continuous-deployment-strategies-32e2f7badd2">Continuous Deployment Strategies</a> was originally published in <a href="https://medium.com/continuous-deployment">Continuous Deployment</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>