Installing Your Drupal Project On Project Mercury

Events happening in the community are now at Drupal community events on www.drupal.org.
You are viewing a wiki page. You are welcome to join the group and then edit it. Be bold!

With the release of Project Mercury BETA, I figured it was probably high time I answered the #1 request for documenteation: "how do I put my existing Drupal site onto Mercury?" This wiki has step-by-step instructions for a few ways of handling this. Your mileage may vary of course depending on what all your site does, but this should at the very least give you a good orientation to get started.

Method 1: Install over Pressflow

A quick way to get rolling is to install your site over the top of the existing Pressflow Drupal instance that comes with the Mercury EC2 image. This is good if you have a simple site, and aren't concerned with managing the codebase with SVN or other version control going forward.

First of all, you'll want to update the Apache vhost so that the root of the site is no longer pointing at the initial Mercury splash page. You want your site to come up on the domain, not our intro! To accomplish this, edit the file /etc/apache2/sites-available/default and change the DocumentRoot and Directories from

 /var/www

to

 /var/www/pressflow

Then restart Apache like so:

 /etc/init.d/apache2 restart

You might also want to change the root mysql password at this time. Instructions for that are in the README; you'll need to update /var/www/pressflow/sites/default/settings.php to include the new credentials if you change this.

Next you'll need to scp (or use an sftp client like Transmit, Filezilla, or the like) a mysqldump of your existing site, and the contents of your files directory as well as any contributed/custom modules and themes you run, onto the server. You should load the dump over the top of the pressflow database (including updated credentials as needed):

 mysql -u root pressflow < my_site_dump.sql

Then place your contrib modules in /var/www/pressflow/sites/all/modules and themes in sites/all/themes, like so:

cp -R my_site_modules/* /var/www/pressflow/sites/all/modules/
cp -R my_site_themes/* /var/www/pressflow/sites/all/themes/

Lastly, place the files directory wherever your drupal site expects it. Note you will probably to reset the ownership of this directory so Apache can still maintain it (assuming the location you expect is sites/all/files):

chown -R www-data /var/www/pressflow/sites/all/files

You should now be able to load the EC2 public DNS name and get your site. If you did not previously have the Apache Solr and Cacherouter modules enabled, you will need to enable and configure them (see step #11 here). You should also confirm that the paths specified under Administer->Site configuration->File system are valid and writeable by the www-data user. The last bit of configuration is to log in, go to admin/settings/performance, and set caching to aggressive as well as defining a max page age. This will allow Varnish to start picking up whole pages for your logged-out users.

It will take longer than gzipping the folder and copying it but, I found using wget -r ftp://user:pass@domain/path/to/sites to be a simplier approach -- nullvariable

Method 2: Install from scratch

This is not really any different from installing a normal Drupal site, except you need to use pressflow and configure the caching settings as above. If you are deploying out of version control, first of all congratulations for following best practices. You'll need to integrate Pressflow as a replacement for your Drupal core, but this is pretty easy. It should just drop right in.

Mercury isn't hobbled or limited in any way. You can set up as many virtualhosts as you like, run multisite, start other services, etc. It's a full Ubuntu box, and you've got root! :)

Troubleshooting

You may have problems if you have modules or javascript includes which set additional cookies.

Now you might want to pursue adding an EBS volume to your instance.

Mercury

Group organizers

Group categories

Post Type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: