Skip to content

Instantly share code, notes, and snippets.

@dergachev
Last active December 19, 2015 00:39
Show Gist options
  • Save dergachev/5870426 to your computer and use it in GitHub Desktop.
Save dergachev/5870426 to your computer and use it in GitHub Desktop.

Testing vagrant_drupal - Jun 26

  • need to have berkshelf installed (update README?) gem install berkshelf # got warning about minitar binary conflict, but it let me override existing vagrant plugin install vagrant-berkshelf
  • pull the attributes back into Vagrantfile
    • remove unnecessary attributes override from dna.json (eg. fga)
  • installing chef-11 failed: Error installing chef: Failed to build gem native extension. sh: 1: make: not found
  • vagrant ssh -- 'cd /var/shared/sites/cooked.drupal/site' fails due to perms
    • it's actually owned www-data:drupal-dev, but vagrant is not in drupal-dev (BUG!?)
  • consider inlining the drush cookbook, to simplify our Berksfile/Cheffile
  • should '/usr/local/bin/drupal-perm.sh' really be owned by www-data? instead, root
  • figure out how to move DB credentials to settings-priv.php settings-priv.php exists (how to gittify otherwise)?

Complete steps

git clone https://github.com/amirkdv/vagrant_drupal.git
cd vagrant_drupal

# install berkshelf
gem install berkshelf --no-rdoc --no-ri
vagrant plugin install vagrant-berkshelf

vim Vagrantfile # add `apt-get install -y build-essential`
vagrant up
curl localhost:8080 # have Drupal, port is 2201 for me due to conflicts with other VMs

SK notes

  • need curl/git/vim
  • precise64-customized (if so, check that permissions work with new setup)
  • settings-priv.php
  • apt-get install -y sass compass
  • setting up database backups
    • drush sql-dump --gzip --result-file
    • config.vm.synced_folder "drush-backups", "/home/vagrant/drush-backups/"

git-ifying the repo - currently has to happen manually

echo -e "settings-priv.php sites/default/files" >> .gitignore
git init
git add .
git commit -m "Initial commit."
git remote add origin $REPO_URL
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment