ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

What is blue green deployment?

2021-02-26 18:32:05  阅读:219  来源: 互联网

标签:blue What Kubernetes environment production green deployment


What is blue green deployment?

Blue green deployment is an application release model that gradually transfers user traffic from a previous version of an app or microservice to a nearly identical new release—both of which are running in production. 

The old version can be called the blue environment while the new version can be known as the green environment. Once production traffic is fully transferred from blue to green, blue can standy in case of rollback or pulled from production and updated to become the template upon which the next update is made.

There are downsides to this continuous deployment model. Not all environments have the same uptime requirements or the resources to properly perform CI/CD processes like blue green. But many apps evolve to support such continuous delivery as the enterprises supporting them digitally transform.

CI/CD is 1 of the 6 steps of digital transformation

How does blue green deployment work?

 

 Think about it like this. You’ve developed a simple cloud-native app—a mobile game where users earn points tapping multicolored balloons that fly across the screen. The game’s back end is supported by multiple container-based microservices that handle game achievements, scoring, mechanics, communication, and player identification.

 

Hundreds of users start playing the game after its initial release. They’re logging thousands of transactions every minute. Your DevOps team has encouraged you to release early and often, which is why you’re about to release a minor update to the mechanics microservice that increases the size and speed of the red balloon.

Instead of waiting until midnight to push the update to the production environment (when the least amount of users are active), you’re using a blue green deployment model to update the app during peak use. And you’re going to do it with zero downtime. 

You’re able to do this because you took the mechanics microservice in the production environment (blue) and copied it to an identical—but separate—container (green). After you increased the size and speed of the red balloons in the green environment, it passed through Q/A and staging (which were perhaps automated by an open source stress test project like Jenkins) before it’s pushed to the production environment alongside the active blue environment. 

The ops team can use a load balancer to redirect each user’s next transaction from blue to green, and—once all production traffic is filtered through the green environment—the blue environment is brought offline. Blue can either standby as a disaster recovery option, or it can become the container for the next update.

 

Blue green deployment and Kubernetes

Kubernetes is a natural fit with all the elements associated with the blue green deployment process, including cloud-native apps, microservices, containers, continuous integration, continuous delivery, continuous deployment, SRE, and DevOps. As an open source platform that automates Linux® container operations, Kubernetes not only helps orchestrate the containers that package cloud-native apps’ microservices, but Kubernetes is also supported by a collection of architectural patterns that developers can reuse instead of creating application architectures from scratch.

One of those Kubernetes patterns is known as the Declarative Deployment pattern. Since microservices are inherently small, they can multiply in number very quickly. The Declarative Deployment pattern reduces the manual effort needed to deploy new pods—the smallest and simplest unit in the Kubernetes architecture.

 

标签:blue,What,Kubernetes,environment,production,green,deployment
来源: https://www.cnblogs.com/chucklu/p/14453599.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有