Installation of RSpace add-on services

This document is for IT staff at on-premises customers responsible for provisioning and maintaining the infrastructure to support RSpace.

We are now providing some additional services as web-service applications using Docker. Current applications include:

  1. MSOffice document converter. This provides the same functionality as the 'aspose-app' standalone Java application but is more performant and scalable.
  2. SnapGene viewer for DNA sequence files. See SnapGene integration for the functionality provided.

Obtaining Docker images

At present, we will provide access to a private Dockerhub repository. This is likely to change in the future.

Please obtain credentials for the Docker repository from ResearchSpace. We will only issue credentials to named technical contacts.
RSpace 1.68.1 or later is needed for these services
First of all you will need to install docker on the server that runs the service. We recommend running this on a different server than that running RSpace.

Document converter:

docker pull rspaceops/rspace-services:aspose-web-0.0.9-SNAPSHOT

SnapGene viewer:

docker pull rspaceops/rspace-services:snapgene-web-0.0.5

Running a service

General steps:

  1. Decide on which port you want to expose the service.
  2. Decide on the URL of the service (or this can just be an IP address).
  3. Decide if you need to encrypt communications using TLS. This will be necessary if communication between RSpace and the service goes over public networks.

You can set up and test the services without having to stop RSpace. An RSpace downtime is only necessary when you do the 'Connecting RSpace to the XXX service' section of the documentation.

Document Converter Service

Running Document converter service

Assuming you are want to expose the service on port 8080: (8060 is the port inside the container). Please note the version may change.

docker run  -p8080:8060  --name aspose-doc-converter --mount source=aspose-logs,target=/logs,type=volume -d  rspaceops/rspace-services:aspose-web-0.0.9-SNAPSHOT

Testing Document converter service:

The service takes about 10s to start up. Modify these tests if you are using another command-line browser or the URL is not 'localhost'.

A simple test for 'server up':

curl localhost:8080/actuator/info

Testing document conversion:

Download this file: BrDUlabelling-orig.doc, and in the same directory, run:

curl -X POST -F"file=@BrDUlabelling-orig.doc" -H "content-type: multipart/form-data" 'http://localhost:8080/aspose/files?format=pdf' > test-out.pdf

A PDF file should be successfully generated.

Troubleshooting:

Go into the running container, obtain logs and send to ResearchSpace:

docker exec -it aspose-doc-converter bash

Log files will be in 'application.log' and a log file named after your installation.

Connecting RSpace to the Document converter service

In RSpace deployment.properties file, set the URL of the service. For example if the service is at http://123.79.78.21, add the following property:

aspose.web.url=http://123.79.78.21:8080

and restart RSpace.

Testing connection:

  • Export a single RSpace document to MSWord format.

SnapGene Service

Running SnapGene service

Assuming you are want to expose the service on port 8081: (8081 is also the port inside the container). Please note the version may change.

docker run -it -p8081:8081 --name snapgene-web --mount source=snapgene-logs,target=/snapgene-working,type=volume -d rspaceops/rspace-services:snapgene-web-0.0.5

Testing SnapGene service

The service takes about 30s to start up. Modify these tests if you are using another command-line browser or the URL is different.

A simple test for 'server up':

curl localhost:8081/snapgene/status

Testing SnapGene functionality:

Download this Genbank DNA sequence file: sequence.dna. Or download directly:

wget https://files.helpdocs.io/6vvf1kbpym/other/1582900258789/sequence.dna

and in the same directory, run:

curl -X POST -H"accept=application/json" -H"content-type: multipart/form-data" -F"cfg={};type=application/json" -F"file=@sequence.dna" -F"customerId=Customer1;type=text/plain" "localhost:8081/snapgene/reportEnzymes"

should output JSON response of restriction enyme cutting sites.

Troubleshooting:

Go into the running container, obtain logs and send to ResearchSpace:

docker exec -it snapgene-web bash

Log files will be in 'application.log' and a log file named after your installation.

Connecting RSpace to the SnapGene service

In RSpace deployment.properties file, set the URL of the service. For example if the service is at http://123.79.78.21:8081, add the following property:

snapgene.web.url=http://123.79.78.21:8081

and restart RSpace.

Now login as sysadmin user and enable the integration in System->Settings->Configuration. Set it as 'Available' and save the changes.

Testing SnapGene connection:

  • Upload a DNA sequence file in .dna, .fa or .gb format ( you can use the example file above) and assert that the functionality described here is available.


How did we do?


Powered by HelpDocs

Powered by HelpDocs