admin管理员组

文章数量:1594627

aws docker

Container virtualization — most visibly represented by Docker — is a server paradigm that will likely drive enterprise computing for years to come.

容器虚拟化(以Docker最明显地代表)是一种服务器范例,可能会在未来几年推动企业计算。

The Cloud is the most obvious and logical platform for containerdeployment.

云是用于容器部署的最显而易见的逻辑平台。

Amazon Web Services largely dominates the cloud computing world. Add it up. If you’re interested in getting a piece of all this action, you’ll definitely want to figure out how it all works.

亚马逊网络服务在云计算领域占据了主导地位。 加起来 如果您有兴趣采取所有这些措施,那么您肯定会想出所有方法的工作原理。

First, though, let’s quickly define some key terms.

首先,让我们快速定义一些关键术语。

虚拟化 (Virtualization)

Virtualization is the division of physical computer and networking resources into smaller, more flexible units, presenting these smaller units to users as though each was a discrete resource.

虚拟化是将物理计算机和网络资源划分为更小,更灵活的单元,将这些较小的单元呈现给用户,就好像每个都是离散资源一样。

The idea is that, instead of assigning specific computing tasks to individual physical servers — which may sometimes end up being over- or underused — a single physical server can be logically divided into as few or as many virtual servers as needed.

这个想法是,不是将特定的计算任务分配给单个物理服务器(有时可能最终被过度使用或使用不足),而是可以将单个物理服务器从逻辑上划分为所需的虚拟服务器个数。

That means, as the figure below illustrates, there can be dozens of individually installed operating systems (OS) running side by side on the same hard drive. Each OS is effectively unaware that it isn’t all alone in its local environment.

如下图所示,这意味着在同一个硬盘驱动器上可以同时运行数十个单独安装的操作系统(OS)。 每个操作系统实际上都没有意识到自己在本地环境中并不孤单。

Practically, each operating system instance can be accessed remotely by both administrators and customers in exactly the same way as any other server.

实际上,管理员和客户都可以使用与任何其他服务器完全相同的方式远程访问每个操作系统实例。

In this kind of environment, as soon as your virtual server completes its task or becomes unnecessary, you can instantly delete it. This will free up the resources it was using for the next task in the queue.

在这种环境中,一旦您的虚拟服务器完成其任务或变得不必要时,您可以立即将其删除。 这将释放它用于队列中下一个任务的资源。

There’s no need to over-provision virtual servers to anticipate possible future needs, because future needs can be easily met whenever they arrive.

无需过度配置虚拟服务器即可预测未来可能的需求,因为只要它们出现就可以轻松满足未来的需求。

In fact, today’s virtual server might only live a few minutes or even seconds before, having completed its task, being shut down for good to make room for whatever’s next. All this allows for far more efficient use of expensive hardware. It provides the ability to provision and launch new servers at will, either to test new configurations or add fresh power to your production services.

实际上,今天的虚拟服务器可能仅在几分钟或什至几秒钟之前就已存在,它已经完成了其任务,被永久关闭以腾出空间来容纳下一个下一步。 所有这些都可以使昂贵的硬件得到更有效的利用。 它提供了随意配置和启动新服务器的能力,以测试新配置或为生产服务增加新的功能。

Cloud computing providers like AWS use virtualized computers of one kind or another. The hundreds of thousands of Amazon EC2 instances, for example, all run on top of the open source Xen or KVM hypervisors — which are themselves installed and running on many thousands of physical servers maintained in Amazon’s vast server farms.

像AWS这样的云计算提供商会使用一种或另一种虚拟化计算机。 例如,成千上万个Amazon EC2实例都在开源Xen或KVM 虚拟机管理程序之上运行,而这些Xen或KVM 虚拟机管理程序本身已安装并在Amazon庞大的服务器场中维护的数千个物理服务器上运行。

Whatever hypervisor technology is being used, the goal is to provide a largely automated hosting environment for multiple complete, self-contained virtual computers.

无论使用哪种系统管理程序技术,目标都是为多个完整的独立虚拟机提供高度自动化的托管环境。

Containers like Docker, on the other hand, aren’t standalone virtual machines but are modified file systems sharing the operating system kernel of their physical host. That’s what we’ll discuss next.

另一方面,像Docker这样的容器并不是独立的虚拟机,而是经过修改的文件系统,它们共享其物理主机的操作系统内核。 这就是我们接下来要讨论的内容。

货柜 (Containers)

What are containers? Well, for one thing, they’re not hypervisors. Instead, they’re extremely lightweight virtual servers that, as you can see from the figure, rather than running as full operating systems, share the underlying kernel of their host OS.

