当前位置:网站首页>Containers and Devops: container based Devops delivery pipeline

Containers and Devops: container based Devops delivery pipeline

2022-07-06 12:46:00 Devops cloud school

* This article is translated from :https://www.bmc.com/blogs/devops-containers/ *

DevOps The emergence of is to meet the growing market and consumer demand for technology applications . It aims to create a faster development environment without sacrificing software quality .DevOps It also focuses on improving the overall quality of software in the rapid development lifecycle . It depends on a variety of technologies 、 A combination of platforms and tools to achieve all these goals .

Containerization is a radical change in our development 、 Technology for deploying and managing the application way . In this post , We will learn how containers fit DevOps The world , And container based DevOps Advantages and disadvantages of delivery pipeline .

What is a containerized Application ?

Virtualization helps users create virtual environments that share hardware resources . Containerization takes this abstraction further by sharing the operating system kernel . This leads to lightweight and inherently portable objects that bundle software code with all necessary dependencies ( Containers ). These containers can then be deployed on any supported infrastructure , Only minimal or no external configuration is required .

One of the most complex parts of traditional deployment is to deploy the environment with all dependencies and configurations . Containerized applications eliminate these configuration requirements , Because the container packages everything the application needs .

most important of all , Compare with virtual machine , Containers will require fewer resources and can be easily managed . In this way , Containerization greatly simplifies the deployment strategy , It can be easily automated and integrated into DevOps In delivery pipeline . When it comes to Kubernetes or Rancher When combined with the editing platform , Users can :

  • Take advantage of these platforms to manage the entire application lifecycle
  • Higher availability 、 Extensibility 、 Performance and safety

What is continuous delivery pipeline ?

DevOps Rely on continuous delivery (CD) As the core process of managing software delivery . It enables software development teams to deploy software more frequently , At the same time, maintain the stability and reliability of the system .

Continuous delivery and utilization CI/CD platform 、 A series of tools such as testing tools , Combine automation to promote frequent software delivery . All possible tasks through automated pipelines , From testing 、 Infrastructure configuration and even deployment , Automation plays an important role in these continuous delivery pipelines .

in the majority of cases , Continuous delivery and continuous integration are combined to create a stronger delivery pipeline , be called CI/CD The Conduit . They enable organizations to integrate complete software development processes into DevOps In the pipeline :

  • Continuous integration ensures that all code changes are integrated into the delivery pipeline .
  • Continuous delivery ensures that new changes are properly tested and eventually deployed into production .

Both are important for success DevOps Delivery pipelines are crucial .

How all this comes together ?

Now we know about containerized applications and delivery pipelines , Let's see how the two are related to each other to deliver software more effectively .

Conventional DevOps The Conduit

First , Let's look at the traditional DevOps The Conduit . Generally speaking , The traditional delivery pipeline will include the following steps .

  1. Develop software and integrate new changes into a centralized repository .( Version control tools work here .)
  2. Validate the code and merge the changes .
  3. Build the application with new code changes .
  4. Provide all configurations and dependencies for the test environment and deploy the application .
  5. To test .( This can be tested automatically and manually as required )
  6. After completing all tests , Deploy applications in production .( This again requires providing resources and configuring dependencies with any other configuration required to run the application .)

Most of the above tasks can be automated , Including the use of Terraform、CloudFormation etc. IaC Tool configuration infrastructure , Use AWS Elastic Beanstalk and Azure App Service And other platforms can simplify the deployment . However , All these automated tasks still need careful configuration and management , Using supplier specific tools will lead to supplier lock .

Containerized delivery pipeline

Containerized application deployment enables us to simplify the delivery pipeline with less management overhead . A typical containerized pipeline can be summarized as the following steps .

  1. Develop and integrate changes using version control systems .
  2. Validate and merge code changes .
  3. Build a container image .( At this stage , The code repository contains the application code and all the necessary configuration files and dependencies for building the container .)
  4. Deploy the container to the test environment .
  5. Application testing .
  6. Deploy the container to the production environment using the same container image .

As you can see in the figure above , Containerized application pipelines effectively eliminate most conventional infrastructure and environmental configuration requirements . however , The main thing to remember is ,「 The container deployment environment must be configured in advance 」. in the majority of cases , This environment involves :

  • A container orchestration platform , Such as Kubernetes or Rancher
  • Platform specific orchestration Services , Such as Amazon Elastic Container Service (ECS)、AWS Fargate、Azure Container services, etc .

The container includes all application dependencies and configurations . It reduces any errors related to configuration problems , And allow the delivery team to work in different environments ( For example, testing and production ) Quickly migrate these containers . Besides , Containerization greatly reduces the scope of troubleshooting , Because developers only need to dig deep into the application in the container , It is hardly affected by external configuration or services .

Modern application architecture ( For example, the architecture based on microservices ) Very suitable for containerization , Because they decouple application functions into different services . Containerization allows users to manage these services as individual entities , Without relying on any external configuration .

Even if containers are used, there will be infrastructure management requirements , Think that containers do simplify these requirements . The most prominent infrastructure management requirements will be managed at the same time :

  • Container arrangement platform
  • External service , Such as load balancer and firewall

however , Use Amazon Elastic Kubernetes Service (EKS) or Azure Kubernetes Service (AKS) And other managed container orchestration platforms do not need to manage the infrastructure of the container orchestration platform . These platforms further simplify the delivery pipeline , And allow Kubernetes Users use them without being locked by suppliers , Because they're based on Kubernetes.

DevOps The arrangement of containers in the delivery pipeline

Container orchestration goes hand in hand with container applications , Because containerization is only part of the whole container revolution . Container orchestration is the process of managing containers throughout their lifecycle , From deploying containers to managing availability and expansion .

Although there are many editing platforms , but Kubernetes It's one of the most popular choices , It has been supported by the whole industry . It can power almost any environment , From single node cluster to multi cloud cluster . The ability of the orchestration platform to manage containers throughout their lifecycle , At the same time, ensuring availability eliminates the need for manual intervention to manage containers .

As mentioned earlier , Using a platform independent orchestration platform can prevent suppliers from locking , At the same time, it allows users to take advantage of hosting solutions and support multi Cloud Architecture through a single platform .

Whether the container is suitable for your DevOps Delivery pipeline ?

The answer is yes . Containerization can benefit almost all application development :

  • DevOps Simplifies rapid development and delivery , At the same time, it increases team collaboration and improves the overall application quality .
  • Containers allow users to DevOps Take advantage of all the advantages of containers in the delivery pipeline , Without hindering the core DevOps practice , To help further simplify DevOps Delivery process .

Containers can support any environment , No matter the programming language 、 frame 、 How about the deployment strategy , At the same time, it provides more flexibility for the delivery team , Can customize their environment without affecting the delivery process .

原网站

版权声明
本文为[Devops cloud school]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202131507306360.html