Skip to content

drupal-ukraine/ppdorg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ppdorg project

ppdorg project is for getting drupal.org and github.com commits statistics for a list of users

(minimal version of installed Vagrant should be 1.8.1)

You could start your work with

vagrant up
vagrant ssh

If system will ask you a password - use "vagrant" pass phrase.

Drupal project is located at /var/www/docroot folder.

use

sh reinstall.sh

for drupal reinstallation from scratch

Virtual host for accessing ppdorg drupal installation

http://ppdorg.192.168.56.112.xip.io

If xip.io not working - create row with

192.168.56.112 ppdorg.192.168.56.112.xip.io

in /etc/hosts Drupal Vagrant Dev box for CIbox support

#Installation

#Usage

vagrant up && vagrant ssh

Drupal reinstallation from scratch

Unix users

sh reinstall.sh

Windows users

sh reinstall.sh --windows

By default your site will be accessible by using this url.

http://ppdorg.192.168.56.112.xip.io/

If xip.io not working - create row with

192.168.56.112 ppdorg.192.168.56.112.xip.io

in /etc/hosts or just use another ServerName in apache.yml

If you have Vagrant HostUpdater plugin, your hosts file will be automatically updated.

VirtualBox additions

For automatic update additions within guest, please install proper plugin

vagrant plugin install vagrant-vbguest

Tools

  • XDebug
  • Drush
  • Selenium 2
  • Composer
  • Adminer
  • XHProf
  • PHP Daemon
  • PHP, SASS, JS sniffers/lints/hints

##Adminer Adminer for mysql administration (credentials drupal:drupal and root:root)

http://192.168.56.112.xip.io/adminer.php

##PHP Profiler XHProf It is installed by default, but to use it as Devel module integration use:

drush en devel -y
drush vset devel_xhprof_enabled 1
drush vset devel_xhprof_directory '/usr/share/php' && drush vset devel_xhprof_url '/xhprof_html/index.php'
ln -s /usr/share/php/xhprof_html xhprof_html

After vset devel_xhprof_enabled it could return an error about "Class 'XHProfRuns_Default' not found" - ignore it.

Linux Containers

When your system enpowered with linux containers(lxc), you can speedup a lot of things by using them and getting rid of virtualization. For approaching lxc, please install vagrant plugin

vagrant plugin install vagrant-lxc
apt-get install redir lxc cgroup-bin

also you may need to apply this patch fgrehm/vagrant-lxc#354

When your system is enpowered by apparmor, you should enable nfs mounts for your host machine Do that by editing /etc/apparmor.d/lxc/lxc-default file with one line

profile lxc-container-default flags=(attach_disconnected,mediate_deleted) {
  ...
    mount options=(rw, bind, ro),
  ...

and reload apparmor service

sudo /etc/init.d/apparmor reload

and run the box by command

VAGRANT_CI=yes vagrant up

Do use

VAGRANT_CI=yes

environment variable, if you got issues with all vagrant commands.

Windows Containers

Install Cygwin according to provided steps.

Run Cygwin as Administrator user.

Use default flow to up Vagrant but run sh reinstall.yml --windows

##Windows troubleshooting

If you will see error liek ...[error 26] file is busy... during sh reinstall.sh modify that line:

before

name: Stage File Proxy settings
sudo: yes
lineinfile: dest='sites/default/settings.php' line='$conf[\"stage_file_proxy_origin\"] = \"{{ stage_file_proxy_url }}";'

after:

name: Copy settings.php
sudo: yes
shell: cp sites/default/settings.php /tmp/reinstall_settings.php

name: Stage File Proxy settings
sudo: yes
lineinfile: dest='sites/default/settings.php' line='$conf[\"stage_file_proxy_origin\"] = \"{{ stage_file_proxy_url }}\";'

name: Restore settings.php
sudo: yes
shell: cp /tmp/reinstall_settings.php sites/default/settings.php

MacOS users

Install vagrant

https://www.vagrantup.com/downloads.html

Install Virtualbox from here:

https://www.virtualbox.org/wiki/Downloads

cd to project folder

vagrant up && vagrant ssh

You will be logged into virtual machine.

Go to this path

/vagrant/docroot

and run the script

sh reinstall.sh

for drupal reinstall from scratch.

Configure Stage File Proxy to use the files from the correct source.