Integration with Vagrant helps you create reproducible development environments defined by VagrantFile configuration files. To have the same environment set up on the machines of all the team members you only need to put the VagrantFile under your team version control. Any team member can set up the required environment by running the vagrant up command with the relevant VagrantFile. Vagrant support in PyCharm is provided through the Vagrant plugin that comes bundled with PyCharm.
In this section:
- Creating and Removing Vagrant Boxes
- Initializing Vagrant Boxes
Before you start working with Vagrant, make sure that Vagrant plugin is enabled.
The plugin is bundled with PyCharm and activated by default. If it is not, enable the plugin.
Besides that, make sure that the following prerequisites are met (outside of PyCharm):
- Oracle's VirtualBox is installed on your computer.
- Vagrant is installed on your computer, and all the necessary infrastructure is created.
- The parent folders of the following executable files are added to the system PATH variable:
- vagrant.bat or vagrant from your Vagrant installation. This should be done automatically by the installer.
- VBoxManage.exe or VBoxManage from your Oracle's VirtualBox installation.
Once the Vagrant plugin is enabled, the following changes are made to the PyCharm UI:
- A Vagrant page is added to the Settings dialog.
- A Vagrant node is added to the menu. The node contains the following commands
that correspond to the standard Vagrant actions:
Vagrant support in PyCharm features: