Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
carueda committed Nov 29, 2017
0 parents commit e6a15bd
Show file tree
Hide file tree
Showing 5 changed files with 277 additions and 0 deletions.
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
This template is intended to facilitate the set-up of a brand new ORR instance.

Only requirements on your target machine are
[Docker Engine](https://docs.docker.com/engine/installation/)
and [Docker Compose](https://docs.docker.com/compose/install/).

With this template you can focus on the needed configuration
and let Docker take care of pulling the service images
and launching your ORR instance.

The steps are:

### Get the template

Download the latest template version from
https://github.com/mmisw/orr-instance-template/releases,
expand the tarball on your target machine
and `cd` to the home directory there.

Or, if you have a Git client:

git clone https://github.com/mmisw/orr-instance-template.git myORR
cd myORR
rm -rf .git
### Environment variables
`setenv.sh` can be used to define a number of environment variables
that are used in later steps:

vi setenv.sh
source setenv.sh

### Configuration
Edit `config/orront.conf`, the master configuration for your ORR instance.

Also, optionally, edit `config/notifyemails`.

### Launching

`docker-compose.yml` specifies the services comprising the ORR system.
No changes are typically needed in this file unless otherwise
indicated in ORR documentation, release notes, or other communications.

Launch the ORR system:

docker-compose up -d

### Documentation

More comprehensive install documentation is available at
https://mmisw.org/orrdoc/install/.
4 changes: 4 additions & 0 deletions config/notifyemails
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# List of email addresses to be notified upon any registration
# event (users, organizations, and ontologies).
# This file is checked whenever any of such events occurs.
# Put each email address in a line by itself below.
157 changes: 157 additions & 0 deletions config/orront.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
##############################################################################
# This is the master ORR configuration file.
##############################################################################

## The ${...} substitution syntax (e.g., ${branding.instanceName}) allows to
## refer # to the value assigned to a specific entry elsewhere in this file.
## The ${?...} substitution syntax allows to override settings via environment
## variables. See
## https://github.com/typesafehub/config#optional-system-or-env-variable-overrides

## ---------------------------------------------------------------------------
## There will be an "admin" user automatically created upon initial start of
## the ORR. This user will have all privileges on your ORR instance.
admin {
## (required) Password to be given to the ORR 'admin' user.
password = "actual-admin-pw"

## (required) Email address associated with the ORR 'admin' user.
email = "[email protected]"

## (optional) comma-separated list of additional usernames to be granted
## admin privilege right upon creation of the corresponding account.
#extra = "foo, bar"
}

## ---------------------------------------------------------------------------
## User authentication
auth {
## (required) A strong password to generate authentication tokens.
secret = "actual-strong-password"
}

## ---------------------------------------------------------------------------
## Info about the deployment of this ORR instance.
deployment {
## (required) The (external) URL of this ORR instance. No trailing slash.
url = "http://localhost:9090/ont"

## (required) The (external) URL of the SPARQL endpoint. No trailing slash.
sparqlEndpoint = "http://localhost:9090/sparql"
}

## ---------------------------------------------------------------------------
branding {
## (required) A short name used in email messages and other places.
instanceName = "MyORR"

## (optional) HTML fragment to be inserted right before </body>
footer = """
<div align="center">
MyORR footer
</div>
"""

## (optional) URL of image to show in the page header.
## By default, this will be MMI ORR's logo.
#logo = "?"

## (optional) URL for "Terms of Use" link.
## No default value (so no such link is shown).
#tou = "?"

## (optional) "Contact us" link.
## No default value (so no such link is shown).
## Examples: "https://somewhere/contactus", "mailto:[email protected]"
#contactUs = "mailto:"${admin.email}
}

## ---------------------------------------------------------------------------
## Optional section.
#googleAnalytics {
# propertyId = "?"
#}

## ---------------------------------------------------------------------------
## Optional section.
## See https://www.google.com/recaptcha/intro/.
#recaptcha {
# privateKey = "?"
# siteKey = "?"
#}

## ---------------------------------------------------------------------------
## MongoDB
mongo {
## (required) Name of Mongo database to be used for ORR purposes.
## Can be changed if desired/needed.
db = "orr-ont"

## (required) Mongo server host. Should be same value as indicated in
## `docker-compose.yml` for the environment of the orr service.
host = "mongo"

## (required) Mongo server port. Should be same value as indicated in
## `docker-compose.yml` for the environment of the orr service.
port = 27017
}

## ---------------------------------------------------------------------------
## files: managed file locations.
files {
## DO NOT change this.
baseDirectory = "/opt/orr-ont-base-directory"
}

## ---------------------------------------------------------------------------
## AllegroGraph server (which supports the triple store and SPARQL endpoint)
agraph {
## (required) The AG username to access the triple store
userName = "test"

## (required) The password for the AG username above:
password = "actual-pw"

## (required) Name of the AG repository for the ORR.
## Can be changed if desired.
repoName = "mmiorr"

## (required) AGraph server host. Should be same value as indicated in
## `docker-compose.yml` for the environment of the orr service.
host = "agraph"

## (required) AGraph server port. Should be same value as indicated in
## `docker-compose.yml` for the environment of the orr service.
port = 10035

## DO NOT change:
sparqlEndpoint = "http://"${agraph.host}":"${agraph.port}/repositories/${agraph.repoName}

## initDelay: (optional) Re-attempt triple store initialization after this delay.
initDelay = 20 seconds
}

## ---------------------------------------------------------------------------
## (Required) email related information used for user account management and
## notifications.
email {
## (required) account used for sending emails
account {
username = "[email protected]"
password = "actual-pw"
}

## (required) corresponding email server for the account above.
server {
host = "?"
port = 465
prot = "smtps"
debug = false
}

## info used to compose emails (when user resets password; notifications
## about registrations, etc.):
from = ${branding.instanceName}" <"${admin.email}">"
replyTo = ${admin.email}
mailer = ${branding.instanceName}
}
44 changes: 44 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
version: '2'

services:
orr:
image: mmisw/orr:3.7.0
container_name: orr
depends_on:
- agraph
- mongo

ports:
- "${ORR_HOST_PORT}:8080"

volumes:
- ${HOST_CONFIG_DIR}:/etc/orront
- ${ORR_HOST_DATA}:/opt/orr-ont-base-directory

environment:
- MONGO_HOST=mongo
- MONGO_PORT=27017

- AGRAPH_HOST=agraph
- AGRAPH_PORT=10035

agraph:
image: franzinc/agraph:v6.1.1
container_name: agraph
mem_limit: 1g

ports:
- "${AGRAPH_HOST_PORT}:10035"

volumes:
- ${ORR_HOST_DATA}:/opt/orr-ont-base-directory

mongo:
image: mongo
container_name: mongo

ports:
- "${MONGO_HOST_PORT}:27017"

volumes:
- ${MONGO_HOST_DATA}:/data/db
19 changes: 19 additions & 0 deletions setenv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Define these environment variables prior to running your ORR instance.

# Configuration directory on the host
export HOST_CONFIG_DIR=$PWD/config

# Host ORR data directory
export ORR_HOST_DATA=$PWD/orr_data

# Host port for the ORR service
export ORR_HOST_PORT=9090

# Host Mongo data directory
export MONGO_HOST_DATA=$PWD/mongo_data

# Host port for the Mongo service
export MONGO_HOST_PORT=27017

# Host port for the AGraph service
export AGRAPH_HOST_PORT=10035

0 comments on commit e6a15bd

Please sign in to comment.