Most probably you already know how to set up your machine to run Vagrant and a virtual development environment.
However, it’s not that clear what the workflow should be after you set it up.
Here it is a workflow that we use for our projects:
In other words, to properly use the Vagrant development environment, you should do the following:
- Install and set up Vagrant on your machine
- Tell Vagrant to copy your source code file to a guest OS by setting up synced folders in your Vagrantfile
- Run a guest OS:
vagrant up virtual_os_name
sshinto the guest OS:
vagrant ssh virtual_os_name
cdinto the synced folder on the guest OS
- Compile/run your code from within the synced folder on the guest OS (instead of doing that locally on your development machine as you are used to)
- Fix/modify your code on your development machine with your favourite text editor or IDE as usual (any changes you do to your local source files will be synced to the guest OS immediately)
- Repeat 6 and 7 if necessary.
Do you think you can agree with the gist of this article? Or maybe you have a different opinion on this? Then maybe you are the right person to join our team to work on original and interesting projects!