Need advice about which tool to choose?Ask the StackShare community!
Packer vs Vagrant: What are the differences?
Packer: Create identical machine images for multiple platforms from a single source configuration. Packer automates the creation of any type of machine image. It embraces modern configuration management by encouraging you to use automated scripts to install and configure the software within your Packer-made images; Vagrant: A tool for building and distributing development environments. Vagrant provides the framework and configuration format to create and manage complete portable development environments. These development environments can live on your computer or in the cloud, and are portable between Windows, Mac OS X, and Linux.
Packer and Vagrant are primarily classified as "Infrastructure Build" and "Virtual Machine Management" tools respectively.
Some of the features offered by Packer are:
- Super fast infrastructure deployment. Packer images allow you to launch completely provisioned and configured machines in seconds, rather than several minutes or hours.
- Multi-provider portability. Because Packer creates identical images for multiple platforms, you can run production in AWS, staging/QA in a private cloud like OpenStack, and development in desktop virtualization solutions such as VMware or VirtualBox.
- Improved stability. Packer installs and configures all the software for a machine at the time the image is built. If there are bugs in these scripts, they'll be caught early, rather than several minutes after a machine is launched.
On the other hand, Vagrant provides the following key features:
- Boxes
- Up And SSH
- Synced Folders
"Cross platform builds" is the top reason why over 24 developers like Packer, while over 354 developers mention "Development environments" as the leading cause for choosing Vagrant.
Packer and Vagrant are both open source tools. It seems that Vagrant with 18.6K GitHub stars and 3.74K forks on GitHub has more adoption than Packer with 9.1K GitHub stars and 2.47K GitHub forks.
According to the StackShare community, Vagrant has a broader approval, being mentioned in 802 company stacks & 478 developers stacks; compared to Packer, which is listed in 115 company stacks and 21 developer stacks.
Pros of Packer
- Cross platform builds27
- Vm creation automation9
- Bake in security4
- Good documentation1
- Easy to use1
Pros of Vagrant
- Development environments352
- Simple bootstraping290
- Free237
- Boxes139
- Provisioning130
- Portable84
- Synced folders81
- Reproducible69
- Ssh51
- Very flexible44
- Works well, can be replicated easily with other devs5
- Easy-to-share, easy-to-version dev configuration5
- Great3
- Just works3
- Quick way to get running2
- DRY - "Do Not Repeat Yourself"1
- Container Friendly1
- What is vagrant?1
- Good documentation1
Sign up to add or upvote prosMake informed product decisions
Cons of Packer
Cons of Vagrant
- Can become v complex w prod. provisioner (Salt, etc.)2
- Multiple VMs quickly eat up disk space2
- Development environment that kills your battery1