! Deploy = Release (first part): deployment and release of difference, and why this is important

! Deploy = Release (first part): deployment and release of difference, and why this is important

Apr 19, 2018

翻译自:Deploy != Release (Part 1): The difference between deploy and release and why it matters.

Q: "The latest version deployed yet?"

A: "I support the deployment of gif action figure in a production environment."

Q: "That gif action figure has been released to support it?"

A: "Gif release version of a motion picture has been deployed."

ask:"……"

 

I have worked in many companies had, in these companies' deployment (deploy, verb) "," deploy objects (deployment, noun) "," line (ship) on "and" release (release) "are free to use, even used interchangeably. As an industry, we regulate the use of these terms has not done enough, although we have improved operation and maintenance practices and tools radically over the past decade. In  Turbine Labs  , we use the "on-line", "deploy", "publishing" and "rollback (rollback)" precisely defined, and spent a lot of time to think when a you "publish" as the on-line process when independent stage, the world is what it looks like. In the first part of this article, I will share definitions of these terms, describe some of the common 'deployment == release "practice, and explain why the anti-risk poor to do so. In the second part, I will describe some very powerful when risk mitigation techniques at the "deployment" and "release" is regarded as the software line cycle at different stages.

online

On the line refers to your team for a service code from the source code management repository version of a snapshot, and use it to process online traffic. I think the whole process on the line consists of four different specialized small flow components: build (build), testing, deployment and release. Thanks to cloud infrastructure, container, allocation framework of technological advances and process improvements, such as  Twelve-factor , continuous integration and continuous delivery , the implementation of the first three processes (build, test, and deploy) has never been easier.

deploy

Deployment refers to the process of your team install the new version of the service code on the basis of setting up the production environment. When we say that the new version of the software is deployed , we mean that it is somewhere in the production infrastructure environment to run. Basic settings can be a new start EC2 instance on AWS, it can be a Docker container Kubernetes cluster in a data center in a container operation. Your software has been successfully started, passed health checks, and ready (as you hoped!) To handle online traffic, but may not actually receive any traffic. This is an important point, so I will quote a large format with Medium awesome to repeat:

You do not need to deploy new versions of services to users.

According to this definition, deployment activities may be almost zero risk . Admittedly, there may be a lot of problems in the deployment process, but if a silent response to the collapse of the container, and the user does not get a response state 500, if that really be a problem occurs it?

Deployed a new version (purple), but not published. Known good version (green) still respond to online requests.

release

When we say service version release , we mean that it is responsible for the service line traffic. In verb form, the release is the online traffic will be transferred to the new version of the process. Given this definition, all the risks associated with on-line new binary file related to - a service interruption, angry users, at The the Register  of caustic content - and new software release and not related to the deployment. In some companies, I heard this on-line stage is called the first release (rollOut) . In this article we will still use the publication to express.

The new version is released in response to a request online.

Rollback

Sooner or later, probably soon after, your team will be on the line in question some of the features of the service. Rollback (and it is dangerous, unpredictable, pressure Alexander's brother - roll forward roll-forward) refers to the online service back to a known state of the process, usually re-release the most recent version. Will be rolled back as another deployment and release process helps to understand, the only difference is:

  • You are on-line version of the feature is known in the production environment
  • The implementation of the deployment and release process you are under time pressure
  • You may forward a different environment publish - after the release of the last failure that something may have changed (or changed)

An example of rollback after release.

Now that we have it on the line, deploy, publish and roll back the definition of consensus, let us look at some common deployment and distribution practices.

Published in situ (ie deployment == release)

When your team is on-line process involves a new version of the software pushed to run on older versions of the server and restart the service process, you are issued in place. According to our above definition, deployment and release occur simultaneously: once the new software is running (deployment), it will load all online traffic old version (release). At this time, successful deployment is the successful release of the failed deployment will bring the whole or part of the service interruption, a group of angry users, there may be a flustered manager.

在我们所讨论的部署/发布过程中,原地发布是唯一的将部署风险暴露给用户的方式。如果你刚刚部署的新版本无法启动 —— 可能是因为无法找到新增的环境变量而抛出异常,也可能是有一个库依赖不满足,或者只是你今天出门时没看黄历 —— 此时并没有老版本的服务实例来负载用户请求。你的服务此时至少是部分不可用的。

此外,如果有用户相关的问题或更微妙的运维问题 —— 我把它叫做发布风险 —— 原地发布会将线上请求暴露给你已发布的所有实例。

在集群环境中,您可能会首先原地发布一个实例。这种做法通常称为金丝雀发布,它可以减轻一些风险 —— 面临部署风险和发布风险的流量的百分比为:新服务实例的个数除以集群中的实例总数。

一个金丝雀发布:集群中的一个主机运行新版本

最后,回滚错误的原地部署可能会有问题。即使你回滚(重新发布)到旧版本,也无法保证可以恢复到以前的系统状态。与当前错误的部署一样,你的回滚部署在启动时也可能会失败。

尽管其风险管理相对较差 —— 即便使用金丝雀,一些用户请求也会面临部署风险 —— 原地部署仍旧是业务中常见的方式。我认为这类的经验会导致不幸地混用「部署」和「发布」这两个术语。

别绝望

我们可以做得更好!在这篇文章的第二部分,我们会讨论分离部署和发布的策略,以及可以在复杂的发布系统上构建的一些强大工作流。

我是 Turbine Labs 的一名工程师,我们正在构建 Houston,这个服务可以轻松构建和监控复杂的实时发布工作流程。如果你想轻松地上线更多服务,你绝对应该联系我们。我们很乐意与你交谈。

Thanks to draft Glen Sanford, Mark McBride, Emily Pinkerton, Brook Shelley, Sara and Jenn Gillespie reading this article.

Thank  Glen D Sanford .

Reproduced in: https: //my.oschina.net/newlife111/blog/1841228

Guess you like

Origin blog.csdn.net/weixin_34310369/article/details/92489873