Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Dockerized VIVO

This project creates three dockerized containers,
This project creates four dockerized containers,
- `vivo` The vivo instance
- `solr` A standalone solr instance, based on a solr docker image
- `mariadb` A standalone mariadb instance.
- `mariadb` A standalone mariadb instance
- `tpf` A standalone [Triple Pattern Fragment server](https://linkeddatafragments.org/) that queries the vivo instance.

These images can be used together, or independently to setup some development or working VIVO docker instances.

Expand All @@ -21,16 +22,25 @@ Regardless of the usage, you will need to build the images, which require the fo
docker-compose up -d
```

### Verification

After running the above steps,
1. Verify your VIVO by navigating to:
- [http://localhost:8080/vivo/](http://localhost:8080/vivo/)
- username: vivo_root@mydomain.edu, password: rootPassword
1. Verify your Solr by navigating to:
- [http://localhost:8983/solr/](http://localhost:8983/solr/)
1. Verify your Triple Pattern Fragment server by navigating to:
- [http://localhost:7070/tpf/](http://localhost:7070/tpf/)

## VIVO Runtime Example

The example [docker-compose.yml](docker-compose.yml) is a typical installation for trying out a simple VIVO installation in docker. This file starts three containers and uses the standard SDB system with the mariadb backend. This example also shows how a local directory [example-config](example-config) is used to overwrite the default `runtime.properties` as installed by the Dockerfile. Here the root password, and the domain are modified.

```bash
docker-compose up -d
```
Will start this project. Navigating to http://localhost:8080/vivo will then start this simple instance.

If you get an error indicating that the database was not found, this could be due to a bug where the vivo instance is not waiting on the mariadb instance to initialize. IF you have this error, try `docker-compose down; docker-compose up -d`.
When navigating to http://localhost:8080/vivo/, if you get an error indicating that the database was not found, this could be due to a bug where the vivo instance is not waiting on the mariadb instance to initialize. IF you have this error, try `docker-compose down; docker-compose up -d`.


## VIVO Development
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ services:
ports:
- 8080:8080

tpf:
build:
context: ./tpf
volumes:
- ./tpf/config:/usr/local/tpf/config
ports:
- 7070:8080

volumes:
solr-data:
Expand Down
24 changes: 24 additions & 0 deletions tpf/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM tomcat:9.0.27-jdk8-openjdk

MAINTAINER Andrew Woods<awoods@lyrasis.org>

RUN apt-get update
RUN apt-get install -y maven git

ENV TPF_MD5 c8cdb3350a0b7cf94c6a3481ca12d8d8
ENV TPF_VERSION v0.2.4a

RUN mkdir -v /opt/tpf
WORKDIR /opt/tpf
RUN echo "$TPF_MD5 tpf.war" > tpf.war.md5
RUN wget -O tpf.war https://github.com/awoods/Server.Java/releases/download/${TPF_VERSION}/ldfserver-0.2.3.war && \
md5sum -c tpf.war.md5

RUN mkdir /usr/local/tomcat/webapps/tpf
WORKDIR /usr/local/tomcat/webapps/tpf
RUN jar xvf /opt/tpf/tpf.war

# Update the web.xml
COPY ./web.xml /usr/local/tomcat/webapps/tpf/WEB-INF/web.xml

RUN export CATALINA_OPTS="-Xms512m -Xmx512m -XX:MaxPermSize=128m"
Binary file added tpf/config/.config.json.swp
Binary file not shown.
46 changes: 46 additions & 0 deletions tpf/config/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"title": "VIVO Linked Data Fragments server",

"datasourcetypes": {
"SparqlDatasource" : "org.linkeddatafragments.datasource.sparql.SparqlDataSourceType"
},

"datasources": {
"vivo": {
"title": "VIVO Linked Data TPF",
"type": "SparqlDatasource",
"description": "VIVO Semantic TPF server",
"settings": { "endpoint": "http://vivo:8080/vivo/api/sparqlQuery",
"username": "vivo_root@mydomain.edu",
"password": "monkey" }
}
},

"prefixes": {
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"hydra": "http://www.w3.org/ns/hydra/core#",
"void": "http://rdfs.org/ns/void#",
"bibo": "http://purl.org/ontology/bibo/",
"c4o": "http://purl.org/spar/c4o/",
"cito": "http://purl.org/spar/cito/",
"dcterms": "http://purl.org/dc/terms/",
"event": "http://purl.org/NET/c4dm/event.owl#",
"fabio": "http://purl.org/spar/fabio/",
"foaf": "http://xmlns.com/foaf/0.1/",
"geo": "http://aims.fao.org/aos/geopolitical.owl#",
"obo": "http://purl.obolibrary.org/obo/",
"ocrer": "http://purl.org/net/OCRe/research.owl#",
"ocresst": "http://purl.org/net/OCRe/statistics.owl#",
"ocresd": "http://purl.org/net/OCRe/study_design.owl#",
"ocresp": "http://purl.org/net/OCRe/study_protocol.owl#",
"ro": "http://purl.obolibrary.org/obo/ro.owl#",
"skos": "http://www.w3.org/2004/02/skos/core#",
"swo": "http://www.ebi.ac.uk/efo/swo/",
"vcard": "http://www.w3.org/2006/vcard/ns#",
"vitro-public": "http://vitro.mannlib.cornell.edu/ns/vitro/public#",
"vivo": "http://vivoweb.org/ontology/core#",
"scires": "http://vivoweb.org/ontology/scientific-research#",
"vann": "http://purl.org/vocab/vann/"
}
}
17 changes: 17 additions & 0 deletions tpf/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Linked Data Fragments Server</display-name>
<servlet>
<display-name>TpfServlet</display-name>
<servlet-name>TpfServlet</servlet-name>
<servlet-class>org.linkeddatafragments.servlet.LinkedDataFragmentServlet</servlet-class>
<init-param>
<param-name>configFile</param-name>
<param-value>/usr/local/tpf/config/config.json</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>TpfServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>