Skip to content

johnbburg/album

Repository files navigation

Web Starter Kit

This project has been setup to use a virtual machine for local development to closely mirror the production environment. To use the the virtual machine, follow these instructions.

Preparing your local environment

Getting Vagrant environment set up

Starting from within the root of your project (an existing project which already has a vagrant/puppet configured or starting a new project from the Drupal Starter Project), do the following:

  1. Create VM by running "vagrant up" (This step will take long (might be 5+ minutes) as all necessary components are being downloaded and installed)
  • If you get an error re-provision the VM by running "vagrant provision" to see if this resolves the issue
  1. SSH into VM by running "vagrant ssh"
  2. Navigate to VM docroot by running "cd /vagrant/public"
  3. Install Drupal using custom install profile by running "drush si [profile] -y" and following prompts. Alterntatively, use drush aliases to synch to a development instance of a site database.

Troubleshooting

Occasionally some issues may occur that prevent you from loading the virtual machine. Below are some common issues that others have experienced.

General

If the virtual machine does not boot up and you get a message saying there was a timeout, try launching the VM through the Virtualbox interface to get more detailed information.

Macintosh machines

  • If you experience errors when sharing the folder over NFS you may need to enable File Sharing in System Preferences -> Sharing
  • If you receive an error about an invalid export you may need to manually delete /etc/exports file
  • If you've updated to Mavericks and Virtualbox is no longer working, try the following command: sudo /Library/StartupItems/VirtualBox/VirtualBox restart
  • If you are prompted to enter your password when SSHing from the VM ensure your SSH private key is in the keychain by running "ssh-add -K ~/.ssh/id_rsa" from your machine

Linux machines

  • If you experience errors when sharing the folder over NFS you may need to install the appropriate NFS packages, on Ubuntu you will need to run "sudo apt-get install nfs-kernel-server"

Windows machines

  • Virtualbox requires the Intel Virtualization Technology for Directed I/O (VT-d) be enabled, if you receive a message saying that the VM requires a 64 bit processor and you only have an i686 processor this may be the cause
  • Virtualbox may trigger a Windows Firewall popup to allow ports to be shared
  • If the provisioning fails with errors on ports.conf or sites.xml this may be due to CRLF issues with the configuration files, to resolve this take the following actions:
    1. git config --global --edit
    2. Add line if missing: [core]
    3. Below that line add line: autocrlf = input
  • if your ssh key information does not correctly forward, you can copy your ssh private key to ~/.ssh and chmod it 700
  • if git says everything is changed, it's probably the line endings issues you've most likely seen before, doing "git add -u" should just remove them from the list (and not add them to be committed)

Drush Alias File

An example alias file to connect with a Drupal site running in Virtualbox:

$aliases['local'] = array(
  'parent' => '@parent',
  'uri' => 'http://10.11.12.14',
  'root' => '/vagrant/public',
  'remote-host' => '10.11.12.14',
  'remote-user' => 'vagrant',
  'ssh-options' => "-i ~/.vagrant.d/insecure_private_key -l vagrant",
  'db-url' => 'mysql://web:[email protected]:3306/web',
  'databases' => array (
    'default' => array (
      'default' => array (
        'database' => 'web',
        'username' => 'web',
        'password' => 'web',
        'host' => '10.11.12.14',
        'port' => '',
        'driver' => 'mysql',
        'prefix' => '',
      ),
    ),
  ),
);

About

A drupal site for managing photos.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published