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,
C:\Windows\System32\drivers\etc\hosts
):
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.
192.168.9.10 [yourhost]
- In the folder with Druphpet in your command line execute
vagrant up
. - 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.
- Execute
vagrant provision
. - Execute
vagrant reload
.
- Ubuntu 64-bit Precise 14.04
- Drush 7.x
- Apache 2.4.x
- PHP 5.6.x with extensions:
- (debugger, pecl) XDebug
- (profiler, tool, pecl) XHProf
- (pecl) SOAP
- (pecl) Uploadprogress
- (pecl) APCu
- (pecl) Memcached
- (tool, PEAR) PHP_CodeSniffer
- (PEAR) PHP_Console_Table
- Apache Solr 4.x
- OPCacheGUI
- PHPMemcacheAdmin
- MySQL 5.6.x
- dos2unix
- Percona Toolkit
- phpMyAdmin
- PimpMyLog
- MailCatcher
- ImageMagick
- Webgrind
- Curl
- Sendmail
- Unzip
- Git
- Siege
- Graphviz
- Vsftpd
- MC
- Vim
- Samba Server
- Memcached
- 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.
Hosts
FTP
- 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 up
it's recommended to reboot the VM usingvagrant reload
.
Mailcatcher
Xdebug
- 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.
XHProf
PimpMyLog
Memcached
- host: localhost (from VM)
- port: 11211
Phpmyadmin
Webgrind
OPCacheGUI
- http://opcachegui.druphpet.dev
- username: druphpet
- password: druphpet
PHPMemcacheAdmin
RabbitMQ
- port: 5672
Apache Solr
Samba server share (default)
- \\192.168.9.10\data
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: smb://192.168.9.10/data
Varnish
- 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.
- Git
- VirtualBox 4.3.10
- Vagrant 1.5.4
- 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 Vagrantenvironment.rb
file (e.g. directory locationc:\Vagrant\embedded\gems\gems\vagrant-1.7.3\lib\vagrant\util\
) and replacedef 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
-
If during
vagrant up
orvagrant reload
you stuck with a looping error like thisError: Connection timeout. Retrying...
, then delete all files exceptinsecure_private_key
in folderpuphpet/files/dot
and try again. -
If during
vagrant up
orvagrant reload --provision
orvagrant provision
you get errors likedefault: Stderr: ==> default: error: Your local changes to the following files would be overwritten by checkout:
, then delete all folders inpuphpet/puppet/modules
folder except.gitkeep
file and try again. -
Windows-only, to enable Samba, follow the instuctions in Vagrantfile.
-
Windows-only, if during
vagrant up
you 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:
vagrant ssh
sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions
exit
vagrant reload
-
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 up
under Cygwin shell (an example location is 'c:\cygwin64\Cygwin.bat'). -
Windows only, if during
vagrant up
using Cygwin you receive an error about "nio4r", execute the following statements:export NIO4R_PURE="yes"
-
Windows-only, if you receive the following error:
"Vagrant uses the
VBoxManage
binary that ships with VirtualBox, and requires this to be available on the PATH. If VirtualBox is installed, please find theVBoxManage
binary and add it to the PATH environmental variable."
-
during
vagrant up
execution, 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:
- PHP:
ssh -R 9000:localhost:9000 vagrant@druphpet.dev
- NodeJS:
ssh -L 5858:127.0.0.1:5858 vagrant@druphpet.dev -N
- PHP:
-
It is strongly recommended to reboot the VM after successful provisioning using
vagrant reload
. -
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 totrue
.