-
Notifications
You must be signed in to change notification settings - Fork 6
Deployment
##Overview There are several ways of deploying OLF. The simplest way to get started is to use the Docker virtualization software.
Docker is a light-weight virtualization software that allows you to run containerized software without the overhead of the operating system as it is the case for other common virtualization software such as VirtualBox. However, to achieve this, docker uses unique linux functions (such as ckernels). Since this is a serious limitation, efforts have been made to make this technology available for Windows and MacOS (ironically through using VirtualBox in the background). Even though the development is not yet complete, the current solution already works well to deploy a demo installation of OpenLabFramework without the troubles of setting up Java correctly.
Detailled instructions can be found here: How-to-run-a-private-demo-installation-of-OpenLabFramework-on-Windows-or-MacOS-using-docker
If you have a working docker installation on your linux installation, all you need to do is run the following commands:
sudo docker pull nanocan/openlabframework
sudo docker run -i -t -p 80:8080 nanocan/openlabframework
Subsequently, you can access the application via your browser at http://localhost/OpenLabFramework
Note 1: You have to make the virtual machine needed to run docker accessible (network settings) and that you have to replace 'localhost' with the IP address of the virtual machine.
Note 2: Data is persisted within the docker container. This means when the container stops for whatever reason or is deleted by the user, the data is gone. If you are interested in a production deployment of OLF via docker contact us and we will figure out the details.
For a production environment, you will currently have to look into a regular deployment scenario. In principal all OLF needs is a working Java 6, 7 or 8 installation (support for Java 8 was added in v.1.4.0) 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 the releases page of this github repository.
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 (JAR) from the releases page.
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 (the MaxPermSize option is not needed in Java 8 any longer):
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 standalone-1.2.jar context=OpenLabFramework host=localhost port=9000
In this example, OLF can be found at http://localhost:9000/OpenLabFramework
##Deployment on Microsoft Windows Payman Tohidifar was kind enough to write up how OLF can be deployed on a Microsoft Windows installation. See Deployment-on-Microsoft-Windows.
##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. The grails CloudFoundry plug-in is quite old and not supported any longer. Users will thus have to follow the instructions found here (technical expertise required): Deploy grails app to CloudFoundry.
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.