Difference Between Continuous Integration, Continuous Delivery, Continuous Deployment

We often hear about continuous integration, continuous delivery, and continuous deployment. What are the three, and what are the connections and differences?

Talk about the difference between continuous integration, continuous delivery, continuous deployment

If the development workflow is divided into the following stages:

Code -> Build -> Integrate ->  Test  -> Deliver -> Deploy

As you can see in the above diagram, "Continuous Integration", "Continuous Delivery" and "Continuous Deployment" have different software automation delivery cycles.

 

Continuous Integration

Continuous integration refers to the delivery of parts of individual software development to the overall part of the software, with frequent integration in order to find bugs more quickly. "Continuous Integration" is derived from Extreme Programming (XP) and is one of the original 12 practices of XP.

Talk about the difference between continuous integration, continuous delivery, continuous deployment

 

CI needs to have these:

  • Comprehensive automated testing. This is the basis for practicing continuous integration & continuous deployment. At the same time, it is extremely important to choose appropriate automated testing tools;
  • Flexible infrastructure. The existence of containers and virtual machines frees developers and QA personnel from having to go to great lengths;
  • Version control tools. Such as Git, CVS, SVN, etc.;
  • Tools to automate build and software release processes, such as Jenkins, flow.ci;
  • feedback mechanism. If the build/test fails, it can be quickly fed back to the relevant person in charge, so that a more stable version can be solved as soon as possible.

 

Advantages of Continuous Integration

  • "Fail fast", test without risk to the product, and respond quickly;
  • Minimize risk and reduce the cost of fixing buggy code;
  • Automate repetitive manual processes, allowing engineers to focus more on code;
  • Maintain frequent deployments and quickly generate deployable software;
  • Improve the visibility of the project and facilitate team members to understand the progress and maturity of the project;
  • Increase developer confidence in software products and help build a better engineering culture.

 

Continuous integration, where to start

The most important part is choosing the right continuous integration system. Whether to build a private deployment or choose a managed continuous integration system, the key lies in the infrastructure that the team runs and the resources invested by the team in the continuous integration system.

Comparing on-premise and managed continuous integration systems may help you make a better choice.

  • Self Hosted CI refers to deploying the software in the company's computer room or intranet. It needs to provide multiple servers to complete the operation of the CI system, and at the same time, it is necessary to configure the environment between different machines. Such as Maven or Gradle or Jenkins, they are characterized by free and open source, and extensive documentation support. The advantage is that you have complete control over the build environment, enabling complete customization. However, it needs to build the environment and configuration, and the maintenance cost is high, and it needs to buy a special machine, which requires a lot of manpower and material resources, and the update and migration risk is high;

  • Hosted CI refers to a SaaS-type CI service, which is built and configured online throughout the entire process, without considering the costs of installing machines, software, and environment construction. Common ones include CircleCI, Codeship and TravisCI, as well as the latest domestic continuous integration service - flow.ci. The characteristic of SaaS-type CI is that it can be used in a few minutes without additional machines. Resources can be dynamically scheduled according to your needs. Save time, worry, and effort.

Overall, Jenkins has always been the choice of most companies in the past, but this phenomenon is changing. With the popularity of public cloud services, Docker , and SaaS, more and more companies are beginning to choose Hosted CI, which is a managed continuous integrated system.

In addition, when choosing a suitable continuous integration service, it is also necessary to consider the flexibility of the system to adapt to the development and testing needs of the company at different stages.

Choosing a continuous integration system is only one step in a continuous integration application. It is also necessary to establish a suitable continuous integration culture such as code quality control and testing culture. Doing continuous integration well can lay a solid foundation for continuous delivery and continuous deployment.

 

continuous delivery

On the basis of continuous integration, continuous delivery deploys the integrated code to a "production-like environment" that is closer to the real operating environment. Continuous delivery takes precedence over software deployment throughout the product life cycle and is built on a high level of automated continuous integration.

Talk about the difference between continuous integration, continuous delivery, continuous deployment

Just think about it, if you wait until everything is completed before delivering to the next link, all the problems can only break out at the end, and the cost of solving is huge or even impossible to solve. For example, after we complete the unit testing, we can deploy the code to the Staging environment connected to the database for more automated testing. If there is no problem with the code, you can continue to manually deploy to the production environment. Of course, continuous delivery does not mean that every change in the software must be deployed to the production environment as soon as possible, it means that any code modification can be deployed at any time.

 

The benefits of continuous delivery

The advantages of continuous delivery and continuous integration are very similar:

  • Post quickly. Be able to respond to business needs and realize software value faster.
  • The frequent iteration cycle of coding->testing->launching->delivery is shortened, and rapid feedback is obtained at the same time;
  • High-quality software release standards. The entire delivery process is standardized, repeatable, and reliable,
  • The progress of the entire delivery process is visualized, which is convenient for team members to understand the maturity of the project;
  • A more advanced way of team collaboration. From requirements analysis, product user experience to interaction design, development, testing, operation and maintenance and other roles, it is less wasteful than traditional waterfall software teams.

 

Continuous deployment

Continuous deployment refers to the automatic deployment to the production environment after the delivered code has passed the review. Continuous deployment is the highest stage of continuous delivery. This means that all changes that pass a series of automated tests will be automatically deployed to production. It can also be called "Continuous Release".

Talk about the difference between continuous integration, continuous delivery, continuous deployment

Why is continuous deployment an ideal workflow?

"The developer submits the code, the continuous integration server obtains the code, executes the unit test, and decides whether to deploy to the staging environment according to the test results. If it is successfully deployed to the staging environment, the overall acceptance test is carried out. If the test passes, it is automatically deployed to the production environment, and the whole process is automated. Efficient operation.”

In fact, in the process from requirements to deployment, products will go through several different environments, such as QA environment, various automated test running environments, production environments, etc. The construction, configuration, management of these environments, and the specific deployment of products in different environments are very complex, and it is indeed difficult to fully automate and continuously deploy from start to finish. Then, if we can achieve continuous delivery and ensure that the code is no problem in the simulated environment, maybe the team members have a real mentality.

 

Advantages of Continuous Deployment

The main benefit of continuous deployment is that new features can be deployed relatively independently and feedback from real users can be collected quickly.

"You build it, you run it", this is the core secret that Amazon can complete 50 million deployments a year, with an average of more than 50 deployments per engineer per day.

 

finally

"Continuous Integration", "Continuous Delivery" and "Continuous Deployment" provide an excellent DevOps environment with benefits and challenges for the entire team. Regardless, frequent deployments, rapid delivery, and automation of the development-testing process will be an important part of software engineering in the future.

{{o.name}}
{{m.name}}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324090786&siteId=291194637