Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

[root@host]# diff /opt/snow-owl/docker/ /opt/new-snow-owl-release/snow-owl/docker/
Common subdirectories: /opt/snow-owl/docker/configs and /opt/new-snow-owl-release/snow-owl/docker/configs
diff /opt/snow-owl/docker/.env /opt/new-snow-owl-release/snow-owl/docker/.env
10c10
< ELASTICSEARCH_VERSION=7.16.3
---
> ELASTICSEARCH_VERSION=7.17.1
24c24
< SNOWOWL_VERSION=8.1.0
---
> SNOWOWL_VERSION=8.1.1
tar --extract \
--gzip \
--verbose \
--same-owner \
--preserve-permissions \
--file=/path/to/snow-owl-linux-x86_64.tar.gz \
--directory=/opt/docker-compose pull
docker-compose up -dtar --extract \
--gzip \
--verbose \
--same-owner \
--preserve-permissions \
--file=snow-owl-resources.tar.gz \
--directory=/opt/snow-owl/resources/
chown -R 1000:0 /opt/snow-owl/resourcesroot@host:# docker exec -it backup bash
root@ad36cfb0448c:# /backup/restore.shdocker-compose stop snowowl elasticsearch ldapmv -t /tmp ./snow-owl/resources/indexes/nodesdocker-compose start elasticsearchroot@ad36cfb0448c:# /backup/restore.sh
################################
Snow Owl restore script STARTED.
#### Verify Elasticsearch snapshot repository ####
Checking existence of repository 'snowowl-snapshots' ...
Repository with name 'snowowl-snapshots' is present, verifying repository state ...
Repository 'snowowl-snapshots' is functional
#### Select backup to restore ####
Found 10 available backups under '/backup'
Please select the backup to restore by choosing the right number in the menu below (hit Enter when the selection was made)
1) snowowl-daily-20220323030001
2) snowowl-daily-20220324030001
3) snowowl-daily-20220325030002
4) snowowl-daily-20220326030002
5) snowowl-daily-20220329030001
6) snowowl-daily-20220330030001
7) snowowl-daily-20220331030002
8) snowowl-daily-20220401030002
9) snowowl-daily-20220402030001
10) snowowl-daily-20220405030002
#?
root@ad36cfb0448c:# exit
root@host:# docker-compose up -droot@host:# docker exec -it backup bash
root@ad36cfb0448c:# /backup/restore.sh -l[root@host]# pwd
/opt/snow-owl/docker/configs/cert
[root@host]# chmod +x init-certificate.sh
[root@host]# ./init-certificate.sh -h
DESCRIPTION:
Get certificate for the specified domain name using Let's Encrypt and certbot
OPTIONS:
-h
Show this help
-d domain
Define the domain name to get the certificate for
-e email (optional)
The email address to use for the certificate registration
EXAMPLES:
./init-certificate.sh -d mywebsite.com -e [email protected]
./init-certificate.sh -d example.com
./init-certificate.sh -d snow-owl.b2ihealthcare.com -e [email protected] nginx:
image: nginx:stable
container_name: nginx
volumes:
- ./configs/nginx/conf.d/:/etc/nginx/conf.d/
- ./configs/nginx/nginx.conf:/etc/nginx/nginx.conf
- ${CERT_FOLDER}/conf:/etc/letsencrypt
- ${CERT_FOLDER}/www:/var/www/certbot
depends_on:
- snowowl
ports:
- "80:80"
- "443:443"
# Reload nginx config every 6 hours and restart
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
restart: unless-stopped
certbot:
image: certbot/certbot:latest
container_name: certbot
volumes:
- ${CERT_FOLDER}/conf:/etc/letsencrypt
- ${CERT_FOLDER}/www:/var/www/certbot
# Check for SSL cert renewal every 12 hours
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
restart: unless-stoppedBACKUP_FOLDER=/mnt/external_folder
NUMBER_OF_DAILY_BACKUPS_TO_KEEP=10
CRON_DAYS=Tue-Sat
CRON_HOURS=2
CRON_MINUTES=0root@host:/# docker exec -it backup bash
root@ad36cfb0448c:/# /backup/backup.sh -l my-backup-labelsnow-owl/
├── backup
├── docker
│ ├── configs
│ │ ├── cert
│ │ │ ├── conf.d
│ │ │ ├── docker-compose-cert.yml
│ │ │ ├── docker-compose.yml
│ │ │ ├── init-certificate.sh
│ │ │ └── nginx.conf
│ │ ├── elasticsearch
│ │ │ ├── elasticsearch.yml
│ │ │ └── synonym.txt
│ │ ├── ldap-boostrap
│ │ │ ├── 100_groups.ldif
│ │ │ └── 200_users.ldif
│ │ ├── nginx
│ │ │ ├── conf.d
│ │ │ │ └── snowowl.conf
│ │ │ └── nginx.conf
│ │ └── snowowl
│ │ ├── snowowl.yml
│ │ └── users
│ ├── docker-compose.yml
│ ├── docker_login.txt
│ └── .env
├── ldap
├── logs
└── resources
├── attachments
└── indexes[root@host docker]# docker-compose ps -a[root@host ~]# docker-compose --file /opt/snow-owl/docker/docker-compose.yml ps -a
...
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION}
container_name: elasticsearch
...
ports:
- "9200:9200"POST /_security/api_key
{
"name": "syndication-api-key",
"expiration": "30d",
"role_descriptors": {
"syndicate-role": {
"cluster": [
"monitor"
],
"indices": [
{
"names": [
"*"
],
"privileges": [
"read"
]
}
]
}
}
}{
"id" : "<token_id>",
"name" : "syndication-api-key",
"expiration" : 0,
"api_key" : "<api_key>",
"encoded" : "<encoded_api_key>"
}{
token: "<snow-owl-api-key>"
}PUT /codesystems/example_codesystem_id
{
"settings": {
"distributable": true
}
}...
http.port: 9200
...
reindex.remote.whitelist: ["upstream-elasticsearch-url.com:9200", "other-upstream-elasticsearch-url.com:9200"]<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>urn:uuid:ddce3cd6-2efe-3142-9cce-62e73d3031ca</id>
<title>Snow Owl® Terminology Server Syndication Feed</title>
...
<entry>
<id>valuesets/1234/V1.0</id>
...
<title>Valueset example</title>
<category term="BINARY" scheme="https://b2ihealthcare.com/snow-owl/syndication/binary/1.0.0" label="Binary index"/>
...
</entry>
</feed>{
// Response
}{
"resource": "SNOMED-CT-US",
"version": "SNOMED-CT/2021-01-31"
}{
"resource": "SNOMED-CT-US, SNOMED-CT"
"version": ""
}{
"resource": "VS"
"version": "SNOMED-CT/2020-07-31"
}{
"resource": "CM"
"version": "LOINC/v2.72, ICD-10/v2019"
}{
"items": [
{
"id": "SNOMED-CT/2022-01-31",
"version": "2022-01-31",
"description": "2022-01-31",
"effectiveTime": "2022-01-31",
"resource": "codesystems/SNOMED-CT"
},
{
"id": "SNOMED-CT/2022-07-31",
"version": "2022-07-31",
"description": "2022-07-31",
"effectiveTime": "2022-07-31",
"resource": "codesystems/SNOMED-CT"
}
]
"limit": 50,
"total": 2
}htpasswd -nBC 10 my-new-username | head -n1 | sed 's/$2y/$2a/g' >> ./snow-owl/docker/configs/snowowl/users














./init-certificate.sh -d snow-owl.example.comchmod -R 1000:0 ./snow-owl/docker ./snow-owl/logs ./snow-owl/resourcescat docker_login.txt | docker login -u <username> --password-stdin https://docker.b2i.sgdocker-compose pulldocker-compose up -dcurl https://snow-owl.example.com/snowowl/infocurl http://hostname:8080/snowowl/inforepository:
index:
socketTimeout: 60000
clusterUrl: https://my-es-cluster.elastic-cloud.com:9243
clusterUsername: my-es-cluster-user
clusterPassword: my-es-cluster-pwd.
└── analysis
└── synonym.txt