Hosting Wiris CAS at your sever
Requirements
The software and hardware requirements to install Wiris CAS 2.4 or superior are the following:
Linux Operating System with a 2.6.* kernel (other OS to be considered)
Java Virtual Machine 1.5 or superior
Java Application Server Containers (for example, Tomcat)
Server processor: Intel Pentium 2GHz or equivalent. Suppose the system is provided with some multiprocessor technology (dual, hyper-threading or true multiprocessor), Wiris CAS benefits from it.
Server memory: 1 GB
Server Hard Drive: 1 GB
Download
You need a licence to access the download page for the server installation. If you have acquired such a licence, you can proceed to the download page.
Setup
In what follows, we will consider that the setup machine name is <domain> and the context name of the web application inside the application container is Wiris (these names are only examples).
Mathematical daemon kernel
Choose a folder for installing the kernel daemon and unzip the file wiris-linux.tar.gz
there. The /kernel/linux/OmegaKernel.exe
file must have execution permissions. The folder database must have written permissions for the daemon.
Important
If you are updating the version, the following files should be copied from the previous installation:
database/statistics.bin
database/session_number
The above target files can be rewritten if they exist. They will exist if the server has been executed once.
In the mentioned folder, the daemon is started typing
. ./omega_start.sh
The above script startups the daemon in the background. To stop, type
. ./omega_stop.sh
Observe that both the web application and the mathematical kernel daemon are deployed in the same machine. These two components communicate with each other with port 31415. Testing the kernel. It is possible to test that the kernel is working correctly. From where Wiris CAS was copied:
java -cp server com.wiris.test.TestCalculate
Status script
To finish, the omega_start.sh
and omega_stop.sh
scripts have to be called from the startup and shutdown of the operating system. See the example script on your download page. This script considers that Wiris CAS is installed in a user's home called wiris). Thanks to this script, every time the computer is restarted, the Wiris kernel daemon will start properly.
If you are not using a custom user to run the kernel but the default root user, please define the $HOME
variable in any way, even $HOME=/dev/null
.
Upgrade
To upgrade Wiris CAS , you only need to deploy the Web application, uncompress the mathematical kernel in the same folder and copy-paste the user manual. Then, it would be best if you restarted the daemon, which is the mathematical kernel:
. ./omega_stop.sh . ./omega_start.sh
By decompressing the kernel in the same folder, you keep the folder database
, which registers helpful information about using the tool. Otherwise, you need to copy the folder database to a new location while the daemon is not running.
Tests
It is possible to test that the calculator works appropriately by opening a browser and typing the URL:
http://<domain>/wiris/index.html
or (if you have multiple languages)
http://<domain>/wiris/<lang>/index.html
Once the calculator is opened, test some operations. Wiris CAS is also provided with a self-test at:
http://<domain>/wiris/servlet/wiris.servlets.Test
You can find the manual at
http://<domain>/wiris/manual/<lang>/
Docker
Load
The image is provided to customers as part of the Wiris CAS server components download page at the download page.
After the image is downloaded, it must be loaded to the target Docker daemon, using the command:
$ docker load -i wiris-cas-kernel-docker-x.xx.x.xxxx.tar.gzhttp://<domain>/wiris/index.html
The name of the loaded image is wiris-cas-kernel:latest
.
Run
If there are previous containers of wiris-cas-kernel images executing (named wiris-cas-kernel), stop and remove them:
$ docker stop -t 2 wiris-cas-kernel $ docker rm -f wiris-cas-kernel
Finally, run the loaded image in detached mode. Here we set up a name for the container but that may not be always convenient.
$ docker run -p 31415:31415 -d --name wiris-cas-kernel wiris-cas-kernel
This command redirects the 31415 port of the host machine to the 31415 port of the container, which is open and listening for socket communications to the kernel. This port is the default configured port for WirisQuizzes service to find the kernel server.
In order to check that the container is indeed up and working, this command can be used to run a test from inside the container:
$ docker exec wiris-cas-kernel java -cp server com.wiris.test.TestCalculate
Healthcheck
After 30 seconds, the first healthcheck will be executed and the status will change from starting
to healthy
.
$ docker container ls
CONTAINER ID | IMAGE | COMMAND | CREATED | STATUS | PORTS | NAMES |
---|---|---|---|---|---|---|
9b7e31270e10 | wiris-cas-kernel | "/bin/sh -c 'java -X…" | 31 seconds ago | Up 30 seconds (healthy) | 0.0.0.0:31415->31415/tcp | wiris-cas-kernel |