Crew Development Environment
This is a brief description of how to set up a development environment for Mass Pirate's crew site. Crew is based on Drupal an CiviCRM.
First, you'll need a copy of drupal 7. I'll assume you have it set up in a directory structure like this:
0 sunny:www$ ls -ld drupal7 0 lrwxrwxrwx 1 srevilak users 11 Apr 5 12:10 drupal7 -> drupal-7.36/
where drupal-7.36 is a directory containing a current drupal release (available from drupal.org).
Set up your site files:
mkdir -p masspirates.org/crew cd masspirates.org/crew ln -s ../../drupal7/* . rm sites git init git remote add origin ssh://firstname.lastname@example.org/home/members/masspirateparty/sites/masspirates.org/users/masspiratesweb/masspirates.org/include/git/crew.git git remote update git checkout -b master origin/master
You'll need to create a mysql (or mariadb) database and database user. Something like this should work:
create database mapp_drupal default character set utf8; create user 'mapp_drupal'@'localhost' identified by 'some-password'; grant all privileges on mapp_drupal.* to 'mapp_drupal'@'localhost';
You'll also need a web server configuration. Here's what I'm using (for an apache2 web server).
<Directory "/path/to/masspirates.org"> Options All AllowOverride all Require all granted </Directory>
<VirtualHost localhost:80> ServerName mapp.local DocumentRoot /path/to/masspirates.org RewriteEngine on <Directory /path/to/masspirates.org> AllowOverride all </Directory> </VirtualHost>
Don't forget the /etc/hosts entry for `mapp.local'.
At this point, http://mapp.local/crew should show you a drupal installation screen. Go through the installation process.
Once you've gone through the installation process:
- click Appearance (a menu item)
- Find the "Masspirates Drupal Theme". Click "Enable and set default"
- Click "Modules" menu item
- Enable: CiviCRM, CiviCRM Contact Reference Field, CiviCRM Theme, CiviMember Roles Sync, and Webform CiviCRM integration
- Drupal will tell you that a few additional modules need to be enabled. Let drupal enable them
Next: use http://mapp.local/crew/sites/all/modules/civicrm/install/index.php to start the CiviCRM installer.
Use the same connection information for both CiviCRM and Drupal databases (i.e., they should be served out of the same database).
From here, complete the CiviCRM installation.
At this point, you have a skeletal installation of Civicrm and drupal. Both applications rely heavily on the database for configuration; although you've got a copy of all the site code (via git), you don't have a copy of the database configuration. (These databases also have supporter PII, so not having copies is probably a good thing). However, you'll still be able to test out configuration changes, theme work, etc.
To work on the sites theme, change the files in crew/sites/all/themes/mapp. Create a new git branch, if you feel that's appropriate for your work.