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:
- MSOffice document converter. This provides the same functionality as the 'aspose-app' standalone Java application but is more performant and scalable.
- SnapGene viewer for DNA sequence files. See SnapGene integration for the functionality provided.
- A Chemistry service for generating images of uploaded Chemistry files.
Obtaining Docker images
At present, we will provide access to a private Dockerhub repository. This is likely to change in the future.
Document converter
Version 0.0.14 includes a new license required from January 28th 2024
docker pull rspaceops/rspace-services:aspose-web-0.0.14
SnapGene viewer:
docker pull rspaceops/rspace-services:snapgene-web-0.0.9
Chemistry viewer:
docker pull rspaceops/rspace-services:chemistry-web-1.2
Running a service
General steps:
- Decide on which port you want to expose the service.
- Decide on the URL of the service (or this can just be an IP address).
- Decide if you need to encrypt communications using TLS. This will be necessary if communication between RSpace and the service goes over public networks.
None of these services require access from a browser, so can be run in a private network accessible only from RSpace web server.
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.
Aspose Document Converter Service
Running Document converter service
Assuming you are want to expose the service on port 8081: (8060 is the port inside the container). Please note the version may change. The --restart unless-stopped
will ensure the container starts up following a host reboot.
docker run -p8081:8060--restart unless-stopped --name aspose-doc-converter --mount source=aspose-logs,target=/logs,type=volume -d rspaceops/rspace-services:aspose-web-0.0.14
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:8081/actuator/info
Testing document conversion:
Download this file: br-dulabelling-orig.doc
wget https://files.helpdocs.io/6vvf1kbpym/other/1582895192769/br-dulabelling-orig.doc
and in the same directory, run:
curl -X POST -F"file=@br-dulabelling-orig.doc" -H "content-type: multipart/form-data" 'http://localhost:8081/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 Research Space:
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 8082: (8081 is the port inside the container). Please note the version may change.
docker run -it -p8082:8081 --restart unless-stopped--name snapgene-web --mount source=snapgene-logs,target=/snapgene-working,type=volume -d rspaceops/rspace-services:snapgene-web-0.0.9
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:8082/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:8082/snapgene/reportEnzymes"
should output the JSON response, of restriction enzyme cutting sites.
Troubleshooting:
Go into the running container, obtain logs and send to Research Space:
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.
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.
Chemistry Service
Running Chemistry service
Assuming you are want to expose the service on port 8099: (8060 is the port inside the container). Please note the version may change.
docker run -p8083:8060 --name chemistry-web --restart always --mount source=chemistry-logs,target=/logs -d rspaceops/rspace-services:chemistry-web-1.2
Testing Chemistry service
The service takes about 3s 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:8083/actuator/info
Testing Chemistry functionality:
Download this file, which contains a small chemistry structure: exportChem.json. Or download directly:
wget https://files.helpdocs.io/6vvf1kbpym/other/1634206422450/export-chem.json
and in the same directory, run:
curl -vX POST http://localhost:8083/chemistry/export -d @export-chem.json --header "Content-Type: application/json" -o image_preview.png
should save a PNG image of a chemical 'image_preview.png'.
Troubleshooting:
Go into the running container, obtain logs and send to Research Space:
docker exec -it chemistry-web bash
Log files will be in 'application.log'
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:
chemistry.web.url=http://123.79.78.21:8083
and restart RSpace.
Testing chemistry-web connection in RSpace:
- Upload a Chemistry file into an RSpace document. Most common file formats should be supported. An image preview should be generated.