What is Vagrant?
Vagrant is one of the tools available to automate VM creation and management. With Vagrant, we can configure the VM’s properties like CPU, memory, and storage by writing a script. We can extend these scripts and create multiple VMs
in one shot with the same or slightly different configurations.
Apart from CPU, memory, and storage, we can do more about the VMs using Vagrant scripts. For example,
- We can assign an IP address for the VM
- Define a hostname for the VM
- Install standard software or applications inside the VM being created.
And many more…
Vagrant can be downloaded from this link. You further need to click on the tabs with respect to your host operating system. For example, if you are running your host machine with Windows, then select the Windows tab and then click on the download link.
Once downloaded, install the Vagrant by following the steps in the installation wizard. Along with Vagrant, you need a terminal to execute the commands. Though you have a command prompt in windows, it is recommended to use the Git Bash terminal.
To get Git Bash, we need to install Git. Git is software used to track the changes of files, and coordinate work between developers during software development. You can download Git from this link. Once you are on the download page, click on the link with respect to your hosting OS.
After downloading the Git, start installing it by following the steps from the installation wizard. During the installation, in one of the steps, select the below-highlighted options.
Follow the remaining steps and complete the installation. Once installed, you can find the Git Bash in the start menu by searching with “git bash” as shown below.
Finally, ensure that the Windows Path Environment Variable is having the paths of Vagrant and Git, as shown below. If not found, add the same manually.
So, You have installed Vagrant and Git bash now. Restart the computer to get the latest installations working.
Conclusion
If you are interested in learning automation, Vagrant is a good choice to start with. It is an easy automation tool to create Virtual Machines in an automated way. Additionally, Git bash will allow you to run the Unix command in Windows. If you want to learn about Infra automation, you can register one of our online as Infra automation.