Getting Started

These are some brief instructions to get you up and running with Ontoserver.

System Requirements

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 4GB 12GB
Storage/Disk 10GB 20GB

Building indexes from sources (e.g. RF2) is very demanding on memory - in these cases, at least 12GB of RAM is recommended.

Set up your environment

  • Install Docker

    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

  • Establish an account with Docker Hub at https://hub.docker.com
  • Obtain an appropriate Licence:
    • Within Australia, email mailto:help@digitalhealth.gov.au to request a (free) Ontoserver licence. ADHA will then arrange authorisation for your Docker Hub account.
    • Elsewhere, email ontoserver-support@csiro.au to discuss licensing terms (both evaluation and production licences are available for single and multiple instances, no limit on number of users). Once the licence is established, CSIRO will register your Docker Hub account name to enable access to their repository
  • Log in to Docker Hub with:
    docker login

Basic Configuration

  • Create a text file called docker-compose.yml with the following contents (or download ./docker-compose.yml). Details on configuring NCTS_CLIENT_ID and NCTS_CLIENT_SECRET can be found here.
  • NOTE: By default, Ontoserver will run using SSL/TLS (i.e. https://). To disable SSL/TLS, add - ONTOSERVER_INSECURE=true to the environment section of the ontoserver container in the docker-compose.yml> file.
    version: '2'
    volumes:
      onto:
        driver: local
      pgdata:
        driver: local
    services:
      db:
        image: postgres
        volumes:
          - pgdata:/var/lib/postgresql/data
      ontoserver:
        image: aehrc/ontoserver:ctsa-5.0
        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
        volumes:
          - onto:/var/onto
    

Running Ontoserver

Starting

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.

Stopping

docker-compose stop

Get a SNOMED CT-AU version

docker exec ontoserver /index.sh -v 20170731

Note: Retrieving an SCT-AU index involves a download of approximately 300 megabytes; this may take a while.

Inspect the logs

docker logs ontoserver

Note: if you wish to see live updates to the logs, you should use docker logs -f ontoserver.