Changing the Way of Continuous Delivery with Docker (Part 1)

简介: The internet industry has been constantly changing market demands and products, forcing organizations to adapt by making constant deliveries and updates to their production environment.

0213_Continuous_delivery_with_Docker_change_the_way_of_delivery_with_technology_Part_1

Introduction

This post is the first part of the series "Changing the Way of Continuous Delivery with Docker" and discusses the background, challenges, and processes involving Docker. Docker is a service for reformed continuous delivery. In the second part of the series, we will explore the method of using Docker along with its delivery processes.

Background

The internet industry has been constantly changing market demands and products, forcing organizations to adapt by making constant deliveries and updates to their production environment. This new approach to development is known as Continuous Integration (CI) and Continuous Delivery (CD), which combines and converts development, production and delivery processes into a cyclical process.

However, this approach introduces several problems in the long run. One such problem is the difficulty of transferring obscure production environments to successors who have limited experience with the environments.

Furthermore, debugging that occurs in the production environment prior to the final production launch is an obstacle. It is not only hard to maintain but also requires constant updates because demands and products are persistently changing.

Traditional CD Processes: Overview and Challenges

Traditional development solutions include processes, Continuous Integration (CI), and Continuous Delivery (CD). These practices combine and convert development, production, and delivery processes into a cyclical process.

01

  • Integration (combining two things together): Upon submission of documents, code goes with code; upon compiling, code goes with logic; upon testing, code goes with features; from generation to deployment and upon generation for release, code goes with systems, and systems go with systems. Every time the system combines two things, integration occurs.
  • Continuous testing: Just like a physical examination (for your system), it helps with the rapid discovery and elimination of faults in your system before the final launch, preventing a combination of untested features, missing features, or defective code segments. In general, this process should be continuous.
  • Feedback loops: In the flowchart of continuous integration pipes, each step consists of a feedback loop. This allows for rapid feedback, simplifying problem identification and rectification.

For example, after submitting code, a developer should first make sure that the code does not conflict with other codes. The developer also tests if the code successfully compiles to pass the unit test. Upon meeting all these requirements, the developer can move on to the next item. However, if the developer submitted a non-conflicting code but receives feedback that the code disabled successful compiling of the whole system, the developer needs to fix the code.

Feedback must be promptly traced back to the point of development so that the developers can know what to do next. Additionally unit tests should be kept separate from system function or integration tests. This is because the speed of these tests varies, and the tests generate different types of feedback.

Building a CD process- Environment Requirements

Generally, a company or a project requires a multiple environments. Typically, the production environment of an enterprise is placed in a public cloud, while the development process is in an offline environment. The public cloud environment may be inconsistent with the offline development environment, resulting in problems during the final product launch.

CD Processes- Problems Encountered

Problems may occur even if a complete continuous integration system environment is built systematically. Developers may even rely on different language environments or packages, causing conflicts in compiling environments and difficulties in maintenance.

02

Origin of Problems

A majority of problems arise because developers only deliver code and related dependencies, while operations, in reality, also require an operating environment, environmental description, dependencies, databases, and cache.

03

Docker: Transforming the Way of Software Delivery

04

In Docker, all information required for the generation of the environment is included in the delivered code. The code contains a description file that describes the environment as well as its dependencies, caches, configurations, variables, containers, and jar packages.

This approach is analogous to packing a code and all other required components into a container, and delivering the container to the operations team. The core feature of this container is its portability. Since the container includes all environmental dependencies, we can realize the same result regardless of the operating environment.

Competency of Docker

Before Docker came into being, there were many specification constraints to creating containers. Docker is not only a software but also a new approach to implementing containers.

  • Environment-describing capacity: Docker files may describe the whole environment required by software.
  • Hierarchical file system: Docker images provide a solution to package management, in which we describe each operation as a layer of version management.
  • Separation of OS: Docker shields the differences of the operating system upon running.

Docker is a Container Technology

In virtualization technology, hardware and software are virtualized into virtual machines. Each virtual machine is a complete operating system that is well isolated but may require several minutes to start.

The major difference of the container technology from the traditional virtualization technology lies in the fact that all containers lack a complete operating system layer and use the OS kernel of the parent machine as their own.

The prime advantage of the container technology is that containers can be started in seconds as they do not involve any traditional virtual machines. Additionally, since containers have lower overhead compared with virtual machines, users can deploy more containers on a server.

Three Steps to Software Delivery with Docker

  1. Build: describes the operating system foundation, the environment, the port to start, and scripts to run. The system saves the description file as a Docker image located within the local storage.
  2. Ship: pushes the image to the Docker Registry at the far end.
  3. Run: pulls the image from the public registry upon running. The container is an environmental description and at the same time an entirety, which will render the same result when running in whatever environment.

Case Study: BBC News

BBC News is a global news website company with over 500 developers distributed around the world. It has more than ten CI environments, as it uses different languages in different areas of the world. BBC News had to figure out how to unify the coding processes and manage the CI environments uniformly. The existing jobs took up to 60 minutes to schedule and run, and they were run sequentially. With Docker, the jobs are now run in parallel, significantly speeding up the process. Furthermore, by using containers, the developers do not have to worry about the CI environments. Visit Docker to learn more about BBC's success story.

Conclusion

This post introduced Docker and its role in Continuous Integration and Continuous Delivery. Continuous Delivery with Docker mainly focuses on reducing application risks while delivering value faster through reliable software production in shorter iterations.

In the next part of this post, we will examine how to use Docker and describe its build and UT environment.

目录
相关文章
|
Java 关系型数据库 MySQL
Changing the Way of Continuous Delivery with Docker (Part 2)
Docker has reformed the way of conducting continuous delivery. Docker allows you to package an application with all of its dependencies into a standar.
2094 0
|
20天前
|
Docker 容器
进入Docker容器中
进入Docker容器中
33 2
|
1月前
|
Java Go 开发者
Docker容器技术简介及其与Go语言的结合点
【2月更文挑战第23天】本文首先概述了Docker容器技术的核心概念和优势,接着探讨了Go语言与Docker容器技术的结合点。通过阐述Docker的轻量级、可移植性和版本控制等特性,以及Go语言在容器化应用中的优势,本文旨在说明两者结合能够实现更高效、灵活的应用开发和部署。
|
1月前
|
Oracle 关系型数据库 数据库
|
9天前
|
Linux Docker 容器
docker 容器常用命令
docker 容器常用命令
11 0
|
17天前
|
Kubernetes 网络协议 Docker
Docker 容器的DNS
Docker 容器的DNS
23 1
|
20天前
|
关系型数据库 MySQL Nacos
【深入浅出Nacos原理及调优】「实战开发专题」采用Docker容器进行部署和搭建Nacos服务以及“坑点”
【深入浅出Nacos原理及调优】「实战开发专题」采用Docker容器进行部署和搭建Nacos服务以及“坑点”
45 1
|
24天前
|
监控 数据可视化 虚拟化
Docker容器常用命令笔记分享
Docker容器常用命令笔记分享
50 2
|
1月前
|
消息中间件 Linux 开发工具
rabbitmq使用docker容器挂载宿主机配置文件时无法访问控制台
rabbitmq使用docker容器挂载宿主机配置文件时无法访问控制台
|
1月前
|
JavaScript Shell Docker