
Vagrant is a tool that provisions virtual machines in a scripted way, so that the machines can be rolled out to a team of developers, or as nodes of a cluster, with ease. In this first article, we'll discuss Vagrant. At the end I'll provide you a few scenarios of how to work with these tools to set up consistent environments.

This series of articles will attempt to explain what these tools do and why you may want to investigate using them. See this issue for details and tests results.As a developer, you've probably heard about Vagrant, Docker, Chef and other VM and container tools. Virtualbox is also much simpler than nfs since it's built-into VirtualBox and requires no other software or configuration. While nfs is the default mount type, the virtualbox method might offer better I/O performance on Linux hosts (up to 9x faster writes and 25x faster reads). NFSįor more NFS details and troubleshooting, see the official Vagrant docs. We suggest trying differet options and seeing what works best for you. Whenever you change the mount type on an existing Vagrant box, you need to run vagrant reload for the changes to take affect (or destroy and create a new one). To change the mount type for synced folders, you can change the vagrant_mount_type configuration option: vagrant_mount_type: nfs Vagrant supports different types of mount options for synced folders like NFS, SMB, and Virtualbox's native option.īy default, Trellis tries to default to NFS because it offers the best performance for macOS users. Trellis uses Vagrant's synced folder feature to sync folders from your local machine (like your Trellis project itself) to the virtual machine. You'd then run vagrant up from the project-specific directory. If you want to have 1 Vagrant VM per project/site, you should make copies of the Vagrantfile and put them into each project's dir. Generally, if you want to have multiple sites on 1 Vagrant VM, you should keep the Vagrantfile where it is (in the trellis dir). The example Vagrantfile in this project can be kept in this folder or moved anywhere else such as a project/site folder. To make local overrides, create a file with any overrides


Install the Vagrant provider: vagrant plugin install vagrant-parallelsĮditing the Vagrantfile directly should be avoided unless necessary.If you'd like to support Roots, please purchase Parallels Pro through our affiliate link
