What is "Deployment pipeline"?

A deployment pipeline is an automated implementation of your application's build,deploy,test and release process.

Typically a deployment pipeline includes:

  • Commit stage(Compile/Unit test/Analysis/Build installers)
  • Automated acceptance testing
  • Automated capacity testing
  • Manual testing(Showcases/Exploratory testing)
  • Release

The aim of the deployment pipeline:

  • it makes every part of the process of building, deploying, testing and releasing software visible to everybody involved, aiding collaboration.
  • it improves feedback so that problems are identified and so resolved as early as possible.
  • it enables teams to deploy and release any version of their software to any environments at will through a fully automated process.

Some Release Antipatterns

Deploying Software Manually

The evidence includes:

  • The production of extensive, detailed documentation that describes the steps to be taken and the ways in which the steps may go wrong.
  • Reliance on manual testing to confirm that the application is running correctly.
  • Frequent calls to the development team to explain why a deployment is going wrong on a release day.
  • Frequent corrections to the release process during the course of a release.
  • Environments in a cluster that differ in their configuration.
  • Releases that take more than a few minutes to perform.
  • Releases that are unpredictable in their outcome, that often have to be rolled back or run into unforeseen problems.
  • Sitting bleary-eyed in front of a monitor at 2 AM the day after the release day, trying to figure out how to make it work.

Why we need automated process?

  • Error will occur every time if the process is not fully automated.
  • It will need much more time to debug the environment and investigate any issues.
  • If we do not use automated process, we usually need to create a document to describe how to do the job, but the document is generally incomplete or out of date at any given time.
  • Automated process encourage collaboration.
  • Performing manual deployment is boring and repetitive and yet needs significant degree of experience.
  • We do not have any way to test a manual deployment process.

The automated deployment process must be used by everybody and it should be the only way in which the software is ever deployed.

Deploying to a Production-like Environment Only after Development Is Complete

It looks like:

  • If testers have been involved in the process up to this point, they have tested the system on development machines.
  • Releasing into staging is the first time that operations people interact with the new release.
  • Either a production-like environment is expensive enough that access to it is strictly controlled, or it is not in place on time , or nobody bothered to create one.
  • The development team assembles the correct installers, configuration files, database migrations, and deployment documentation to pass to the people who perform the actual deployment.
  • There is little collaboration between the development team the the people who actually perform deployments to create this collateral.

We need to integrate the testing, deployment and release activities into the development process.

Manual Configuration Management of Production Environment

It looks like:

  • Having deployed successfully many times to staging, the deployment into production fails.
  • Different members of a cluster behave differently.
  • The operations team takes a long time to prepare an environment for a release.
  • You can not step back to an earlier configuration of your system.
  • Servers in clusters have different versions of operating systems, third-party infrastructure, libraries or patch levels.
  • Configuration of the system is carried out by modifying the configuration directly on production environment.

All aspects of each of your testing, staging and production environment should be applied from version control through an automated process.

How can we implement deployment pipeline?

Regarding how to deliver software to our client, both speed and quality is important, and we need to consider the following principles

  • Automated, which means you can run build, deploy, test and release in a short cycle and the process is repeatable.
  • Frequent, which means you can run the whole process as many times as you can to make sure the quality is as expected.

There are some best practice we should take into consideration.

Every Change Should Trigger the Feedback Process

We can decompose any software application into 4 components:1) executable code; 2) configuration; 3) host environment; 4) data.

As to feedback process, we need to consider:

  • The process of creating the executable code must work.
  • The software's unit tests must pass.
  • The software should fulfill certain quality criteria.
  • The software's functional acceptance tests must pass.
  • The software's nonfunctional tests must pass.
  • The software must go through exploratory testing and a demonstration to the customer and a selection of users.

The feedback Must Be Received as soon as possible

So the deployment pipeline requires:

  • Run fast.
  • They are as comprehensive as possible
  • If any of them fails, it means our application has a critical fault and should not be released under any circumstances.
  • They are as envrionment-neutral as possible.

