Skip to content
This repository was archived by the owner on Jun 7, 2024. It is now read-only.

Deployment

mlist edited this page Jan 7, 2014 · 13 revisions

##Overview There are several ways of deploying OLF. In principal all OLF needs is a working Java installation together with a configured Java web server, such as jetty, glassfish or our preferred solution Tomcat. Grails, which is the foundation of OLF, compiles the entire project into a single WAR file. In Tomcat it is sufficient to copy this WAR file into its sub-folder webapps, from where the file will automatically be unpacked and the application deployed. The WAR file can be downloaded from here.

However, if you don't have access to a server or if you want to get hands on experience with a demo installation, you can also deploy OLF to CloudFoundry or use a standalone version of OLF that just depends on a Java installation (the webserver is included). This is also ideal for an initial evaluation of OLF.

##Note for Tomcat 7 If you are deploying OLF on a Tomcat 7 installation using the manager application you should be aware that there is a default limit for the maximal size of a WAR file (50 MB). OLF WAR files however can be larger than that, so you should locate the config file of the manager application:

/your/path/to/tomcat/webapps/manager/WEB-INF/web.xml

and increase the corresponding limit:

<multipart-config>
<max-file-size>104857600</max-file-size>
<max-request-size>104857600</max-request-size>
<file-size-threshold>0</file-size-threshold>
</multipart-config>

##Data Persistence OLF persists all data in external databases such as MySQL, MS SQL Server or PostgreSQL. If you don't have access to such a database you can also execute OLF with default settings where it will store all information in a file-based SQL database called H2. See Application-Config for more information on how to configure database access.

##Standalone Execution You can execute OpenLabFramework on any computer with a working Java installation (v. >1.6) by downloading the stand-alone version here.

In theory you can just execute the JAR with the common syntax

java -jar openlabframework_latest.jar

However, depending on your Java default memory settings, OLF might not start, because the default settings are too conservative. You can increase the memory for the JVM using parameters:

java -XX:MaxPermSize=768M -Xmx1024M -jar openlabframework.jar 

Per default the application will start on http://localhost:8080, but if this address or port are already occupied by a different application you can just customize instance name, server address and port as follows:

java -XX:MaxPermSize=768M -Xmx1024M -jar openlabframework.jar OpenLabFramework localhost 9000

In this example, OLF can be found at http://localhost:9000/OpenLabFramework

##Cloud Deployment

Grails based applications can be deployed to CloudFoundry. CloudFoundry is a cloud-based service that offers you to run Java web-applications. The approach is relatively effortless compared to other solutions. You have to clone OLF from github and install the latest version of Grails. Register for an account with CloudFoundry and then follow the instructions and (http://docs.cloudfoundry.com/docs/dotcom/getting-started.html) for deploying a Grails applications. Similar to a local deployment, OLF will probably fail to start due to memory limitations. Make sure you configure your cloud instance with at least 1.5 GB of total memory. Use the following commands for pushing OLF successfully:

cf push --no-start
cf set-env --no-restart <yourapp> JAVA_OPTS " -XX:MaxPermSize=512m -Xmx1024m -Dhttp.port=\$VCAP_APP_PORT"
cf start

one last NOTE: The deployment does currently fail if the database migration plugin is enabled. Remove it from BuildConfig.groovy for successful deployment (http://jira.grails.org/browse/GPCLOUDFOUNDRY-52).

An alternative to cloudfoundry is eApps. Here you have full control over a virtual machine allowing you to deploy OLF to a tomcat instance. Although many of the necessary steps are part of the web interface, some manual tweaking will be necessary. Follow the guide for server installation above.

Clone this wiki locally