-
Notifications
You must be signed in to change notification settings - Fork 6
Deployment
##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
Important Note: CloudFoundry services are now offered by Pivotal who have changed their service entirely. In theory, deployment is just as simple as before, but the grails plugin for deploying to cloudfoundry needs to be updated first. Meanwhile apps can be pushed using the ruby cf client, but it seems as the support for grails is currently more or less experimental. We have thus moved our demo application to eApps. The new URL is http://www.nanocan.dk/openlabframework/demo with user 'admin' and password 'demo0815'. We will update this page with instructions for eApps and hopefully also for the new version of cloudfoundry shortly.
Grails based applications can be easily 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 a free account with CloudFoundry and then follow the instructions for deploying Grails applications. You can skip the part about installing the CloudFoundry grails plugin since it is already part of OLF. Also note that the URL http://openlabframework.cloudfoundry.com is already occupied by our demo application. Similar to a local deployment, OLF will probably fail to start due to memory limitations. Use the following commands for pushing OLF successfully:
//-Dgrails.env="cloud" is optional for changing the environment to "cloud"
//cloud environment needs to be defined in the configuration file
//increase memory size to 1G (2G is max), don't start immediately since we need to change JAVA_OPTS
grails -Dgrails.env="cloud" cf-push --memory=1G --no-start
grails -Dgrails.env="cloud" cf-env-add JAVA_OPTS "-Xmx1024m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled"
grails -Dgrails.env="cloud" cf-startone 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).