Druphpet Virtual Machine
A very fast and Puppet-based Drupal-ready VM suitable for instant and unified configuration of local environments. The ultimate goal of Druphpet is to provide a powerful set of tools out-of-the-box to develop typical enterprise websites with Drupal. You can easily add sites, databases, packages, etc. simply be editing
puphpet/config.yaml file in YAML format.
Based on VMs by Puphpet.
The VM includes the fastest option available to synchronize folders in Windows - via SMB share. Please find the instructions below on how to map a network drive.
- Make sure you have the most recent versions of VirtualBox and Vagrant installed (see 'minimum requirements' section).
- Clone the repository
git clone https://github.com/alehkot/druphpet.git.
- Add any number of Apache hosts and databases you want in appropriate sections of 'puphpet/config.yaml' file.
- Edit your hosts file and add entries for the following (on Windows,
192.168.9.10 druphpet.dev 192.168.9.10 phpmyadmin.druphpet.dev 192.168.9.10 webgrind.druphpet.dev 192.168.9.10 opcachegui.druphpet.dev 192.168.9.10 phpmemcacheadmin.druphpet.dev 192.168.9.10 pimpmylog.druphpet.dev
- Add your hosts, e.g.
- In the folder with Druphpet in your command line execute
- Important! In case of any errors during the initial setup, try to run provision the VM once again:
vagrant reload --provision. It usually resolves any issues. In the worst case, please follow the instructions in Known issues.
- If you later decide to expose your VM to the internet, then follow the instructions on Vagrant Share.
- In case you later decide to add new hosts, PHP packages and/or install an additional software, then edit 'puphpet/config.yaml' file.
- Ubuntu 64-bit Precise 14.04
- Drush 7.x
- Apache 2.4.x
- PHP 5.6.x with extensions:
- Apache Solr 4.x
- MySQL 5.6.x
- Percona Toolkit
- Samba Server
- Ruby 1.9.3 using RVM with gems:
- Node.js with packages:
There are the following modules are also preconfigured, but disabled by default:
You can edit
puphpet/config.yaml file and execute
vagrant reload --provision to enable the software. Moreover, using this file you can switch from Apache web server to Nginx (but some exclusive Druphpet features might become unavailable, because they are preconfigured for Apache) and/or install additional software packages and PHP extensions.
- Host: 192.168.9.10
- User: vagrant
- Pass: vagrant
Database Credentials (MySQL, PostgreSQL)
- Host: 192.168.9.10
- Name: druphpet
- User: druphpet
- Pass: druphpet
- To connect using a MySQL client other than Phpmyadmin, after initial
vagrant upit's recommended to reboot the VM using
- Xdebug is configured to automatically connect back to host if XDEBUG_SESSION_START query parameter is set, e.g. if you access http://druphpet.dev/index.php?XDEBUG_SESSION_START=PHPSTORM.
- To use Xdebug with Jetbrains PHPStorm please follow the instructions.
- If upon accessing pages of your website XDEBUG_SESSION_START Xdebug ignores breakpoints you set in your IDE, it might be a case of a misconfigured firewall in your host environment. Try disabling the firewall to see if the issue is resolved.
- host: localhost (from VM)
- port: 11211
- username: druphpet
- password: druphpet
- port: 5672
Samba server share (default)
On Windows, after
vagrant up, you can just open "My computer", click "Map network drive" and enter the address above.
On Mac, In the Finder, choose Go > 'Connect to Server.' Type the following network address:
- Varnish proxifies all requests from port 8080 to port 80, e.g. you can access http://192.168.9.10:8080/webgrind.
- You can edit its config in '/etc/varnish/default.vcl' file.
- VirtualBox 4.3.10
- Vagrant 1.5.4
Download links (Windows)
- If you use Vagrant 1.7.3 on Windows and get an error regarding
chown: changing ownership of ???/vagrant???: Not a directory, then patch your Vagrant
environment.rbfile (e.g. directory location
c:\Vagrant\embedded\gems\gems\vagrant-1.7.3\lib\vagrant\util\) and replace
def windows_unc_path(path)method with the following:
# Converts a given path to UNC format by adding a prefix and converting slashes. # @param [String] path Path to convert to UNC for Windows # @return [String] def windows_unc_path(path) path.gsub('/', '\\') end
vagrant reloadyou stuck with a looping error like this
Error: Connection timeout. Retrying..., then delete all files except
puphpet/files/dotand try again.
vagrant reload --provisionor
vagrant provisionyou get errors like
default: Stderr: ==> default: error: Your local changes to the following files would be overwritten by checkout:, then delete all folders in
.gitkeepfile and try again.
Windows-only, to enable Samba, follow the instuctions in Vagrantfile.
Windows-only, if during
vagrant upyou receive the following error:
"Failed to mount folders in Linux guest. This is usually because the "vboxsf" file system is not available. Please verify that the guest additions are properly installed in the guest and can work properly."
execute the following statements:
sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions
Windows-only, to enable "rsync", install the latest version of Cygwin and in setup wizard pick "rsync" package to be installed (it's not included by default). Because Vagrant on Windows uses Cygdrive for rsync, you should
vagrant upunder Cygwin shell (an example location is 'c:\cygwin64\Cygwin.bat').
Windows only, if during
vagrant upusing Cygwin you receive an error about "nio4r", execute the following statements:
Windows-only, if you receive the following error:
"Vagrant uses the
VBoxManagebinary that ships with VirtualBox, and requires this to be available on the PATH. If VirtualBox is installed, please find the
VBoxManagebinary and add it to the PATH environmental variable."
vagrant upexecution, then execute the following command:
set PATH=%PATH%;C:\Program Files\Oracle\VirtualBox
If you experience problems with remote debugging (PHP, NodeJS) and don't want (or can't) configure your firewall try creating SSH-tunnels as following:
ssh -R 9000:localhost:9000 email@example.com
ssh -L 5858:127.0.0.1:5858 firstname.lastname@example.org -N
It is strongly recommended to reboot the VM after successful provisioning using
In case of a public key warning with the previous commands try to delete your known_hosts file.
You can change the sync_modules variable to false after the first time your box is provisioned.
If you receive the error
Error: Unknown function loadyaml, switch 'sync_modules' property in config.yaml to