官术网_书友最值得收藏!

Continuous Delivery and Deployment with Docker Containers

In software, when something is painful, the way to reduce the pain is to do it more frequently, not less.
                                                                                                            – David Farley

At the time, we could not convert the Continuous Integration (CI) into the Continuous Delivery (CD) process because we were missing some essential knowledge. Now that we understand the basic principles and commands behind Docker Swarm, we can go back to the end of the Chapter 1, Continuous Integration with Docker Containers. We can define the steps that will let us perform the full CD process.

I won't go into Continuous Delivery details. Instead, I'll pitch it as a single sentence. Continuous Delivery is a process applied to every commit in a code repository and results in every successful build being ready for deployment to production.

CD means that anyone, at any time, can click a button, and deploy a build to production without the fear that something will go wrong. It means that the process is so robust that we have full confidence that "almost" any problem will be detected before the deployment to production. Needless to say, CD is an entirely automated process. There is no human involvement from the moment a commit is sent to a code repository, all the way until a build is ready to be deployed to production. The only manual action is that someone needs to press the button that will run a script that performs the deployment.
Continuous Deployment (CDP) is one step forward. It is Continuous Delivery without the button. Continuous Deployment is a process applied to every commit in a code repository and results with every successful build being Deployed to production.

No matter which process you choose, the steps are the same. The only difference is whether there is a button that deploys the release to production.

At this point, it is safe to assume that we'll use Docker whenever convenient and that we'll use Swarm clusters to run the services in production and production-like environments.

Let's start by specifying the steps that could define one possible implementation of the CD/CDP process:

  1. Check out the code.
  2. Run unit tests.
  3. Build binaries and other required artifacts.
  4. Deploy the service to the staging environment.
  5. Run functional tests.
  6. Deploy the service to the production-like environment.
  7. Run production readiness tests.
  8. Deploy the service to the production environment.
  9. Run production readiness tests.

Now, let's get going and set up the environment we'll need for practicing the CD flow.

主站蜘蛛池模板: 白水县| 漠河县| 镇江市| 莱西市| 阿克陶县| 甘德县| 横峰县| 安龙县| 盘锦市| 岢岚县| 柳林县| 云安县| 贵南县| 洮南市| 阳江市| 神木县| 通河县| 巢湖市| 吉首市| 阿尔山市| 光山县| 石门县| 阳朔县| 商河县| 南陵县| 侯马市| 乐山市| 翁源县| 枝江市| 逊克县| 广昌县| 肇州县| 茂名市| 临海市| 沛县| 和林格尔县| 乌鲁木齐县| 曲水县| 南平市| 左权县| 贺州市|