DevOps relationship with Kubernetes, container

 

The past two years, with the rise of the container, Kubernetes other technologies, DevOps this concept has been widely mentioned and heavy use. This article will proceed from the following aspects, combined with experiments to show the way for the reader to understand the true meaning of DevOps.

  • DevOps generated background
  • The relationship between DevOps and container, Kubernetes
  • DevOps common tools

What is DevOps

The DevOps Dev refers Development, Ops referring to the Operations, one sentence DevOps is to get through the operation and maintenance of barriers to the development, operation and maintenance to achieve the development of integration.

Development from waterfall to agile development

Speaking of the history of DevOps, we need to talk about agile development.

First, agile development is software-oriented, rely on computing hardware and software. We know that the world's first computer appeared in 1946. Therefore, with respect to software development in human history, not a long time. With respect to master the software development methodology, people are more adept at engineering, such as the levy, bridge-building and so on. In order to promote software development, in 1968, it will apply the method to the field of software engineering, the resulting software engineering.

Way of software engineering has its advantages, but it brought a lot of problems. The key point is: the software is different from the project. Bridge built by engineering, high-rise after completion, people usually do not have a lot needs to change for the main tower of the bridge; but the software is different. For software for end users, people demand software features that will be constantly changing. In the waterfall model, the client application when there are changes in demand, software vendors have to re-develop the software. This will make a substantial decline in the competitiveness of enterprises.

Traditional software development process is: first-line product manager to collect business and customer requirements that may be new functional requirements, it may be the product needs of existing features do change. And then evaluated, analyzed, these requirements will be developed for the product roadmap and allocate appropriate resources for related work. Next, the product manager will demand output to the development sector, the development engineers to write code. After written, would be carried out by different departments of the follow-up of the code is structured, quality testing, integration testing, user acceptance testing, and finally to the production sector. Such problems are caused, the development cycle is longer, and if there is any change, we must re-take over the development process, in shopping malls such as the battlefield today, delay the release of a version of the software, if possible to publish this release already on the market out of date; competitors are likely due for release on the new software in a step faster, and quickly seized the customers and markets.

It is because of the pressure of the business environment, companies need to improve software development methods.

In early 2001, the US ski resorts snowbird, 17 experts together, outlined some of the software development team can make the work more quickly, the principle of capacity values ​​corresponding change. They call themselves "Agile Alliance."

The main values ​​of agile development are as follows:

Table 1. Core values ​​of agile development

With Agile Alliance, with Agile values ​​would have a genre development. The main schools of agile development are: Extreme Programming (XP), Scrum, Crystal methods.

At this point, there is the concept of agile development, there are ways, there is practice. With the rise of cloud computing concept of cloud computing continues to fall, not only to achieve agile development of tools, has also been sublimated.

From agile development to DevOps

Talked about agile development, agile development and DevOps so what does it matter?

Agile development is the development of domain concepts, agile development basis, the following stages:

Agile development -> Continuous Integration -> Continuous Delivery -> Continuous Deployment -> DevOps

From the foundation of agile development to DevOps, after the previous stage is a stage; With the advance stages, each stage of the process covered by the concept of more and more; ultimately DevOps covers the full development and operation and maintenance phases. Depending on the scope of the official involved in each stage, so it is each concept tool provided is not the same. Details we refer to the following chart:

Figure 1. From the agile development to advanced DevOps

Continuous integration (Continuous Integration) means: before the code is integrated into the trunk, must all through automated testing; as long as there is a test case fails, it can not be integrated. Continuous integration goals to be achieved are: on the basis of maintaining a high quality, so that products can iterate quickly.

Continuous Delivery (Continuous Delivery) means: developers frequently the new version of the software, delivered to the quality of the team or the user, for review. If the review by the code was released. If the review does not pass, then changes need to be developed and then submitted.

Continuous deployment (Continuous Deployment) means: the code through the review and publish, automatically deployed to delivery.

DevOps  is a complete set of practices that can automate processes between software development and IT teams so that they can more quickly and reliably build, test and release software.

2. DevOps a schematic view of FIG.

DevOps of technology

DevOps of technology, requires three aspects: standard delivery, container management platform, DevOps toolchain. Next, we look at this in detail three aspects.

DevOps of technology 1: Standard deliverables

DevOps aims to make development and integration of operation and maintenance, so that communication between the development and operation and maintenance of each other more smoothly, fast, so that enterprises can adapt to market changes.

Of course, the real development of integrated operation and maintenance, development and not just let the operation and maintenance of people sit together so simple. From a technical point of view, DevOps first need to have a standard that contains the "operating system + Runtime + application" deliverables. In addition, we also need to open up through the entire DevOps processes.

在 IT 早期,厂商硬件和系统平台的差异化过大,在不同硬件和系统平台进行应用的无缝迁移几乎是不可想象的。随着 X86 服务器以及 vSphere 等虚拟化技术的普及,操作系统(包括操作系统上的应用)可以在不同 X86 服务器厂商的硬件平台上在线无缝迁移。硬件差异化不断缩小甚至消失,软件的重要性不断提升,IT 界真正进入软件定义一切的时代。在这个背景下,业务提出了更高的要求,如何将应用在不同操作系统之间实现无缝迁移,将开发和生产统一,做到“构建一次,到处运行”。

