The Babel server environment is a typical LAMP environment. Apache 2.x, PHP 5.x, MySQL 5.x and a CVS client are likely the only prerequisites.

+

The Babel server environment is a typical LAMP environment. Apache 2.x, PHP 5.x, MySQL 5.x, Java and a Git client are likely the only prerequisites.

−

Steps to setting up a Babel Development Environment on Linux:

+

Steps to setting up a Babel Development Environment on Linux. For Windows users, please refer to the Running the server on Windows section. If you want to attempt an install of Babel on a SourceForge web server, see [[Babel / Server Tool SourceForge Installation]] .

−

===Install CVS, PHP, Apache, MySQL if needed===

+

+

===Install Git, PHP, Apache, MySQL if needed===

On Fedora 9, for example (as root):

On Fedora 9, for example (as root):

−

# yum install cvs mysql-server mysql php php-mysql httpd

+

# yum install mysql-server mysql php php-mysql httpd

+

You can choose to install cvs and/or svn depending on what repositories you will be working with:

+

# yum install git

+

# yum install svn

# /etc/init.d/mysqld start

# /etc/init.d/mysqld start

# /etc/init.d/httpd start

# /etc/init.d/httpd start

+

+

+

===Install Java===

+

Install your favorite Java distro, and pay particular attention to have the jar command to be accessible in the path, since it will be used by the background jobs to create the language packs.

===Create a directory alias in Apache===

===Create a directory alias in Apache===

Edit (eg) <tt>/etc/httpd/conf/httpd.conf</tt> to add:

Edit (eg) <tt>/etc/httpd/conf/httpd.conf</tt> to add:

−

Alias /babel "/var/www/babel/server/html/"

+

Alias /babel "/path/to/babel/server/html/"

−

<Directory "/var/www/babel/server/html/">

+

<Directory "/path/to/babel/server/html/">

AllowOverride None

AllowOverride None

Order allow,deny

Order allow,deny

Line 33:

Line 41:

Apache may need to be reloaded or restarted for the alias to take effect. (eg Fedora 9: <tt>/etc/init.d/httpd restart</tt>)

Apache may need to be reloaded or restarted for the alias to take effect. (eg Fedora 9: <tt>/etc/init.d/httpd restart</tt>)

Replace the usernames, hostname and password according to your specific environment. Load the babel tables and sample data (the root account is used here, as the 'babel' account doesn't have CREATE/DROP privileges):

Replace the usernames, hostname and password according to your specific environment. Load the babel tables and sample data (the root account is used here, as the 'babel' account doesn't have CREATE/DROP privileges):

−

mysql -u root -p babel < /var/www/babel/server/babel-setup.sql

+

mysql -u root -p babel < /path/to/babel/server/babel-setup.sql

The first time you'll run the Babel setup script, you will get an error from occurring for a trigger that does not exist.

The first time you'll run the Babel setup script, you will get an error from occurring for a trigger that does not exist.

Line 66:

Line 91:

PHP must have the ability to encode data in the [http://www.json.org/ JSON] format. As of PHP 5.2 'json_encode' and 'json_decode' are included by default. If you are using an earlier version you will need to install the JSON PECL extension, find another json_encode library or write your own json_encode function. See [http://www.php.net/manual/en/json.setup.php this page] to find out more information on JSON and PHP.

PHP must have the ability to encode data in the [http://www.json.org/ JSON] format. As of PHP 5.2 'json_encode' and 'json_decode' are included by default. If you are using an earlier version you will need to install the JSON PECL extension, find another json_encode library or write your own json_encode function. See [http://www.php.net/manual/en/json.setup.php this page] to find out more information on JSON and PHP.

−

=== Install Phoenix ===

+

=== Phoenix is no longer required for Babel Server===

−

Currently, Eclipse Phoenix code is required for Babel Server to run. There are plans to fix this ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=217488 bug 217488]). The Phoenix code must be installed in html/ with a symbolic link to it in your Apache DocumentRoot.

+

Previously, Eclipse Phoenix code was required for Babel Server to run. This requirement has been removed ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=217488 bug 217488]).

−

Before checkout Eclipse Phoenix code, you should delete the CVS folder for eclipse.org-common located here /var/www/babel/server/html/eclipse.org-common/CVS as it corresponds to the Eclipse Babel code CVS configuration (eclipse.org-common and its subfolders are checkout during Eclipse Babel code checkout)

