Update:Remora Server Requirements

From MozillaWiki
(Redirected from Update:Installation)
Jump to: navigation, search

NOTE!!!!!

This page is out of date and points to software that is no longer in use. For up-to-date information see this page.


Server Software

Installation

Main Site

Apache

  • Set your DocumentRoot for the main site:
DocumentRoot /opt/yourpath/site/app/webroot
  • Either make sure you AllowOverride for .htaccess files, or copy the .htaccess files to the vhost.conf -- they are in site/, site/app/ and site/app/webroot/

SVN, DB and app config

  • Check out the site from trunk (for now):
svn co http://svn.mozilla.org/addons/trunk/ /opt/yourpath
  • Set up the 'remora' and 'remora-test' databases and grant all privs for those databases to a user:
mysql -p -D remora < site/app/config/sql/remora.sql
mysql -p -D remora < site/app/tests/data/remora-test-data.sql
mysql -p -D remora-test < site/app/config/sql/remora.sql
mysql -p -D remora-test < site/app/tests/data/remora-test-data.sql
  • Set up your database config:
cp site/app/config/config.php.default site/app/config/config.php
  • Enter the correct database information and you're ready to go -- you can use the same db for default and testing for now.
  • You can also create a config-local.php to make local modifications without touching the files in SVN

CRON (staging only!)

  • Repulls and reinserts the 'remora' database contents every 5 hour
  • Repulls and reinserts the 'remora-test' database contents every 5 minutes
  • Auto-updates all code from / all the way down every 5 minutes

Services

Apache

  • Set up a vhost for the services directory
  • Need to either AllowOverride for docroot or put contents of app/webroot/.htaccess into the vhost config.

Config

  • Copy config-dist.php to config.php and add the same database info as with the main site.
  • If you'd like to set local development settings, see this config-local.php page.

Permissions

The following directories (and all subdirectories and files) need to be writable by apache:

  • app/webroot/files
  • app/tests/data
  • app/tmp

... so you`ll probably want to chmod -R 777 /dir putting every listed directory instead of dir.

Configuration

Copy app/config/database.php.default to app/config/database.php and modify the default and test databases to be your database, but for the test database use a user with read-only privileges. To create a user with read-only privileges, execute this SQL command after replacing {variables}:

  GRANT SELECT ON {database} TO '{username}'@'localhost' IDENTIFIED BY '{password}';

First, import app/config/sql/remora.sql - this provides the schema and standard data for langs, translations, and addontypes.

Then, import app/tests/remora-test-data.sql - this inserts more complete test data. Currently, addon id 7(MicroFarmer) is the most complete.

Installation Test

If the installation is successful, all of the tests should pass in the installation test. The installation test can be found by going to ROOT/tests?case=installation.test.php where ROOT might be http://addons.mozilla.org<tt> .

Caveats

  • All images are given 10 year expiration headers. To force an update for any images, you MUST change the filename/url. A common practice is to insert a timestamp in the filename or url. (addons.mozilla.org/img/logo_20071023.png).