容器技术的概念最初出现在 2000 年,当时称为 FreeBSD jail,这种技术可将 FreeBSD 系统分区为多个子系统。

但直到 Docker 的出现(2008 年),容器才真正具备了较好的可操作性和实用性。因为 Docker 提供了容器的镜像构建、打包等技术,使容器具备了一次打包,到处运行的能力。

对于客户而言,Docker 只能在一个 Linux 上运行,是“单机版”,很难符合企业对高可用的需求。此外,docker 也缺乏和持久存储、虚拟网络相关的功能。

DevOps 的技术实现 2:容器调度平台

2014 年 Kubernetes 的出现,奠定了今天容器调度平台的事实标准的基础。

因为通过 Kubernetes,我们不仅实现了容器在多个计算节点上的统一调度,还可以将容器对接持久存储、对接虚拟网络等。换句话说,Kubernetes 使容器具备企业级的功能。

图 3. Kubernetes 架构

DevOps 的技术实现 3:DevOps 工具链

在有了容器和 Kubernetes 以后,我们还需要相关的 DevOps 工具链。

目前在 IT 界,DevOps 相关的工具很多,其中大多数是开源的工具,如下图。

图 4. DevOps 工具链

 

总结:DevOps 与容器和 Kubernetes 的关系

PaaS、DevOps 的概念,在容器和 Kubernetes 普及之前就存在了。广义上的 PaaS、DevOps 的建设,会包含:人、流程、工具等多方面内容。IT 厂商提供的 PaaS、DevOps 以指工具层面的落地为主、以流程咨询为辅。

在 Kubernetes 和容器普及之前,我们通过虚拟机也可以实现 PaaS、CI/CD,只是相对速度较慢,因此普及性不高(想象一下通过 X86 虚拟化来实现中间件集群弹性伸缩的效率)。而正是容器的出现,为 PaaS、DevOps 工具层面的落地提供非常好的承载平台,使得这两年容器云风生水起。这就好比 4G(2014 年出现)和微信(2011 年出现)之间的关系:在手机网速 3G 时代,流量按照兆收费的时候,(即使有)大家对于微信语音聊天、微信视频也不会太感兴趣。

所以说, Docker 使容器具备了较好的可操作性、可移植性,Kubernetes 使容器具备企业级使用的条件。而 IT 界众多基于 Kubernetes 和 Docker 企业级的容器平台,又成为了 Devops 工具落地的新一代基础架构。

 

 

常用 DevOps 工具介绍

  • Kubernetes 集群:包含 Docker 和 Kubernetes。
  • Gogs: 通过 Go 编写的本地代码仓库,功能与 github 类似。
  • Jenkins/Jenkins Slave Pods:持续集成工具。
  • Nexus :工件管理器,能够解决本地缓存构建依赖项。
  • SonarQube:开源代码分析工具,它可以分析常见编程错误的源代码。

以上的 DevOps 工具,都可以以容器方式部署到 Kubernetes 集群中。

 

其他工具类型及对应的不完全列举整理如下:

  • 代码管理(SCM):GitHub、GitLab、BitBucket、SubVersion

  • 构建工具:Ant、Gradle、maven

  • 自动部署:Capistrano、CodeDeploy

  • 持续集成(CI):Bamboo、Hudson、Jenkins

  • 配置管理:Ansible、Chef、Puppet、SaltStack、ScriptRock GuardRail

  • 容器:Docker、LXC、第三方厂商如AWS

  • 编排:Kubernetes、Core、Apache Mesos、DC/OS

  • 服务注册与发现:Zookeeper、etcd、Consul

  • 脚本语言:python、ruby、shell

  • 日志管理:ELK、Logentries

  • 系统监控:Datadog、Graphite、Icinga、Nagios

  • 性能监控:AppDynamics、New Relic、Splunk

  • 压力测试:JMeter、Blaze Meter、loader.io

  • 预警:PagerDuty、pingdom、厂商自带如AWS SNS

  • HTTP加速器:Varnish

  • 消息总线:ActiveMQ、SQS

  • 应用服务器:Tomcat、JBoss

  • Web服务器:Apache、Nginx、IIS

  • 数据库:MySQL、Oracle、PostgreSQL等关系型数据库;cassandra、mongoDB、redis等NoSQL数据库

  • 项目管理(PM):Jira、Asana、Taiga、Trello、Basecamp、Pivotal Tracker

在工具的选择上,需要结合公司业务需求和技术团队情况而定。(注:更多关于工具的详细介绍可以参见此文:51 Best DevOps Tools for #DevOps Engineers)

 

refer:

DevOps简介

一分钟告诉你究竟DevOps是什么鬼?

通过 Kubernetes 和容器实现 DevOps

Guess you like

Origin www.cnblogs.com/-wenli/p/11391157.html