The Delivery team Must Receive the Feedback and then Act on it

It is essential that every body involved in the process is involved in feedback. We need to broadcast the feedback to any one who need it. and the feedback is no value unless we do not handle it.

What is the benefit?

Empowering Teams

  • Testers can select older versions of an application to verify changes in behavior in newer versions.
  • Support staff can deploy a released version of the application into an environment to reproduce a defect.
  • Operations staff can select a known good build to deploy to production as part of a disaster recovery exercise.
  • Releases can be performed at the push of a button.

Reducing Errors

Errors can creep into software from all sorts of places.

The cost of fixing a defect is different at different stages of the project. we need to fix the defect as early as possible.

With deployment pipeline, we can do it.

Lowering Stress

We do not need to face a battle when we try to release a new version.

Deployment Flexibility

We need to user automated deployment process to prepare a new environment for deployment and deploy the chosen version of the application.

Practice makes Perfect

With deployment pipeline, we can try as much as possible to deploy and manage our application in the same way.

With deployment pipeline, we do not need to spend time and money on lengthy and manually intensive testing at the end of the project.

Every Check-ins Leads to a Potential Release

This means that we need to make sure each check-in we make does not destroy any existing craft.

In Software, when something is painful, the way to reduce the pain is to do it more frequently.

If your tests are sufficiently comprehensive and you are running tests on a sufficiently production-like environment, then the software is in fact always in a releasable state.

Principles of Software Delivery

Create a Repeatable, Reliable Process for releasing Software

We need to automate almost everything, and keep everything you need to build, deploy, test and release your application in version control.

Automate Almost Everything

Please note that automation is a prerequisite for the deployment pipeline, as it is only through automation that we can guarantee that people will get what they need at the push of a button.

Keep Everything in Version Control

It includes requirement document, test scripts, automated test cases, network configuration scripts, deployment scripts, database creation, upgrade, downgrade and initialization scripts, application stack configuration scripts, libraries, toolchains, technical documentation and so on.

If It Hurts, Do it More Frequently, and Bring the Pain Forward.

Build Quality In

This is about continuous improvement, Everybody in the delivery team is responsible for the quality of the application all the time.

A fire alarm is useless if everybody ignores it. Delivery teams must be discipline about fixing defects as soon as they are found.

Done Means Released

It is not in the power of one person to get something done, it requires a number of people on a delivery team to work together to get anything done.

Everybody Is Responsible for the Delivery Process

Starting by getting everybody involved in the delivery process together from the start of a new project and ensure that they have an opportunity to communicate on a frequent regular basis.

Continuous Improvement

The Deming Cycle: Plan, Do, Study and Act.

Life is too short to spend our weekends in server rooms deploying applications.

《Continuous Delivery》 Notes 1: The problem of delivering software的更多相关文章

  1. 《Continuous Delivery》 Notes 2: Configuration Management

    What is Configuration Management? Configuration Management refers to the process by which all artifa ...

  2. 《Continuous Integration》读书笔记

    Trigger a Build whenever a change occurs. it can help us reduce assumptions on a projecvt by rebuild ...

  3. ACM YTU 《挑战编程》第一章 入门 Problem E: Graphical Editor

    Description Graphical editors such as Photoshop allow us to alter bit-mapped images in the same way ...

  4. 《Pro Continuous Delivery With Jenkins 2.0》随书笔记

    今天同时看完<Pro Continuous Delivery With Jenkins 2.0>, 这书与工作关系很大,但也是快速翻翻. 本书着重点jenkins高可用环境搭建,与gith ...

  5. 读《Top benefits of continuous integration》有感

    看到一片文章<Top benefits of continuous integration>,这张图画的很棒.将整个CI流程各阶段,列举出来了. 作者在文章里面介绍了CI和TDD,以及采用 ...

  6. 《Machine Learning》系列学习笔记之第一周

    <Machine Learning>系列学习笔记 第一周 第一部分 Introduction The definition of machine learning (1)older, in ...

  7. 《HTML重构》读书笔记&思维导图

    最近读了<HTML重构>这本书,以下做出自己的总结归纳,大家可以一起学习交流. 什么是重构?重构是在不改变程序行为的基础上进行小的改动是代码基本逐渐完善的过程,通常需要一些自动化工具的帮助 ...

  8. 2016-2017-2 《Java程序设计》预备作业2总结

    2016-2017-2 <Java程序设计>预备作业2总结 古希腊学者普罗塔戈说过:「头脑不是一个要被填满的容器,而是一束需要被点燃的火把.」 在对计算机系的学生情况的调查中,我说: 最近 ...

  9. 20145213《Java程序设计》实验二Java面向对象程序设计实验报告

    20145213<Java程序设计>实验二Java面向对象程序设计实验报告 实验内容 初步掌握单元测试和TDD 理解并掌握面向对象三要素:封装,继承,多态 初步掌握UML建模 熟悉S.O. ...

