A node.js based generator to simplify the creation of VM instance for Drupal development using Vagrant, Ansible, and DrupalVM.
- Unix-based OS(tested on Ubuntu and OS X)
- Vagrant
- VirtualBox
- Ansible
- Vagrant plugins:
- hostsupdater (
vagrant plugin install vagrant-hostsupdater
) - auto_network (
vagrant plugin install vagrant-auto_network
)
- NodeJS(npm):
For Ubuntu - http://tecadmin.net/install-latest-nodejs-npm-on-ubuntu/
For OSX -
brew install node
- Install the vmgen package in your system -
npm install -g vmgen
- Create directory 'projects' at your home('
') directory, so it's should be "/projects/" - Under projects directory create your project directory, named as machine name of your project for example "~/projects/my_project/"
cd ~/projects/my_project
- Create a directory 'docroot' in this directory and put there all your Drupal code, and ensure that /docroot is a drupal's root directory.
- From the ~/projects/my_project directory run
vmgen my_project PHP_VERSION
, where PHP_VERSION can be 5.6, 7 or 7.1 according to supported PHP versions - Now you can see a new directory under ~/projects/my_project - "vm", just cd into that directory and run
vagrant up
to start VM installation, once it's complete you should be able to access your VM viavagrant ssh
from the "vm" directory.
Any additional information about VM you can find here - https://github.com/geerlingguy/drupal-vm