Skip to content

Commit e6a15bd

Browse files
committed
initial commit
0 parents  commit e6a15bd

File tree

5 files changed

+277
-0
lines changed

5 files changed

+277
-0
lines changed

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
This template is intended to facilitate the set-up of a brand new ORR instance.
2+
3+
Only requirements on your target machine are
4+
[Docker Engine](https://docs.docker.com/engine/installation/)
5+
and [Docker Compose](https://docs.docker.com/compose/install/).
6+
7+
With this template you can focus on the needed configuration
8+
and let Docker take care of pulling the service images
9+
and launching your ORR instance.
10+
11+
The steps are:
12+
13+
### Get the template
14+
15+
Download the latest template version from
16+
https://github.com/mmisw/orr-instance-template/releases,
17+
expand the tarball on your target machine
18+
and `cd` to the home directory there.
19+
20+
Or, if you have a Git client:
21+
22+
git clone https://github.com/mmisw/orr-instance-template.git myORR
23+
cd myORR
24+
rm -rf .git
25+
26+
### Environment variables
27+
28+
`setenv.sh` can be used to define a number of environment variables
29+
that are used in later steps:
30+
31+
vi setenv.sh
32+
source setenv.sh
33+
34+
### Configuration
35+
36+
Edit `config/orront.conf`, the master configuration for your ORR instance.
37+
38+
Also, optionally, edit `config/notifyemails`.
39+
40+
### Launching
41+
42+
`docker-compose.yml` specifies the services comprising the ORR system.
43+
No changes are typically needed in this file unless otherwise
44+
indicated in ORR documentation, release notes, or other communications.
45+
46+
Launch the ORR system:
47+
48+
docker-compose up -d
49+
50+
### Documentation
51+
52+
More comprehensive install documentation is available at
53+
https://mmisw.org/orrdoc/install/.

config/notifyemails

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# List of email addresses to be notified upon any registration
2+
# event (users, organizations, and ontologies).
3+
# This file is checked whenever any of such events occurs.
4+
# Put each email address in a line by itself below.

config/orront.conf

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
##############################################################################
2+
# This is the master ORR configuration file.
3+
##############################################################################
4+
5+
## The ${...} substitution syntax (e.g., ${branding.instanceName}) allows to
6+
## refer # to the value assigned to a specific entry elsewhere in this file.
7+
## The ${?...} substitution syntax allows to override settings via environment
8+
## variables. See
9+
## https://github.com/typesafehub/config#optional-system-or-env-variable-overrides
10+
11+
## ---------------------------------------------------------------------------
12+
## There will be an "admin" user automatically created upon initial start of
13+
## the ORR. This user will have all privileges on your ORR instance.
14+
admin {
15+
## (required) Password to be given to the ORR 'admin' user.
16+
password = "actual-admin-pw"
17+
18+
## (required) Email address associated with the ORR 'admin' user.
19+
20+
21+
## (optional) comma-separated list of additional usernames to be granted
22+
## admin privilege right upon creation of the corresponding account.
23+
#extra = "foo, bar"
24+
}
25+
26+
## ---------------------------------------------------------------------------
27+
## User authentication
28+
auth {
29+
## (required) A strong password to generate authentication tokens.
30+
secret = "actual-strong-password"
31+
}
32+
33+
## ---------------------------------------------------------------------------
34+
## Info about the deployment of this ORR instance.
35+
deployment {
36+
## (required) The (external) URL of this ORR instance. No trailing slash.
37+
url = "http://localhost:9090/ont"
38+
39+
## (required) The (external) URL of the SPARQL endpoint. No trailing slash.
40+
sparqlEndpoint = "http://localhost:9090/sparql"
41+
}
42+
43+
## ---------------------------------------------------------------------------
44+
branding {
45+
## (required) A short name used in email messages and other places.
46+
instanceName = "MyORR"
47+
48+
## (optional) HTML fragment to be inserted right before </body>
49+
footer = """
50+
<div align="center">
51+
MyORR footer
52+
</div>
53+
"""
54+
55+
## (optional) URL of image to show in the page header.
56+
## By default, this will be MMI ORR's logo.
57+
#logo = "?"
58+
59+
## (optional) URL for "Terms of Use" link.
60+
## No default value (so no such link is shown).
61+
#tou = "?"
62+
63+
## (optional) "Contact us" link.
64+
## No default value (so no such link is shown).
65+
## Examples: "https://somewhere/contactus", "mailto:[email protected]"
66+
#contactUs = "mailto:"${admin.email}
67+
}
68+
69+
## ---------------------------------------------------------------------------
70+
## Optional section.
71+
#googleAnalytics {
72+
# propertyId = "?"
73+
#}
74+
75+
## ---------------------------------------------------------------------------
76+
## Optional section.
77+
## See https://www.google.com/recaptcha/intro/.
78+
#recaptcha {
79+
# privateKey = "?"
80+
# siteKey = "?"
81+
#}
82+
83+
## ---------------------------------------------------------------------------
84+
## MongoDB
85+
mongo {
86+
## (required) Name of Mongo database to be used for ORR purposes.
87+
## Can be changed if desired/needed.
88+
db = "orr-ont"
89+
90+
## (required) Mongo server host. Should be same value as indicated in
91+
## `docker-compose.yml` for the environment of the orr service.
92+
host = "mongo"
93+
94+
## (required) Mongo server port. Should be same value as indicated in
95+
## `docker-compose.yml` for the environment of the orr service.
96+
port = 27017
97+
}
98+
99+
## ---------------------------------------------------------------------------
100+
## files: managed file locations.
101+
files {
102+
## DO NOT change this.
103+
baseDirectory = "/opt/orr-ont-base-directory"
104+
}
105+
106+
## ---------------------------------------------------------------------------
107+
## AllegroGraph server (which supports the triple store and SPARQL endpoint)
108+
agraph {
109+
## (required) The AG username to access the triple store
110+
userName = "test"
111+
112+
## (required) The password for the AG username above:
113+
password = "actual-pw"
114+
115+
## (required) Name of the AG repository for the ORR.
116+
## Can be changed if desired.
117+
repoName = "mmiorr"
118+
119+
## (required) AGraph server host. Should be same value as indicated in
120+
## `docker-compose.yml` for the environment of the orr service.
121+
host = "agraph"
122+
123+
## (required) AGraph server port. Should be same value as indicated in
124+
## `docker-compose.yml` for the environment of the orr service.
125+
port = 10035
126+
127+
## DO NOT change:
128+
sparqlEndpoint = "http://"${agraph.host}":"${agraph.port}/repositories/${agraph.repoName}
129+
130+
## initDelay: (optional) Re-attempt triple store initialization after this delay.
131+
initDelay = 20 seconds
132+
}
133+
134+
## ---------------------------------------------------------------------------
135+
## (Required) email related information used for user account management and
136+
## notifications.
137+
email {
138+
## (required) account used for sending emails
139+
account {
140+
username = "[email protected]"
141+
password = "actual-pw"
142+
}
143+
144+
## (required) corresponding email server for the account above.
145+
server {
146+
host = "?"
147+
port = 465
148+
prot = "smtps"
149+
debug = false
150+
}
151+
152+
## info used to compose emails (when user resets password; notifications
153+
## about registrations, etc.):
154+
from = ${branding.instanceName}" <"${admin.email}">"
155+
replyTo = ${admin.email}
156+
mailer = ${branding.instanceName}
157+
}

docker-compose.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
version: '2'
2+
3+
services:
4+
orr:
5+
image: mmisw/orr:3.7.0
6+
container_name: orr
7+
depends_on:
8+
- agraph
9+
- mongo
10+
11+
ports:
12+
- "${ORR_HOST_PORT}:8080"
13+
14+
volumes:
15+
- ${HOST_CONFIG_DIR}:/etc/orront
16+
- ${ORR_HOST_DATA}:/opt/orr-ont-base-directory
17+
18+
environment:
19+
- MONGO_HOST=mongo
20+
- MONGO_PORT=27017
21+
22+
- AGRAPH_HOST=agraph
23+
- AGRAPH_PORT=10035
24+
25+
agraph:
26+
image: franzinc/agraph:v6.1.1
27+
container_name: agraph
28+
mem_limit: 1g
29+
30+
ports:
31+
- "${AGRAPH_HOST_PORT}:10035"
32+
33+
volumes:
34+
- ${ORR_HOST_DATA}:/opt/orr-ont-base-directory
35+
36+
mongo:
37+
image: mongo
38+
container_name: mongo
39+
40+
ports:
41+
- "${MONGO_HOST_PORT}:27017"
42+
43+
volumes:
44+
- ${MONGO_HOST_DATA}:/data/db

setenv.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Define these environment variables prior to running your ORR instance.
2+
3+
# Configuration directory on the host
4+
export HOST_CONFIG_DIR=$PWD/config
5+
6+
# Host ORR data directory
7+
export ORR_HOST_DATA=$PWD/orr_data
8+
9+
# Host port for the ORR service
10+
export ORR_HOST_PORT=9090
11+
12+
# Host Mongo data directory
13+
export MONGO_HOST_DATA=$PWD/mongo_data
14+
15+
# Host port for the Mongo service
16+
export MONGO_HOST_PORT=27017
17+
18+
# Host port for the AGraph service
19+
export AGRAPH_HOST_PORT=10035

0 commit comments

Comments
 (0)