This document provides instructions for administrative tasks such restarting the server, installing a new database , and restarting the necessary services and checking out updated code.

### Prequisties

This document makes the assumption that all necessary applications (as specified on the Blizaar wiki) have been installed correctly. It also makes the assumption that all libraries and packages have been installed using the node package manager (npm), using the “npm install” command for both the root directory and app directory. This document also assumes that the default values are being used for the application port or rserve port. However, if more than once instance of the application is being run on the same physical machine each instance will need to be run on different ports. If there are changes to the “r” back end that may need to be run on a separate port too (the port is configured in the restart_application script). See other instances section for more info. Unless there are unusual changes to the graph database or the system database (i.e. the neo4j or the MongoDB), these same instances of these should be used for all applications.

The BLIZAAR server live instances are hosted at LIST, and as a results of this the servers can only be administered from within the LIST domain.

There are two accounts which should be used to access the server. The admin account is only necessary to restart services (ne04j and Mongo). The server address is blizaar.private.list.lu. For external access (i.e. outside of LIST) the “private” part should be left out, however currently there is no access externally via ssh. To connect via ssh terminal, connect using the following command ssh <username>@blizaar.private.list.lu

### User Account

User:blizaartest Pass:* This user account is where the Blizaar server instances are installed The main serve instance is in the blizaar_platform subfolder of the account’s home directory. Other instances are stored in the different subfolders ( e.g. the eisti instance is stored in the “eisti” subfolder)

This account is used to provide admin access to allow restart of the database services and installation of applications . the blizaartest account was not provided with admin functionality, in case we need to share that account, and it exists solely to run the application, not to administer the machine. Additionally, disseminating a “sudo” group member password widely is a bad idea with respect to security. The need to restart the database services should be rare, and is across all user accounts.

To restart the server connect via ssh using the user account. Navigate to ~/blizaar_platfrom/linuxScripts And execute ./application_restart.sh The application will be run in the background, so it is safe to log out and shut the terminal window

### The Restart script

The restart script restarts both a node server instance and an rserve instance. The basic unedited script in the git repository kills all instances of both, and starts new ones. If more than one platform instances is to be run , the lines that kill the existing instances should be commented out in some of the cases otherwise when an instance is restarted all other will be killed. It also redirects all output that would go to the console on a local instance to the server debug log. If this file is not desired the folder name can be replaced, with /dev/null

# Stopping Existing Rserve process if it exists
kill $(ps aux | grep [R]serve | awk '{print$2}')
# Starting Rserve process on default port and pointing it at correct folder
# sending its output to null to avoid it cluttering up the terminal
R CMD Rserve --RS-port 6311 --RS-workdir /home/blizaartest/blizaar_platform/R &>/dev/null
# # Stopping Existing node.js process if it exists
kill $(ps aux | grep [n]ode | awk '{print$2}')
#starting node server in background and sending output to null
# nohup allows the command to keep running after we log out of the terminal
cd /home/blizaartest/blizaar_platform/
nohup node app.js > ~/serverDebug.log &