Tool for creating and managing virtual machines for development purpose.
You can setup specific os with specific provision scripts to build consistent dev environment.
First you need to create Vagrant file where you specify VM options and how you want to provision(Chef/Puppet/BASH/Ansible/Salt/Docker)
On vagrant up
vagrant will:
- Fetch/start specified VM
- Mount project directory to VM /vagrant folder
- Setup port forwarding specified in Vagrantfile
- Provision VM using way you have specified in Vagrantfile
- Checkout your project repository
- Install VirtualBox
- Install Vagrant
- Go to your repository directory from command line
- run
vagrant up
- wait... this take some time to download all files
- Start machine
vagrant up
- Save gracefully machine state
vagrant suspend
- Resume machine after suspend
vagrant resume
- Log in to the machine
vagrant ssh
repository files are mounted to/vagrant
folder - Destroy machine with
vagrant destroy
- Gracefully shut down the guest operating system and power down the guest machine with
vagrant halt
consider adding to Use Vagrant chapter:
vagrant halt
thx
hejhola