-
Notifications
You must be signed in to change notification settings - Fork 4
phenopipe postprocess setup
This page describes setting the application up on CentOS 7.
First you need to install MongoDb 3.4.
Install full java if only the headless version is installed:
sudo yum install java-1.8.0-openjdk java-1.8.0-openjdk-devel
Additionally we need Xvfb (X virtual frame buffer).
sudo yum groupinstall "X Window System"
sudo yum install xorg-x11-server-Xvfb
To run xvfb on startup we create a systemd service (/etc/systemd/system/xvfb.service):
[Unit]
Description=virtual frame buffer X server for display 99
After=network.target
[Service]
ExecStart=/usr/bin/Xvfb :99
[Install]
WantedBy=multi-user.target
Open the necessary port for accessing the service:
sudo firewall-cmd --zone=public --permanent --add-port=50052/tcp
Now create a new user and group for running the phenopipe application:
sudo adduser -r -s /sbin/nologin phenopipe
Next create the directory to which we want to install the application and give our user access:
sudo mkdir /var/www/phenopipe
sudo chown phenopipe:phenopipe /var/www/phenopipe/
If you don't have git installed already run:
yum install git
To build and install the application you have to download the source code to your server via
git clone https://github.com/Gregor-Mendel-Institute/PhenoBox-System.git
Now you have to create/adapt some configuration files in order to build it successfully. Under 'PhenoBox-System/phenopipe-postprocess-server/src/main/resources/' you have to add a file called 'shared_folder_map.properties'. This file should contain the mapping from your smb file share (its SMB URL) to the local mount point. It should look like the following.
smb\://url.of.your.server/share=/your/local/mountpoint/
Afterwards you have to run the following commands:
cd PhenoBox-System/phenopipe-postprocess-server
./gradlew build
sudo tar -xvf build/distributions/phenopipe-postprocess-server.tar -C /var/www/phenopipe
sudo chown -R phenopipe:phenopipe /var/www/phenopipe/phenopipe-postprocess-server/
Now that the application has been built and installed we have to create a service to start it automatically
Now that the application is built we have to create a service to start it automatically
Using systemd we can do the following:
Create the service description at /etc/systemd/system/phenopipe-postprocess-server.service
This file should look like this:
[Unit]
Description=Phenopipe Postprocessing service
Wants=network-online.target
After=network-online.target
[Service]
Environment="DISPLAY=:99"
ExecStart=/var/www/phenopipe/phenopipe-postprocess-server/bin/phenopipe-postprocess-server
User=phenopipe
Group=phenopipe
[Install]
WantedBy=multi-user.target
To start and enable the service do the following:
sudo systemctl daemon-reload
sudo sytemctl enable phenopipe-postprocess-server
Now the server should start everytime you restart the system.