These are some brief instructions to get you up and running with Ontoserver.
Make sure you check the details of the latest changes.
The requirements for running an Ontoserver instance are heavily dependent on the intended usage. For the basic usage pattern (< 20 concurrent users, syndicating a small number of binary indexes but not building indexes from source), the following resource levels are recommended (on top of a 64-bit docker machine)
Resource | Minimum | Recommended |
CPUs or Cores | 2 | 4 |
RAM | 2GB | 8GB |
Storage/Disk | 10GB | 20GB |
Building indexes from sources (e.g. RF2) is very demanding on memory - in these cases, at least 16GB of RAM is recommended.
In order to run Ontoserver, you first need a Docker Machine. This will allow you to control the hosts (whether real or virtual, local or remote) on which Ontoserver and its database will run.
The simplest method is to download and install Docker Toolbox https://www.docker.com/products/docker-toolbox
This should provide you with both the docker
and docker-compose
commands.
If you wish to run Ontoserver on a remote virtual host, you may need to configure the appropriate drivers
docker login
JAVA_OPTS=-Xmx
as per below, as the defaults can be unreliable.- ONTOSERVER_INSECURE=true
to the environment
section of the ontoserver
container in the docker-compose.yml
file.
version: '3' volumes: onto: driver: local pgdata: driver: local services: db: image: postgres:12 volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 environment: - POSTGRES_HOST_AUTH_METHOD=trust ontoserver: image: aehrc/ontoserver:ctsa-5.8 container_name: ontoserver depends_on: - db ports: - "8443:8443" - "8080:8080" environment: - authentication.oauth.endpoint.client_id.0=NCTS_ACCESS_CODE - authentication.oauth.endpoint.client_secret.0=NCTS_CLIENT_SECRET - JAVA_OPTS=-Xmx2G # Minimum # - JAVA_OPTS=-Xmx8G # Preferred volumes: - onto:/var/onto
docker-compose up -d
Note: Ontoserver can take a short while (up to 60 seconds) to start up. During this time it will not respond to requests such as downloading an SCT-AU version.
docker-compose stop
docker exec ontoserver /index.sh
docker exec ontoserver /index.sh -v 20191231
Note: Retrieving a SNOMED index involves a large download; this may take a while, depending on network bandwidth.
index.sh
docker exec ontoserver /index.sh -h
docker logs ontoserver
Note: if you wish to see live updates to the logs, you should use
docker logs -f ontoserver