什么是容器? 好吧,一方面,他们不是管理程序。 相反,它们是极其轻巧的虚拟服务器,从图中可以看出,它们不是作为完整的操作系统运行,而是共享其主机OS的底层内核。

Containers can be built from plain-text scripts, created and launched in seconds, and easily and reliably shared across networks. Container technologies include the Linux Container project, which was Docker’s original inspiration.

可以使用纯文本脚本构建容器,可以在几秒钟内创建和启动容器,并且可以在网络之间轻松可靠地共享它们。 容器技术包括Linux容器项目,这是Docker的最初灵感。

The script-friendly container design makes it easy to automate and remotely manage complex clusters of containers, often deployed as microservices.

脚本友好的容器设计使其易于自动化和远程管理通常作为微服务部署的复杂容器集群。

Microservices is a compute services architecture where multiple containers are deployed, each with a distinct yet complementary role. You might, therefore, launch one container as a database back-end, another as a file server, and a third as a web server.

微服务是一种计算服务体系结构,其中部署了多个容器,每个容器都具有独特但互补的作用。 因此,您可以将一个容器启动为数据库后端,将另一个容器启动为文件服务器,将第三个容器启动为Web服务器。

码头工人 (Docker)

As I explore in one or two of my Pluralsight courses, a Docker container is an image whose behavior is defined by a script. The container is launched as a software process that’s cunningly disguised as a server.

正如我在一两个Pluralsight课程中所探索的那样,Docker容器是一个映像,其行为由脚本定义。 容器是作为软件过程启动的,它被巧妙地伪装成服务器。

But what’s an image? It’s a software file containing a snapshot of a full operating system file system. Everything necessary to launch a viable virtual server is included.

但是什么是图像? 这是一个包含完整操作系统文件系统快照的软件文件。 包括启动可行的虚拟服务器所需的一切。

An image might consist of just a base operating system like Ubuntu Linux, or the tiny and super-fast Alpine Linux. But an image could also include additional layers with software applications like web servers and databases. No matter how many layers an image has and how complicated the relationships between them might be, the image itself never changes.

映像可能仅包含基本操作系统(如Ubuntu Linux)或超快速的微型Alpine Linux。 但是,映像也可以包含带有Web服务器和数据库之类的软件应用程序的附加层。 无论图像有多少层,它们之间的关系有多复杂,图像本身都不会改变。

When, as shown in the next figure, an image is launched as a container, an extra writable layer is automatically added into which the record of any ongoing system activity is saved.

如下图所示,当将映像作为容器启动时,将自动添加一个额外的可写层,其中将保存任何正在进行的系统活动的记录。

What do folks commonly do with their Docker containers? Often, they’ll load up some kind of app development project to test how it will work, and then share it with team members for feedback and updates. When the app is complete, it can be launched as a cluster of containers (or “swarm” as Docker calls it) that can be programmatically and instantly scaled up or down according to user demand.

人们通常使用他们的Docker容器做什么? 通常,他们会加载某种应用程序开发项目以测试其工作方式,然后与团队成员共享以获取反馈和更新。 应用程序完成后,可以将其作为一组容器(或Docker称为“ swarm”)启动,并可以根据用户需求以编程方式立即放大或缩小。

While Docker is a Linux-based technology and requires a Linux kernel to run, running remote or even local Docker containers on Mac or Windows machines is possible through either the Docker for Mac or Docker for Windows apps or for older machines, through the Docker Machine tool.

尽管Docker是一项基于Linux的技术,并且需要运行Linux内核,但可以通过Mac的Docker或Windows应用的Docker或旧机器通过Docker Machine在Mac或Windows计算机上运行远程甚至本地Docker容器。工具。

云计算 (Cloud computing)

Cloud computing is the provision of on-demand, self-service compute, memory, and storage resources remotely over a network.

云计算是通过网络远程提供按需,自助服务计算,内存和存储资源。

Since cloud-based services are billed in very small increments, you can quickly configure and launch a wide range of projects. And since the resources are all virtual, launching them as part of an experiment or to solve some short-term problem will often make lots of sense. When the work’s all done, the resource is shut down.

由于基于云的服务以很小的增量计费,因此您可以快速配置和启动广泛的项目。 而且由于资源都是虚拟的,因此将它们作为实验的一部分或解决一些短期问题而启动通常很有意义。 工作全部完成后,资源将关闭。

Cloud platforms let you do things that would be impossible — or impossibly expensive — anywhere else.

使用云平台,您可以在其他任何地方做不可能或昂贵的事情。

Unsure how long your project will run or how much demand it will attract? Perhaps purchasing, building, and housing all the expen

本文标签: AWSDocker