Skip to content
Paolo Ciccarese edited this page Jun 11, 2013 · 11 revisions

Deploying Domeo

  • Step 1 - Libraries
    
  • Step 2 - Environment
    
  • Step 3 - Installing Git
    
  • Step 4 - Clone the complete Domeo Repository
    
  • Step 5 - Running the scripts
    
  • Step 6 - Generating the war file
    
  • Step 7 - Deploying the war file
    
  • Step 8 - Database configuration
    
  • Step 9 - Email configuration
    
  • Step 10 - Proxy configuration
    
  • Step 11 - General Info
    
  • Step 12 - Start up!
    

Step 1 - Libraries

After making sure Java 6 is installed, these are the libraries and tools needed:

A) Grails version 2.0.3

Here is the archive of some of the latest Grails distributions: http://grails.org/download/archive/Grails

B) Google Web Toolkit (GWT) version 2.4.0

Here is the archive of the latest GWT distributions: http://code.google.com/p/google-web-toolkit/downloads/list

Step 2 - Environment

After all the necessary libraries have been downloaded, it is necessary to bind the environment variables.

For MAC OS

In the file ./MacOSX/environment.plist bind

"GRAILS_HOME" = "/grails-2.0.3";
"GWT_HOME" = "/gwt-2.4.0";

Also in the file .bashrc file in the user’s home it is necessary to update the PATH by including the Grails /bin directory. Remember, it is necessary to logout and login again for all the variables changes to be loaded.

Step 3 - Installing Git

Step 4 - Clone the complete Domeo Repository

In order to build the project, it is necessary to download (clone) the code base through Git
[See how to clone the Domeo code here] (Cloning-the-codebase)

Step 5 - Running the scripts

Some projects in the hierarchy contain a SETUP.TXT file. The scripts in those file has to be run in order to create the necessary directories and soft links. Particularly critical are the script in DomeoClientWrapper and Domeo projects.

Note: I know this is not very high tech, I will provide soon one single script for doing everything in one step.

Step 6 - Generating the war file

In order to generate the war file properly you need to position in the root of the Domeo (domeo/Domeo) Grails project and to run the following grails instruction:

grails war

This will generate the war file in the directory Domeo/target

Step 7 - Deploying the war file

Deploy the war file in the webapp directory of Tomcat

Step 8 - Database configuration

Before starting the server, it is necessary to define the data source parameters. These have been externalized in the file Domeo-config.properties (case sensitive), which content will look similar to this:

# MySQL
dataSource.username = root
dataSource.password = ...
dataSource.url = jdbc:mysql://localhost/DomeoAlphaDev?useUnicode=true&characterEncoding=UTF-8

and this:

# Elastic Search
elastico.ip = xxx.xxx.xxx.xxx
elastico.port = 9200
elastico.database = domeo
elastico.collection = annotation

The Domeo-config.properties file has to be included in the Tomcat classpath.

Step 9 - Email configuration

Domeo uses the email system to send confirmations/requests/alerts to the users and administrators. Currently Domeo is setup to use a Gmail account. The credentials have to be set up in the previous configuration file and have to include the following properties:

grails.mail.host = smtp.gmail.com
grails.mail.port = 465
grails.mail.username = <email address of the Domeo system>
grails.mail.password = <password for the email address of the Domeo system>
grails.mail.default.from = <email address of the Domeo system>

If no email credential have been set up, Domeo is supposed to ignore the email instructions. However, it is strongly recommended to set the email up to assure a more efficient functioning of the system.

Step 10 - Proxy configuration

Domeo can be setup so that every call to external service happens through a proxy. In order to use a proxy add the following lines to the configuration file.

domeo.proxy.ip=<ip> 
domeo.proxy.port=<port number> 

Step 11 - General Info

In the configuration file it is important to add the general info of the instance:

domeo.subtitle=Annotation Toolkit
domeo.administrator=Dr. Paolo Ciccarese
domeo.admin.email.display=paolo dot ciccarese at gmail.com
domeo.admin.email.to=<email address>
domeo.organization=Massachusetts General Hospital

Step 12 - Start Up

When Tomcat starts up you should be able to experience a logging similar to the following:

11 Mar 2013 15:38:56,567 conf.BootStrap ==========================================
11 Mar 2013 15:38:56,568 conf.BootStrap DOMEO ANNOTATION WEB TOOLKIT (v.2.0 Alpha, b.007) 
11 Mar 2013 15:38:56,568 conf.BootStrap -------------------------------------------------------------------------------------- 
11 Mar 2013 15:38:56,568 conf.BootStrap Designed and developed by Paolo Ciccarese 
11 Mar 2013 15:38:56,568 conf.BootStrap for MIND Informatics Labs directed by Tim Clark 
11 Mar 2013 15:38:56,568 conf.BootStrap A product of Massachusetts General Hospital, Boston, MA, USA (c) 2012 
11 Mar 2013 15:38:56,568 conf.BootStrap ==========================================
11 Mar 2013 15:38:56,569 conf.BootStrap Bootstrapping.... 
11 Mar 2013 15:38:56,569 conf.BootStrap --------------------------------------------------------------------------------------
11 Mar 2013 15:38:56,569 conf.BootStrap ** Configuration externalization: 
11 Mar 2013 15:38:56,569 conf.BootStrap [classpath:Domeo-config.properties, file:./Domeo-config.properties] 
11 Mar 2013 15:38:56,569 conf.BootStrap -------------------------------------------------------------------------------------- 
11 Mar 2013 15:38:56,569 conf.BootStrap ** MongoDB Configuration 
11 Mar 2013 15:38:56,570 conf.BootStrap url : [:] 
11 Mar 2013 15:38:56,570 conf.BootStrap database : [:] 
11 Mar 2013 15:38:56,570 conf.BootStrap collection : [:] 
11 Mar 2013 15:38:56,569 conf.BootStrap --------------------------------------------------------------------------------------
11 Mar 2013 15:38:56,570 conf.BootStrap ** Elastic Search Configuration 
11 Mar 2013 15:38:56,570 conf.BootStrap ip : 75.101.xxx.xxx 
11 Mar 2013 15:38:56,570 conf.BootStrap port : 9200 
11 Mar 2013 15:38:56,570 conf.BootStrap database : domeo 
11 Mar 2013 15:38:56,571 conf.BootStrap collection : annotation 
11 Mar 2013 15:38:56,569 conf.BootStrap --------------------------------------------------------------------------------------
11 Mar 2013 15:38:56,581 conf.BootStrap ** MySQL Configuration 
11 Mar 2013 15:38:56,581 conf.BootStrap url : jdbc:mysql://localhost/DomeoAlphaDev?useUnicode=true&characterEncoding=UTF-8
11 Mar 2013 15:38:56,581 conf.BootStrap username : root 
11 Mar 2013 15:38:56,581 conf.BootStrap password : 
11 Mar 2013 15:38:56,569 conf.BootStrap --------------------------------------------------------------------------------------
11 Mar 2013 15:38:56,582 conf.BootStrap ** Proxy Configuration 
11 Mar 2013 15:38:56,582 conf.BootStrap proxy ip : [:] 
11 Mar 2013 15:38:56,582 conf.BootStrap proxy port : [:] 
11 Mar 2013 15:38:56,569 conf.BootStrap -------------------------------------------------------------------------------------- 
... 
11 Mar 2013 15:38:56,885 conf.BootStrap Bootstrapping complete! 
11 Mar 2013 15:38:56,885 conf.BootStrap ==========================================
| Server running. Browse to http://localhost:8080/Domeo