Update:Remora Server Requirements: Difference between revisions

no edit summary
No edit summary
 
(33 intermediate revisions by 11 users not shown)
Line 1: Line 1:
= NOTE!!!!! =
This page is out of date and points to software that is no longer in use. For up-to-date information see
[http://zamboni.readthedocs.org/en/latest/ <b>this page</b>].
= Server Software =
= Server Software =
* [http://manual.cakephp.org/chapter/installing Cake requirements]
* [http://manual.cakephp.org/chapter/installing Cake requirements]
** Apache 2.0 w/ mod_rewrite
** Apache 2.0 w/ mod_rewrite and mod_expires
** PHP4 (PHP5 '''does not''' work with our settings)
** PHP5 >= 5.2.0
** RDBMS (MySQL, PostgreSL)
** RDBMS (MySQL, PostgreSQL)
* Remora-specific requirements (for l10n, mostly)
* Remora requires a few PHP modules:
** [http://php.osuosl.org/manual/en/ref.gettext.php gettext]
** [http://php.osuosl.org/manual/en/ref.gettext.php gettext]
** [http://pear.php.net/package/Archive_Zip Archive_Zip-beta]
** [http://pear.php.net/package/Archive_Zip Archive_Zip-beta]
** gd
** mod_rewrite (for Apache)


= Installation =
= Installation =
* Check out the appropriate tag
* Make sure to pull from the branch and include the services directory int he file tree.
* Set your DocumentRoot
** For staging or prod: to /site/app
** For development (including running of tests): to /site/app/webroot


* Profit!
== 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 [[Update:Remora_config-local.php|config-local.php]] page.


== Permissions ==
== Permissions ==
* app/webroot/files needs to be writable by apache
The following directories (and '''all subdirectories and files''') need to be writable by apache:
* app/webroot/files/temp needs to be writable by apache
* app/webroot/files
* app/webroot/files/approval needs to be writable by apache
* app/tests/data
* app/tmp
 
... so you`ll probably want to '''chmod -R 777 /dir''' putting every listed directory instead of dir.


== Configuration ==
== 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.
 
Copy <tt>app/config/database.php.default</tt> to <tt>app/config/database.php</tt> 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}:
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}';
 
  GRANT SELECT ON {database} TO '{username}'@'localhost' IDENTIFIED BY '{password}';
 
First, import <tt>app/config/sql/remora.sql</tt> - this provides the schema and standard data for langs, translations, and addontypes.
 
Then, import <tt>app/tests/remora-test-data.sql</tt> - 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 <tt>ROOT/tests?case=installation.test.php</tt> where ROOT might be <tt>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).
2

edits