Snowstorm is a SNOMED CT terminology server built on top of Elasticsearch, with a focus on performance and enterprise scalability.
Snowstorm Server can be installed by Helm chart.
NB! This is not official chart. It's made only for testing purposes.
docker-compose.yml Original file
version: '2.1'
services:
elasticsearch:
restart: unless-stopped
image: docker.elastic.co/elasticsearch/elasticsearch:7.7.0
container_name: elasticsearch
environment:
- node.name=snowstorm
- cluster.name=snowstorm-cluster
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms2g -Xmx4g"
volumes:
- /opt/snomed/data:/usr/share/elasticsearch/data
networks:
elastic:
aliases:
- es
healthcheck:
test: ["CMD", "curl", "-f", "http://elasticsearch:9200"]
interval: 1s
timeout: 1s
retries: 60
ports:
- 127.0.0.1:9200:9200
mem_reservation: 5g
snowstorm:
restart: unless-stopped
image: snomedinternational/snowstorm:7.0.1
container_name: snowstorm
depends_on:
elasticsearch:
condition: service_healthy
entrypoint: java -Xms2g -Xmx4g -jar snowstorm.jar --elasticsearch.urls=http://elasticsearch:9200
networks:
- elastic
ports:
- 8080:8080
networks:
elastic:
Implements basic authentication for snowstorm service.
Example configuration:
server {
server_name snowstorm.kodality.dev;
auth_basic "Authenticate yourself!";
auth_basic_user_file /etc/nginx/.htpasswd; #user-password credentials
client_max_body_size 2G; # allow huge file uploads
add_header Strict-Transport-Security "max-age=0";
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080/;
}
listen 443 ssl; # managed by Certbot
ssl_certificate .../fullchain.pem; # managed by Certbot
ssl_certificate_key .../privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = snowstorm.kodality.dev) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name snowstorm.kodality.dev;
listen 80;
return 404; # managed by Certbot
}
htpasswd tool was used to create basic credentials file.
To change password use htpasswd /etc/nginx/.htpasswd username
where 'username' is replaced with actual value.
If you don't have acces contact the National Release Center or become a member of SNOMED .
POST: /imports
the endpoint, insert it into the body{
"branchPath": "MAIN",
"createCodeSystemVersion": true,
"type": "SNAPSHOT"
}
and press "Try it now".
Within curl
curl -v -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
"branchPath": "MAIN",
"createCodeSystemVersion": true,
"type": "SNAPSHOT"
}' 'http://localhost:8080/imports'
Where 'http://localhost:8080/imports' is the address of Snowstorm server.
Store the identifier of the import (it will look like this - d0b30d96-3714-443e-99a5-2f282b1f1b0). It will be needed for the next steps.
POST imports/archive
the endpoint and specify the import identifier from the previous step and the file name.curl -X POST --header 'Content-Type: multipart/form-data' \
--header 'Accept: application/json' \
-F file=@init/'1. SnomedCT_InternationalRF2_PRODUCTION_20200731T120000Z.zip' \
'http://localhost:8080/imports/<import-id>/archive'
Create a code system
endpoint.{
"branchPath": "MAIN/SNOMEDCT-EE",
"shortName": "SNOMEDCT-EE"
}
or within curl
curl -v -X POST --header 'Content-Type: application/json' \
--header 'Accept: application/json' -d '{
"branchPath": "MAIN/SNOMEDCT-EE",
"shortName": "SNOMEDCT-EE"
}' 'http://localhost:8080/codesystems'
Import
endpoint in Swagger UI and then create a new import using:{
"branchPath": "MAIN/SNOMEDCT-EE",
"createCodeSystemVersion": true,
"type": "SNAPSHOT"
}
or use curl
curl -v -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
"branchPath": "MAIN/SNOMEDCT-EE",
"createCodeSystemVersion": true,
"type": "SNAPSHOT"
}' 'http://localhost:8080/imports'
Within Swagger UI select POST imports/archive
the endpoint and specify the import identifier from the previous step and the file name.
Within curl
curl -v -X POST --header 'Content-Type: multipart/form-data' --header 'Accept: application/json' \
-F file=@SnomedCT_ManagedServiceEE_PRODUCTION_EE1000181_20200530T120000Z.zip \
'http://localhost:8080/imports/<importid>/archive'