使用 Vagrant,为什么 puppet 配置比自定义打包的盒子更好? [英] Using Vagrant, why is puppet provisioning better than a custom packaged box?

查看:24
本文介绍了使用 Vagrant,为什么 puppet 配置比自定义打包的盒子更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个虚拟机来模拟我们的生产网络服务器,以便我可以与新开发人员共享它,让他们尽快上手.我已经阅读了 Vagrant 文档,但是我不明白使用通用基本框并使用 Puppet 配置所有内容与将自定义框与已经安装和配置的所有内容打包相比的优势.我能想到的只有;

I'm creating a virtual machine to mimic our production web server so that I can share it with new developers to get them up to speed as quickly as possible. I've been through the Vagrant docs however I do not understand the advantage of using a generic base box and provisioning everything with Puppet versus packaging a custom box with everything already installed and configured. All I can think of is;

使用 Puppet 与自定义包装盒的优势

  • 易于让每个人保持最新状态 - 能够将清单放在版本控制并共享 repo,以便其他开发人员可以只需拉取新的更新并重新运行 puppet,即无业游民提供".
  • 环境记录在清单中.
  • 能够使用生产环境中定义的 puppet 模块来确保相同的环境.

使用 Puppet 与自定义包装盒的缺点

  • 编写清单比简单地安装和花费更长的时间配置自定义打包盒.
  • 第一次构建虚拟机需要更长的时间puppet 而不是简单地下载一个自定义打包的盒子.

我觉得我一定遗漏了一些重要的细节,你能再想一下吗?

I feel like I must be missing some important details, can you think of any more?

推荐答案

优势:

由于依赖关系可能会随着时间的推移而改变,从头开始构建一个新的盒子将涉及手动删除软件包,或者将盒子扔掉并重新手动重复安装过程.您显然可以使用 bash 或其他类型的脚本自动安装,但您将调用本机操作系统包管理器,这意味着它只能在您选择的操作系统上运行.换句话说,你被限制在 ;)

As dependencies may change over time, building a new box from scratch will involve either manually removing packages, or throwing the box away and repeating the installation process by hand all over again. You could obviously automate the installation with a bash or some other type of script, but you'd be making calls to the native OS package manager, meaning it will only run on the operating system of your choice. In other words, you're boxed in ;)

据我所知,Puppet(如 Chef)包含一种通用且与操作系统无关的安装包的方式,这意味着清单可以在不同的操作系统上运行而无需修改.

As far as I know, Puppet (like Chef) contains a generic and operating system agnostic way to install packages, meaning manifests can be run on different operating systems without modification.

此外,这些相同的脚本可用于配置生产机器,这意味着开发机器和生产机器实际上是相同的.

Additionally, those same scripts can be used to provision the production machine, meaning that the development machine and production will be practically identical.

缺点:

当您可能不打算切换操作系统或生产环境时,不得不学习另一种 DSL.您必须决定这些优势是否值得您花时间进行设置.就我个人而言,我认为拥有一个抽象且可重复的包管理/配置策略将在未来为我节省大量时间,但 YMMV.

Having to learn another DSL, when you may not be planning on ever switching your OS or production environment. You'll have to decide if the advantages are worth the time you'll spend setting it up. Personally, I think that having an abstract and repeatable package management/configuration strategy will save me lots of time in the future, but YMMV.

这篇关于使用 Vagrant,为什么 puppet 配置比自定义打包的盒子更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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