Server code patches must be attached to Bugzilla bugs and enhancement requests. Please ensure patches are submitted against a recently updated HEAD stream. Look for org.eclipse.babel/server in:

+

Server code patches must be attached to Bugzilla bugs and enhancement requests. Please ensure patches are submitted against a recently updated HEAD stream. See Obtaining the code from Git, above.

−

:pserver:anonymous@dev.eclipse.org:/cvsroot/technology

+

== Committer Development Process ==

+

Babel committers develop new code, and work on bug fixes on their local development environment. '''Only when a code set is complete can it be committed to the server for staging'''.

+

Before doing any work on the server code, please follow these simple guidelines:

+

# Make sure there is a bug that defines the scope of your work

+

# Implement the change on your local development environment

+

# Submit a patch for peer review

+

# Commit your code. Use the following syntax for the first line of your commit comment:

+

[123456] Description of the bug

+

# Test the code on the [http://babel.eclipse.org/staging staging area]. Git pushes are published to the staging area within a minute.

+

# Request a release (see below) when it's appropriate.

== Submitting database changes ==

== Submitting database changes ==

Line 118:

Line 139:

== Release process ==

== Release process ==

−

Babel Server code in CVS is published to http://babel.eclipse.org/staging automatically every minute. To deploy the code to the live site:

+

Babel Server code in Git is published to http://babel.eclipse.org/staging automatically every minute. To deploy the code to the live site, you must tag your local repo, push the tag, then deploy the tagged code to the live site.

−

# Tag the CVS code with a release tag: R_x_YYYYMMDDHHMM, where x is the release number and YYYYMMDDHHMM is the local time of the tag.

−

# Send an email to babel-dev@eclipse.org to announce the request for a deployment, specifying the release tag.

−

The Designated Deployment Drone (currently Denis) then establishes an SSH connection to the Babel server, and as the deployment user 'genie', runs the ./deployBabelLive.sh <rtag> to deploy the release.

+

1. Tag the Git code with a release tag: R_x_YYYYMMDDHHMM, where x is the release number and YYYYMMDDHHMM is the local time of the tag. Right click the repo > Team > Advanced > Tag. '''Remember, tagging is a local repository operation. New tags must be pushed upstream.'''

+

[[Image:Tagging.png]]

+

+

+

+

+

+

2. Push the new tag: Right click the repo > Team > Remote... > Push...

+

[[Image:Tagging2 - push.png]]

+

+

+

+

Click the Add All Tags Spec button, then continue the wizard accepting the defaults.

+

+

[[Image:Tagging3 - add all tags.png]]

+

+

+

+

+

+

3. After a few moments, the new tag should appear in the cGit web interface, with handy links to download the tag-specific snapshots:

+

[[Image:Tagging4 - cgit view.png]]

+

+

+

+

+

+

4. Send an email to babel-dev@eclipse.org to announce the request for a deployment, specifying the release tag.

+

+

+

+

+

The Designated Deployment Drone (Kit, Denis) then establishes an SSH connection to the Babel server, and as the deployment user 'genie':

+

# Execute any MySQL database changes in the schema_changes.sql file at the Babel Git root, then commit an empty file

+

# run the ./deployBabelLive.sh <tag> to deploy the release, paying close attention to merges, conflicts or other potential errors.

== Data Bridges ==

== Data Bridges ==

Line 132:

Line 185:

