Last modified 6 weeks ago Last modified on 04/12/12 11:42:07

Installing COMETE for Developers on Windows

Requirements

Install required products as explain in their documentation.

Development environment

Runtime Environment

Set the following Environement Variables related to the previous installation:

JAVA_HOME
TOMCAT_HOME
CATALINA_HOME (should be the same value as TOMCAT_HOME)
CATALINA_OPTS with value : -XX:PermSize=64m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8

Don't forget to adjust the PATH variable accordingly

Database Creation

This section allows you to create the 3 databases used by COMETE.
From command line windows, type :

mysql -u root -p

After password validation, you are now under the mysql prompt: mysql>
Enter each of the following lines:

create database `fedora3`;
grant all on `fedora3`.* to fedoraAdmin@localhost identified by 'fedoraAdmin';
grant all on `fedora3`.* to fedoraAdmin@'%' identified by 'fedoraAdmin';
create database `ori-harvester` default character set utf8 collate utf8_general_ci;
create database `proai`;

Source Code Download

Launch a command-line interpreter and type the following command to download the source code:

git clone --recursive git://coeus.ca/brer.git

A 'brer' folder will be created with all project sources at your current location. This 'brer' directory will be referenced as %BRER_HOME% from now on.

Compilation

  1. Configure Maven:
  • Edit file %HOME%\.m2\settings.xml. If you have no such file, copy it from %MAVEN_HOME%\conf\settings.xml.
  • Add these 2 mirror entries:
    <mirror>
      <id>centralMirror</id>
      <mirrorOf>central</mirrorOf>
      <name>Mirror of central.</name>
      <url>http://maven.glassfish.org/content/groups/glassfish</url>
    </mirror>
    <mirror>
      <id>jbossNewRepo</id>
      <mirrorOf>jboss</mirrorOf>
      <name>New location of JBoss repo.</name>
      <url>https://repository.jboss.org/nexus/</url>
    </mirror>
    

Alternatively, you can also use our own Nexus repository.

  1. Start Fedora compilation with:
    cd brer\fedora\fcrepo 
    mvn clean install -Dintegration.test.skip=true
    
  1. Generate the main config file with the following command:
    cd ..\.. 
    ant sample-config 
    
  1. Now edit %BRER_HOME%\config\src\main\resources\build.properties file and adjust values with your settings.

    Please note that whitespace characters in directories can cause execution problems. Until this issue is fixed, restrain from using locations with whitespace characters. This also concerns location properties using $user.home that usually translates to C:\Documents and Settings\username on Windows. Instead of using $user.home, it's important to use a fixed location like C:\comete.

    I think that we need to give more information on each setting contained in the build.properties file. How should we do that? Put more comments in the file, use the wiki or, maybe better, use both approaches: lots of comments in the file with a top comment indicating that further information can be found on a specific page on the wiki?
  1. The compilation of the whole project can now be started with this command:
    mvn install -Dmaven.test.skip=true 
    

Installation

At this point, COMETE is ready to be deployed.

Default values will be taken into account, if you want adjust some of them, edit the %BRER_HOME%\fedora\fcrepo-config\target\classes\install.properties before.

Start the installation with:

ant deploy-comete 

The system should be properly installed in the the directory specified by the comete.home property from the %BRER_HOME%\config\src\main\resources\build.properties file.
Note: This 'comete.home' directory will be referenced as %COMETE_HOME% from now on.

This directory contains a fedora folder. In the Environment Variables Manager, set the fedora path to the variable: FEDORA_HOME (ex: C:\COMETE\fedora).

COMETE is now installed. Furthermore, contexts of all module's web application are deployed into Tomcat. This facilitates the development as each recompilation no longer requires redeployment.

Testing

  1. Start the Mulgara server by double-clicking on %COMETE_HOME%\mulgara\bin\mulgara.bat

Note: For a real deployment, an automatic service should wrap this action.

  1. Start the Tomcat server.
  • List of stored records can be viewed by
    http://localhost:8080/Portal
    
  • Or directly from Fedora backend with :
    http://localhost:8080/fedora
    

Reinstallation

During development, it may be needed to reinstall the application. Here is how to do:

  • Delete the %COMETE_HOME%\fedora folder
  • Delete the %COMETE_HOME%\mulgara folder
  • Delete the %TOMCAT_HOME%\webapps\fedora.war and %TOMCAT_HOME%\webapps\fedora folder
  • Rebuild the COMETE's databases:
    mysql -u root -p
    drop database `fedora3`;
    create database `fedora3`;
    drop database `ori-harvester`;
    create database `ori-harvester` default character set utf8 collate utf8_general_ci;
    
  • Redeploy the application:
    ant deploy-comete
    

Note that this procedure may be incomplete at the moment. For example, if you have harvested some metadata records, most likely that the harvester's database should also be rebuilt.

TODO

  • Mettre a jour les URL d'accès selon l'avancée du développement
  • Indiquer comment changer les parametres pour la page {http://localhost:8080/fedora/oai?verb=Identify ou probablement encore mieux, si c'est faisable, ajouter des attributs dans le fichier build.properties et effectuer les substitutions necessaires dans la fiche d'identite.

0.9.6.2 © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.177489 sec.)