-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into pva/EVSRESTAPI-557-postman-content-qa
- Loading branch information
Showing
10 changed files
with
399 additions
and
434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# EVSRESTAPI - JENA SETUP | ||
|
||
Information on using Apache jena/fuseki with EVSRESTAPI. | ||
|
||
## Build and run a local docker image | ||
|
||
Run the following command to build the Jena image: | ||
|
||
```bash | ||
cd docker/fuseki | ||
docker build -t evsrestapi/fuseki:5.1.0 . | ||
``` | ||
|
||
### Running Jena Locally (after data is loaded) | ||
|
||
Start the container with the following command. | ||
Note: you need the src mount path to a local directory of your choice to persist the data. | ||
|
||
```bash | ||
dir=c:/Users/carlsenbr/eclipse-workspace/data/fuseki | ||
docker run -d --name=jena_evs --rm -p "3030:3030" -v"$dir":/opt/fuseki/run/databases evsrestapi/fuseki:5.1.0 | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM bellsoft/liberica-openjre-alpine:17.0.13 | ||
|
||
# Set environment variables | ||
ENV FUSEKI_VERSION=5.1.0 | ||
ENV FUSEKI_HOME=/opt/fuseki | ||
ENV FUSEKI_BASE=/opt/fuseki/run | ||
|
||
# Install necessary packages | ||
RUN apk add --no-cache curl unzip bash | ||
|
||
# Create directories | ||
RUN mkdir -p ${FUSEKI_HOME} ${FUSEKI_BASE} | ||
|
||
# Download and unzip Fuseki | ||
RUN curl -L -o /tmp/apache-jena-fuseki-${FUSEKI_VERSION}.zip \ | ||
https://archive.apache.org/dist/jena/binaries/apache-jena-fuseki-${FUSEKI_VERSION}.zip && \ | ||
unzip /tmp/apache-jena-fuseki-${FUSEKI_VERSION}.zip -d /tmp && \ | ||
mv /tmp/apache-jena-fuseki-${FUSEKI_VERSION}/* ${FUSEKI_HOME} && \ | ||
rm /tmp/apache-jena-fuseki-${FUSEKI_VERSION}.zip | ||
|
||
# Expose the default Fuseki port | ||
EXPOSE 3030 | ||
|
||
# Set the working directory | ||
WORKDIR ${FUSEKI_HOME} | ||
COPY ./shiro.ini ${FUSEKI_HOME}/run/shiro.ini | ||
# Start Fuseki | ||
#CMD ["./fuseki-server", "--update", "--loc=/opt/fuseki/run/databases","/NCIT2"] | ||
#CMD ["./fuseki", "start"] | ||
#CMD ["./fuseki-server", "--update"] | ||
COPY entrypoint.sh /opt/fuseki/entrypoint.sh | ||
RUN chmod +x /opt/fuseki/entrypoint.sh | ||
ENTRYPOINT ["/opt/fuseki/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# Start the fuseki-server | ||
./fuseki start | ||
|
||
# Wait for the server to start | ||
sleep 10 | ||
|
||
# Create the NCIT2 dataset | ||
curl -s -g -X POST -d "dbName=NCIT2&dbType=tdb2" "http://localhost:3030/\$/datasets" | ||
|
||
# Create the CTRP dataset | ||
curl -s -g -X POST -d "dbName=CTRP&dbType=tdb2" "http://localhost:3030/\$/datasets" | ||
|
||
# Keep the container running | ||
tail -f /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
[main] | ||
# Development | ||
ssl.enabled = false | ||
|
||
plainMatcher=org.apache.shiro.authc.credential.SimpleCredentialsMatcher | ||
#iniRealm=org.apache.shiro.realm.text.IniRealm | ||
iniRealm.credentialsMatcher = $plainMatcher | ||
|
||
localhostFilter=org.apache.jena.fuseki.authz.LocalhostFilter | ||
|
||
[users] | ||
# Implicitly adds "iniRealm = org.apache.shiro.realm.text.IniRealm" | ||
admin=pw | ||
|
||
[roles] | ||
|
||
[urls] | ||
## Control functions open to anyone | ||
/$/status = anon | ||
/$/server = anon | ||
/$/ping = anon | ||
/$/metrics = anon | ||
|
||
## and the rest are restricted to localhost. | ||
#/$/** = localhostFilter | ||
|
||
## If you want simple, basic authentication user/password | ||
## on the operations, | ||
## 1 - set a better password in [users] above. | ||
## 2 - comment out the "/$/** = localhost" line and use: | ||
## "/$/** = authcBasic,user[admin]" | ||
|
||
## or to allow any access. | ||
##/$/** = anon | ||
|
||
# Everything else | ||
/**=anon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.