Virtualization and orchestration

 

virtual machine

'Virtual Machine in certain hardware and kernel virtualization composition, running the client operating system, known as hypervisor software to create virtual hardware, which can include virtual disks, virtual network interfaces, and other virtual CPU, virtual machine also includes this virtual hardware can communicate with the guest kernel. Hypervisor can host, which means it is some of the runs on the host operating system (MacOS) software, as shown in the example. It can also be bare, run directly (replace your operating system) on the machine hardware. Either way, the management of procedural methods are considered to be heavyweight, because it requires multiple virtualization part (if not all hardware and kernel).

VM requires hardware virtualization to achieve machine-level isolation, and isolation container only needs to operate within the same operating system. With the increase of the number of spatial isolation, the cost difference becomes very apparent.

container

In the past few years, the rapid development of cloud platforms, but the most troubled operation and maintenance engineers, is the need for a variety of disparate development languages ​​install the appropriate runtime environment. Although the operation and maintenance of automation tools can reduce the complexity of setting up the environment, but the environment is still not solve the problem fundamentally.

 

Docker appeared to be a new watershed in the software development industry, container technology, mature technology also mark the beginning of a new era. Docker provided so that engineers can develop applications and capabilities to a portable container dependent on the package, this move makes a great Docker swept through the software industry and in turn change the rules of the game industry trend, which like most of the year just smartphones the scene appeared - has changed the rules of the game the entire mobile phone industry. Docker containers by type of packages, allowing development engineers and operation and maintenance engineers to standardize the way in mirror Docker release distribution provided by the application, so that a heterogeneous language is no longer bundled with the team shackles.

 

 

Container package that contains the application code, configuration and dependencies, providing operational efficiency and productivity. Here, you can know exactly how it will run, which means it is predictable, repeatable and immutable. The rise of the container is a huge boost DevOps a service factor, maximum security can overcome obstacles facing today. Of the container by the operating system level virtualization portable applications to make, to create isolated kernel-based packaging system. Container of the applications can be placed anywhere without the dependencies needed to run or the entire VM, thereby eliminating the dependencies.

容器可作为一个独立的单元,可以在任何支持它的地方运行。在每个实例中,容器本身都是完全相同的。如果主机操作系统是 CentOS,Ubuntu,MacOS,甚至是像 Windows 这样的非 UNIX 系统都无关紧要——从容器内部看操作系统将是容器指定的任何操作系统。容器还充当标准化的工作或计算单元。一个常见的范例是每个容器运行单个 Web 服务器,数据库的单个分片或单个 Spark 工作程序等。然后,为了扩展应用程序,你只需要扩展容器的数量。

每个容器都有一个固定的资源配置(CPU,RAM,线程数等),并且扩展应用程序需要只扩展容器的数量而不是单个资源原语。当应用程序需要按比例放大或缩小时,这为工程师提供了更容易的抽象。容器也是实现微服务架构的一个很好的工具,每个微服务只是一组协作容器。例如,可以使用单个主容器和多个从容器来实现 Redis 微服务。

Linux cgroups 为一种名为 Linux 容器(LXC)的技术铺平了道路。 LXC 实际上是我们今天所知的第一个实现容器的主要实现,利用 cgroup 和命名空间隔离来创建具有独立进程和网络空间的虚拟环境。从某种意义上说,这允许独立和隔离的用户空间。  容器的概念直接来自 LXC。 事实上,早期版本的 Docker 直接构建在 LXC 之上。

 

编排

随着虚拟化技术的成熟和分布式架构的普及,用来部署、管理和运行应用的云平台被越来越多地提及。IaaS、PaaS 和 SaaS 是云计算的三种基本服务类型,分别表示关注硬件基础设施的基础设施即服务、关注软件和中间件平台的平台即服务,以及关注业务应用的软件即服务。容器的出现,使原有的基于虚拟机的云主机应用,彻底转变为更加灵活和轻量的“容器+编排调度”的云平台应用。

容器单元越来越散落使得管理成本逐渐上升,大家对容器编排工具的需求前所未有的强烈,Kubernetes、Mesos、Swarm 等为云原生应用提供了强有力的编排和调度能力,它们是云平台上的分布式操作系统。容器编排是通常可以部署多个容器以通过自动化实现应用程序的过程。像 Kubernetes 和 Docker Swarm 这样的容器管理和容器编排引擎,使用户能够指导容器部署并自动执行更新,运行状况监视和故障转移过程。

容器单元越来越散落使得管理成本逐渐上升,大家对容器编排工具的需求前所未有的强烈,Kubernetes、Mesos、Swarm 等为云原生应用提供了强有力的编排和调度能力,它们是云平台上的分布式操作系统。

Kubernetes 是目前世界范围内关注度最高的开源项目,它是一个出色的容器编排系统,用于提供一站式服务。Kubernetes 出身于互联网行业巨头——Google,它借鉴了由上百位工程师花费十多年时间打造的 Borg 系统的理念,安装极其简易,网络层对接方式十分灵活。

Mesos 则更善于构建一个可靠的平台,用来运行多任务关键工作负载,包括 Docker 容器、遗留应用程序(如 Java)和分布式数据服务(如 Spark、Kafka、Cassandra、Elastic)。Mesos 采用两级调度的架构,开发人员可以很方便地结合公司的业务场景定制 Mesos Framework。

其实无论是 Kubernetes 还是 Mesos,它们都不是专门为了容器而开发的。Mesos 早于 Docker 出现,而 Kubernetes 的前身 Borg 更是早已出现,它们都是基于解除资源与应用程序本身的耦合限制而开发的。运行于容器中的应用,其轻量级的特性恰好能够与编排调度系统完美结合。

唯一为了 Docker 而生的编排系统是 Swarm,它由 Docker 所在的 Moby 公司出品,用于编排基于 Docker 的容器实例。不同于 Kubernetes 和 Mesos,Swarm 是面向 Docker 容器的,相较于 Kubernetes 面向云原生 PaaS 平台,以及 Mesos 面向“大数据+编排调度”平台,Swarm 显得功能单一。在容器技术本身已不是重点的今天,编排能力和生态规划均略逊一筹的 Swarm 已经跟不上前两者的脚步。

Kubernetes 和 Mesos 的出色表现给行业中各类工程师的工作模式带来了颠覆性的改变。他们再也不用像照顾宠物那样精心地“照顾”每一台服务器,当服务器出现问题时,只要将其换掉即可。业务开发工程师不必再过分关注非功能需求,只需专注自己的业务领域即可。而中间件开发工程师则需要开发出健壮的云原生中间件,用来连接业务应用与云平台。

 

Guess you like

Origin www.cnblogs.com/jacksonxiao/p/11298223.html