* '''Eclipse Project/Version info''': When the Bugzilla bridge is run, the Project/Version info is pulled from [http://www.eclipse.org/projects/web-api/project_release_versions.php this URL].

* '''Eclipse Project/Version info''': When the Bugzilla bridge is run, the Project/Version info is pulled from [http://www.eclipse.org/projects/web-api/project_release_versions.php this URL].

Babel Team Development Strategy

Prioritizing Strategy

The Babel team's strategy to processing bugs and feature requests is (in order):

Bugs that cause incorrect translations to be saved or prevent people from enter translations

Finishing the version zero issues (deployment, documentation)

Bugs preventing project teams from adding their projects to Babel

Server performance issues

Bugs preventing users from consuming the output of Babel

New features

Setting up a Development Environment

The Babel server environment is a typical LAMP environment. Apache 2.x, PHP 5.x, MySQL 5.x, Java and a Git client are likely the only prerequisites.

Steps to setting up a Babel Development Environment on Linux. For Windows users, please refer to the Running the server on Windows section. If you want to attempt an install of Babel on a SourceForge web server, see Babel / Server Tool SourceForge Installation .

Install Git, PHP, Apache, MySQL if needed

On Fedora 9, for example (as root):

# yum install mysql-server mysql php php-mysql httpd

You can choose to install cvs and/or svn depending on what repositories you will be working with:

Replace the usernames, hostname and password according to your specific environment. Load the babel tables and sample data (the root account is used here, as the 'babel' account doesn't have CREATE/DROP privileges):

mysql -u root -p babel < /path/to/babel/server/babel-setup.sql

The first time you'll run the Babel setup script, you will get an error from occurring for a trigger that does not exist.

To avoid this error, install MySQL version >= 5.0.32 or version >= 5.1.14 to be able to use IF EXISTS clause for DROP TRIGGER statement and modify the Babel sql script:

Replace: DROP TRIGGER `ins_version`;

by: DROP TRIGGER IF EXISTS `ins_version`;

Requirements for PHP

PHP must have the ability to encode data in the JSON format. As of PHP 5.2 'json_encode' and 'json_decode' are included by default. If you are using an earlier version you will need to install the JSON PECL extension, find another json_encode library or write your own json_encode function. See this page to find out more information on JSON and PHP.

Phoenix is no longer required for Babel Server

Previously, Eclipse Phoenix code was required for Babel Server to run. This requirement has been removed (bug 217488).

Logging in

Creating (building) a language pack

To create a language pack, simply run php5 path/to/generate1.php from a command line (or from cron). This requires many Linux commands to be found in the PATH environment variable; notably, the jar command that is included with most JDKs.

Submitting code patches

Server code patches must be attached to Bugzilla bugs and enhancement requests. Please ensure patches are submitted against a recently updated HEAD stream. See Obtaining the code from Git, above.

Committer Development Process

Babel committers develop new code, and work on bug fixes on their local development environment. Only when a code set is complete can it be committed to the server for staging.

Before doing any work on the server code, please follow these simple guidelines:

Make sure there is a bug that defines the scope of your work

Implement the change on your local development environment

Submit a patch for peer review

Commit your code. Use the following syntax for the first line of your commit comment:

[123456] Description of the bug

Test the code on the staging area. Git pushes are published to the staging area within a minute.

Request a release (see below) when it's appropriate.

Submitting database changes

Database versioning is something we are working on for the next Milestone release (Milestone 1). Currently if you want to make changes to the live database you need to put the SQL queries for alter/insert/update/create into the schema_change.sql file. When the next tagged version of the code is released the web master will process the schema_change.sql file by hand and make the appropriate changes to the database and test files.

Release process

Babel Server code in Git is published to http://babel.eclipse.org/staging automatically every minute. To deploy the code to the live site, you must tag your local repo, push the tag, then deploy the tagged code to the live site.

1. Tag the Git code with a release tag: R_x_YYYYMMDDHHMM, where x is the release number and YYYYMMDDHHMM is the local time of the tag. Right click the repo > Team > Advanced > Tag. Remember, tagging is a local repository operation. New tags must be pushed upstream.

2. Push the new tag: Right click the repo > Team > Remote... > Push...

Click the Add All Tags Spec button, then continue the wizard accepting the defaults.

3. After a few moments, the new tag should appear in the cGit web interface, with handy links to download the tag-specific snapshots:

4. Send an email to babel-dev@eclipse.org to announce the request for a deployment, specifying the release tag.

The Designated Deployment Drone (Kit, Denis) then establishes an SSH connection to the Babel server, and as the deployment user 'genie':

Execute any MySQL database changes in the schema_changes.sql file at the Babel Git root, then commit an empty file

run the ./deployBabelLive.sh <tag> to deploy the release, paying close attention to merges, conflicts or other potential errors.

Data Bridges

The Babel server has two data bridges:

Eclipse Bugzilla: this bridge is used to maintain a mapping of the Bugzilla user accounts on the Babel server. A process on the Bugzilla server and on the Babel server monitors this URL for changes, triggering an export (and an import) of the data.

Eclipse Project/Version info: When the Bugzilla bridge is run, the Project/Version info is pulled from this URL.