随机推荐

  1. 【WP开发】在手机屏幕点亮时播放声音

    今天说的内容有点流氓,请诸君在开发应用时谨慎使用. 那么,这活儿到底有多流氓呢? 先介绍一下要实现的功能:当用户按电源键(也可以是双击屏幕)点亮手机的屏幕时播放一下短音乐,而且应用程序可以不在前台运行 ...

  2. 在Windows平台上安装Node.js及NPM模块管理

    1. 下载Node.js官方Windows版程序:http://nodejs.org/#download    从0.6.1开始,Node.js在Windows平台上提供了两种安装方式,一是.MSI安 ...

  3. Ubuntu-安装-theano+caffe-超详细教程

    一.说明 本文是继<Ubuntu-安装-cuda7.0-单显卡-超详细教程> 之后的续篇.theano和caffe是深度学习库,对运算能力需求很大,最好使用cuda进行加速.所以,请先阅读 ...

  4. MYSQL数据表建立外键

    MySQL创建关联表可以理解为是两个表之间有个外键关系,但这两个表必须满足三个条件1.两个表必须是InnoDB数据引擎2.使用在外键关系的域必须为索引型(Index)3.使用在外键关系的域必须与数据类 ...

  5. ZOJ3805Machine(二叉树左右子树变换)

    /* 题意:建立一棵二叉树,左子树和父节点占一个宽度,右子树另外占一个宽度! 使任意左右子树交换顺序,使得整个树的宽度最小! 思路:递归交换左右子树 ! 开始写的代码复杂了,其实左右子树不用真的交换, ...

  6. Hadoop阅读笔记(五)——重返Hadoop目录结构

    常言道:男人是视觉动物.我觉得不完全对,我的理解是范围再扩大点,不管男人女人都是视觉动物.某些场合(比如面试.初次见面等),别人没有那么多的闲暇时间听你诉说过往以塑立一个关于你的完整模型.所以,第一眼 ...

  7. 互动教程,让你5分钟掌握 Flexbox 布局模式

    Flexbox 布局模块目前是 W3C 候选标准,旨在提供一个更有效的方式进行布局,对齐和为容器里的项目分配空间,即使它们的大小是未知的或者动态的.这里分享一个基于 Knockout.js 构建的互动 ...

  8. MAC与HMAC的介绍及其在AWS和Azure中的应用

    MAC 在密码学中,(消息认证码)Message Authentication Code是用来认证消息的比较短的信息.换言之,MAC用来保证消息的数据完整性和消息的数据源认证. MAC由消息本身和一个 ...

  9. Windows Server 2012安装时所需要的KEY

    Windows Server 2012不像Server 2008和2008 R2那样可以先装系统再输入序列号,而是在一开始就必须输入Server 2012 cdkey,目前在网上找到两枚序列号,标准版 ...

  10. 从零开始学习jQuery (一) 入门篇

    本系列文章导航 从零开始学习jQuery (一) 入门篇 一.摘要 本系列文章将带您进入jQuery的精彩世界, 其中有很多作者具体的使用经验和解决方案,  即使你会使用jQuery也能在阅读中发现些 ...