This is the vagrant build used as maintainer's work environment. It contains of 3rd party cookbooks (no berks used) which were copied right into this project.
Own cookbooks are:
- drupal_build
- drupal_sitelaunch
Ubuntu 14.04. Actually nothing prevents you from using any other box however this build wasn't tested anywhere except Ubuntu 14.04.
This cookbook is used to prepare the entire environment for running Drupal 7 websites. It contains of:
- curl, vim, jq - my scripts depend on these packages also they are very useful
- apache2 (with mod_rewrite)
- php (with php- curl, gd, mysql, mcrypt, common, cgi, cli, dev, gmp, libapache2-mod-php5)
- mysql-service to run websites
- drush
- nodejs
- xdebug
- TODO: phpmyadmin
This cookbook is used to launch Drupal websites. You should provide cookbook with appropriate json config file (see /data_bags/drupal_sitelaunch_sites/example.json): one .json file per website. Then website could be easily built or updated using drlaunch
command. Cookbook contains of:
- Adds
drlaunch
command - alias of appropriate shell script. - Parses all json files in data_bags/drupal_sitelaunch_sites and creates virtualhost file for apache2 and creates drush alias for that site.
This command is used to launch or update existing website. Usage:
drlaunch -s [sitename] [flags]
Where sitename
is name of json file (without extension). E.g. for my_project.json file sitename = my_project
.
Available flags:
-uob, --use-old-backup:
Use old backup if exists.
- Creates DB for website if doesn't exist.
- Creates website directory in /var/www. The entire build intends that you better keep project directory inside /public directory. In this case if website directory was not exist it will be copied from appropriate directory in /public. E.g. if you clone website from repository and call it "my_project" put it into /public directory of vagrtem project and set up your IDE to synchronize with /var/www/my_project on vagrant machine.
- Creates "files" directory in website_dir (see data_bags/drupal_sitelaunch_sites/example.json for details). Creates temp/private subdirectories inside that folder usually used on Drupal websites. Sets 777 permissions to the entire project.
- Enables site (a2ensite). Reloads apache2 if website wasn't enabled before this command.
- If Acquia support has been enabled this script will connect to Acquia, download the most recent backup, extract archive and migrate it into Drupal website. Notice that it doesn't export Acquia DB - it loops over DB backups using Acquia API. Furthermore this script doesn't remove downloaded backup archive. You can use
-uob
flag to not download backup from Acquia again and use local version. That's handy if you are working with project during the day and don't want to download backup few times a day (maybe your internet connection is poor as well or/and DB backup is too heavy?). - Updates Drupal admin user password and sets it to "admin".
- Clears all caches.
- Notifies you to not forget to put website URL into hosts file of your machine. Why not?