vagrant不是唯一的管理虛擬機(jī)和開(kāi)發(fā)環(huán)境的工具昧辽。這一章比較vagrant和其他軟件的選擇厕宗。
Vagrant is not the only tool to manage virtual machines and development environments. This section compares Vagrant to these other software choices.
由于比較的偏差财剖,我們?cè)噲D只是用事實(shí)。 如果您在比較中發(fā)現(xiàn)無(wú)效或過(guò)期的內(nèi)容剖张,請(qǐng)提出問(wèn)題,我們會(huì)盡快處理阅懦。
Due to the bias of the comparisons, we attempt to only use facts. If you find something that is invalid or out of date in the comparisons, please open an issue and we'll address it as soon as possible.
使用左側(cè)導(dǎo)航閱讀與同類軟件的比較。
Use the navigation on the left to read comparisons of Vagrant versus simliar software.
Vagrant vs. CLI Tools
虛擬化軟件(如VirtualBox和VMware)一般都附帶有命令行實(shí)用程序徘铝,用于管理其平臺(tái)上的機(jī)器的生命周期耳胎。 許多人利用這些實(shí)用程序編寫自己的自動(dòng)化。 Vagrant實(shí)際上在內(nèi)部使用了許多這些實(shí)用程序惕它。
Virtualization software like VirtualBox and VMware come with command line utilities for managing the lifecycle of machines on their platform. Many people make use of these utilities to write their own automation. Vagrant actually uses many of these utilities internally.
這些CLI工具和Vagrant之間的區(qū)別在于怕午,Vagrant以許多方式構(gòu)建在這些實(shí)用程序之上,同時(shí)仍然提供一致的工作流程. Vagrant支持多種文件夾同步類型淹魄,多個(gè)機(jī)器配置方式郁惜,自動(dòng)SSH設(shè)置,在您的開(kāi)發(fā)環(huán)境中創(chuàng)建HTTP隧道等等揭北。 所有這些可以使用一個(gè)簡(jiǎn)單的配置文件進(jìn)行配置扳炬。
The difference between these CLI tools and Vagrant is that Vagrant builds on top of these utilities in a number of ways while still providing a consistent workflow. Vagrant supports multiple synced folder types, multiple provisioners to setup the machine, automatic SSH setup, creating HTTP tunnels into your development environment, and more. All of these can be configured using a single simple configuration file.
即使您忽略Vagrant提供的所有更高級(jí)功能,Vagrant仍然會(huì)對(duì)手動(dòng)腳本進(jìn)行一些改進(jìn)搔体。虛擬化軟件提供的命令行工具通常會(huì)更改每個(gè)版本或具有解決方法的微妙錯(cuò)誤恨樟。Vagrant自動(dòng)檢測(cè)版本,使用正確的標(biāo)志疚俱,并可以解決已知問(wèn)題劝术。 所以如果你使用的是一個(gè)版本的VirtualBox,同事們使用的是不同的版本呆奕,Vagrant仍然會(huì)一直工作养晋。
Vagrant still has a number of improvements over manual scripting even if you ignore all the higher-level features Vagrant provides. The command-line utilities provided by virtualization software often change each version or have subtle bugs with workarounds. Vagrant automatically detects the version, uses the correct flags, and can work around known issues. So if you're using one version of VirtualBox and a co-worker is using a different version, Vagrant will still work consistently.
對(duì)于不經(jīng)常更改的高度特定的工作流程,維護(hù)自定義腳本仍然有益梁钾。 Vagrant旨在構(gòu)建開(kāi)發(fā)環(huán)境绳泉,但一些高級(jí)用戶仍然使用CLI工具來(lái)執(zhí)行其他手動(dòng)操作。
For highly-specific workflows that don't change often, it can still be beneficial to maintain custom scripts. Vagrant is targeted at building development environments but some advanced users still use the CLI tools underneath to do other manual things.