无业游民,码头工人,木偶,厨师 [英] Vagrant, Docker, Puppet, Chef

查看:70
本文介绍了无业游民,码头工人,木偶,厨师的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我什至不理解标题中服务之间的基本区别。这些服务仅仅是提供软件来帮助您配置/组织/管理VM,还是为VM运行提供物理基础设施?换句话说,它们只是开发人员与AWS,Rackspace和Azure之间的便捷接口吗?

I don't understand even the basic difference between the services in the title. Do these services just provide software to help you configure/organize/manage your VM's, or do they also provide physical infrastructure for your VM's to run on? In other words, are they just convenient interfaces between developers and AWS, Rackspace, and Azure?

推荐答案

不完全是。

Chef / Puppet是相同的,它们是配置管理。尽管您可以使用它们来管理虚拟机或公共/私有云,但大多数人并不倾向于那样使用它们。它们是配置管理。它们通常在启动虚拟机以使其处于所需状态后起作用。也就是说,虚拟机上需要什么软件,需要添加什么用户,需要什么配置,等等。因此,它倾向于用于扩展基础架构。

Chef/Puppet are the "same", they are configuration management. While you can use them to manage virtual machines or public/private clouds, most people don't tend to use them that way. They are configuration management. They typically come into play after a virtual machine is fired up to get them in a desired state. That is to say, what software is needed on the virtual machine, what users need to be added, what configuration is needed, etc. Thus, it tends to be used for scaling infrastructure.

Vagrant虽然还可以用于管理虚拟机和公共/私有云,但通常仅用于一个关闭环境。它提供了用于创建虚拟机的内聚文件。这样类似于厨师/木偶,但并没有大规模使用。

Vagrant, while also can be used to manage virtual machines and public/private clouds, is usually only used for one off environments. It provides a cohesive file for creating a virtual machine. It is similar to chef/puppet that way, but doesn't tend to be used at scale.

Docker是一个独立的野兽。它具有多个组件,但主要用于捆绑(注意:它的功能远不止于此,但这是ELI5的答案)软件,并且需要运行主机系统(或基础结构)。它为应用程序增加了一点安全性,但大多数情况下为运行应用程序提供了一致的操作系统。

Docker is a separate beast. It has several components, but primarily it is used for "bundling" (Note: it does much more than that, but that is an ELI5 answer) software and requires a host system (or infrastructure) to run on. It adds a little security to applications but mostly provides a consistent "OS" for an application to run on.

实际上,所有这些都可以在环境中使用。下面是一个示例:

In practice, all of these can be utilized in an environment. Here is an example:

假设您有应用程序FunTime。您有八位开发人员对此做出了贡献,并且FunTime旨在在AWS的可扩展基础架构上运行。它被设计为具有前端(FunTime-Front)和后端(FunTime-API),并且需要postgres。前端有4个开发人员,后端有4个开发人员。

Say you have application FunTime. You have eight developers who contribute to this, and FunTime is designed to be ran on a scale-able infrastructure on AWS. It is designed to have a front-end (FunTime-Front) and a back-end (FunTime-API), and requires postgres. 4 developers work on the front end, four developers work on the backend.

我将执行以下操作(有很多方法可以使这只猫皮肤化,但这是一个示例):

I would do the following (there are many ways to skin this cat, but this is one example):

我将Docker用于FunTime-Front和FunTime-API。我将使用Vagrant为开发人员设置开发环境(以便他们可以调整各种组件)。 Vagrant会:在本地(或需要的话,在云上)启动VM,安装docker,为FunTime-Front和FunTime-API下拉docker映像,安装postgres,并用虚拟数据填充postgres,将网络端口配置为各种组件。

I would use Docker for FunTime-Front and FunTime-API. I would use Vagrant to set up a dev environment for the developers (so that they can tweak various components). Vagrant would: start up the VM locally (or on a cloud if needed), Install docker, pull down the docker images for FunTime-Front and FunTime-API, install postgres, and populate postgres with dummy data, configure network ports to the various components.

现在,开发人员可以在其本地计算机上拥有完整的FunTime堆栈,而不必自己动手配置任何东西:他们只需输入 vagrant up即可。

Now the developer has the full FunTime stack on their local machine and doesn't have to screw around with configuring anything themselves: they can just type "vagrant up".

在基础架构方面,我将使用厨师(或木偶)来配置环境:
生产,阶段和开发(或任何需要的东西),然后Chef将docker安装在应用程序服务器上,将 postgres安装在postgres服务器上,应用安全设置等。这样,所有相关服务器都是相同的。如果我需要更新服务器或添加补丁,那么在配置管理中这将是微不足道的。

On the infrastructure side, I would use chef (or puppet) to configure the Environments: Production, Stage, and Development (or whatever is needed), then chef would install docker on the "application" servers, "postgres" on the postgres servers, apply security settings, etc. In this way all the related servers are the same. If I needed to update a server or add a patch, it would be trivial with configuration management.

在所有情况下都将使用Docker,因此,两者之间的应用程序没有区别环境,包括开发人员工作站。

In all cases Docker would be used so that there is no application difference between environments, including the developers work station.

这可以确保您不会听到好,它可以在我的本地计算机上运行!的借口。常常。此外,如果部署不合理,则使用Docker可以非常轻松地回滚应用程序。

This would make sure that you don't hear the excuse "Well, it works on my local machine!" very often. In addition, if there is a bungled deployment, rolling back the application would be VERY easy with Docker.

我希望能够提供更多有关如何使用它们的见解。

I hope that provides a little more insight into how they could be used.

这篇关于无业游民,码头工人,木偶,厨师的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