Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.
/ druphpet Public archive

[The project is on hold] A Puppet-based Vagrant VM suitable for instant and unified configuration of Drupal environments.

License

Notifications You must be signed in to change notification settings

alehkot/druphpet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Install

  • 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.

Modification

  • 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.

Included

Optional

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.

Defaults

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 using vagrant 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

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.

Minimum requirements

  • Git
  • VirtualBox 4.3.10
  • Vagrant 1.5.4

Download links (Windows)

Known issues

  • 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.rb file (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 
  • If during vagrant up or vagrant reload you stuck with a looping error like this Error: Connection timeout. Retrying..., then delete all files except insecure_private_key in folder puphpet/files/dot and try again.

  • If during vagrant up or vagrant reload --provision or vagrant provision you get errors like default: Stderr: ==> default: error: Your local changes to the following files would be overwritten by checkout:, then delete all folders in puphpet/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 the VBoxManage 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
  • 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 to true.

About

[The project is on hold] A Puppet-based Vagrant VM suitable for instant and unified configuration of Drupal environments.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages