Last modified 4 years ago Last modified on 08/26/13 14:11:23

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 : -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8 -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true

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 %COMETE_SRC% from now on.

Some of the directories need to be re-checked out on branch comete.

cd %COMETE_SRC%\Harvester
git checkout comete
git pull
cd ..\MetadataEditor
git checkout comete
git pull
cd ..\validator
git checkout comete
git pull
cd ..\orioai-indexing
git checkout comete
git pull

Compilation

  1. Configure Maven:
  • Edit file %HOME%\.m2\settings.xml. If you have no such file, copy it from %MAVEN_HOME%\conf\settings.xml.
  1. Generate the main config file with the following command:
    cd %COMETE_SRC%
    ant sample-config 
    
  1. Now edit %COMETE_SRC%\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.

In particular, make sure to define a comete.home directory distinct from the COMETE_SRC. It should be empty before building. Note: This 'comete.home' directory will be referenced as %COMETE_HOME% from now on.

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 %COMETE_SRC%\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 %COMETE_SRC%\config\src\main\resources\build.properties file.

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. ex nssm utility application.

  1. Start the Tomcat server.
  • Enjoy the User Interface at :
    http://localhost:8080/Portal
    

Note: In order for the system to work properly, mulgara service must be started before Tomcat. Use dependency mechanism to fix it.

Configuration/Administration

The administration interfaces are available here:

http://localhost:8080/Portal/Admin.jsp

By default, you need to access the administration interface from localhost, i.e., directly from the same server hosting the web application. To give access to additional machines, rename the file sample-authorized.ini from the %COMETE_SRC%\security\src\main\resources directory to authorized.ini, edit the file and enter the additional IP addresses.

Identity Management

TODO

Vocabulary Management

TODO

Record Validation

By default, no application profile validation is performed on the harvested metadata records.

The list of supported application profiles are, for LOM-based records:

  • LOM Strict
  • LOM Loose
  • LOM FR 1.0
  • Scorm LOM FR 1.0
  • Scorm LOM FR 1.1
  • Normetic 1.2

and for DC-based records:

  • OAI DC

To enable validations, the administrator can check or uncheck the desired application profiles listed on the right side of the Record Validation page. The Save Settings button must be clicked to commit the changes. The metamodel should be resetted in order to update the validation results.

Other

TODO

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 %COMETE_HOME%\photos 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;
    drop database `proai`;
    create database `proai`;
    
  • 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.

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