|Version 1 (modified by robert@…, 5 years ago) (diff)|
This guide describes how to install this dbNP module. Installation can be done from source code or using a pre-built WAR file. The method using a WAR file is much easier. However, using the source code you can perform your own changes to the source code, before installation.
This dbNP module needs a working GSCF instance to connect with. You can install GSCF using instructions on https://trac.nbic.nl/gscf/wiki/QuickStartServer. GSCF and the module may be on the same server, but this is not required.
The dbNP module can be most easily installed in a tomcat container. See http://tomcat.apache.org/ for more information about setting up a tomcat container.
Finally, the module needs a functioning database. PostgreSQL and MySQL database are supported out of the box. If you want support for other databases, you should add the libraries required to the source code, and build a war. See next chapter for more information
Retrieving and adjusting source code
The mass sequencing module has been written in Grails (www.grails.org). You can obtain the source code from SVN using the following command
svn co https://trac.nbic.nl/svn/dbnp-metagenomics dbnp-metagenomics
Write access to the repository is only available to registered developers.
After checking out the source code, you can edit the code and make adjustments. When you are finished editing, use the grails command
to create a WAR package for installation. See also http://www.grails.org/Deployment for more information. See
Retrieving pre-build package
Go to https://trac.nbic.nl/dbnp-metagenomics/downloads and download the latest package for this module.
Installing the package
When you have obtained or created a WAR package, you should deploy the package to a tomcat container. You can do so by copying the WAR to the TOMCAT_HOME/webapps directory. See also http://www.grails.org/Deployment for more information.
Configuring the package
You can configure the package by editing the file
where [environment] will be the environment the war has been created for. Normally this will be 'prod'. If you have created your own package, the environment name might be different.
The file might look like the following
# server URL grails.serverURL=http://massSequencing.dbnp.org # DATABASE dataSource.driverClassName=org.postgresql.Driver dataSource.dialect=org.hibernate.dialect.PostgreSQLDialect dataSource.url=jdbc:postgresql://localhost:5432/metagenomics-test dataSource.dbCreate=update dataSource.username=metagenomics dataSource.password=dbnp #dataSource.logSql=true # GSCF configuration - in order to synchronize correctly gscf.baseURL=http://studies.dbnp.org massSequencing.consumerID=http://metagenomics.dbnp.org massSequencing.synchronization = true # File uploads massSequencing.fileUploadDir=/tmp/metagenomics/temp massSequencing.fileDir=/tmp/metagenomics/permanent # Filename of the (.fna, .qual and .oligos) files that are exported massSequencing.exportFilename=1.TCA.454Reads
The different options you can set are: grails.serverURL:: The url where this module is placed on. Don't add a trailing / database.*:: Datasource configuration. See http://grails.org/doc/latest/guide/3.%20Configuration.html#3.3%20The%20DataSource gscf.baseURL: Base URL of GSCF instance. Don't add a trailing / massSequencing.consumerID:: Consumer ID describing this module. This is used for synchronization with GSCF. Set to the same value as grails.serverURL, unless you know what you're doing. massSequencing.synchronization:: If set to true, the module will synchronize its studies with GSCF. If set to false, this module won't communicate with GSCF for synchronization (only for authorization). However, if set to false, you won't be able to add any data to the system. So use it only if you know what you're doing. massSequencing.fileUploadDir:: Directory where uploaded files will be permanently stored. This is used for sequence files, quality files etc. that have been associated with a sample. If the directory is given relative (e.g. 'fileuploads/temp'), it is taken relative to the web-app directory. Otherwise, it should be given as an absolute path (e.g. '/home/user/sequences'). The directory should be writable by the webserver user massSequencing.fileDir:: Directory where uploaded files will be temporarily stored. This directory is used to store files when they are just uploaded. Files in this directory will be deleted when they are older than massSequencing.fileUploadMaxAge If the directory is given relative (e.g. 'fileuploads/temp'), it is taken relative to the web-app directory. Otherwise, it should be given as an absolute path (e.g. '/home/user/sequences'). The directory should be writable by the webserver user massSequencing.fileUploadMaxAge:: Maximum age that uploaded files should be kept on the server before deleting them. When a user uploads a file, but doesn't process the file (e.g. because he leaves the page beforehand or his computer crashes), the files remain in the upload directory. This mechanism ensures that the upload directory is cleaned after some time. The time is given in seconds.