Skip to content

Commit 7e36247

Browse files
committed
Cleanup docker compose file
- use GlobusExt as default - comment values in .env.example - align with https://www.openem.ch/documentation/admin/installation/ingestor
1 parent 49e3d01 commit 7e36247

3 files changed

Lines changed: 56 additions & 60 deletions

File tree

.env.example

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
1-
# URL for the ingestor
2-
INGESTOR_DOMAIN=https://ingestor.example.com
3-
# Path the the data directory on the docker host
1+
# Facility Specific Configuration
2+
3+
## Facility name; used in some naming conventions
4+
FACILITY=FACILITY
5+
6+
## Ingestor version
7+
INGESTOR_VERSION=main
8+
## URL of the ingestor
9+
INGESTOR_DOMAIN=https://ingestor.facility.ch
10+
11+
## Path the the data directory on the docker host
412
HOST_COLLECTION_PATH=/path/to/data
13+
## Name of the collection
14+
HOST_COLLECTION_NAME=DataRepositoryName
515

6-
# Facility name; used in some naming conventions
7-
FACILITY=myfacility
16+
## Source facility ()
17+
GLOBUS_SOURCE_FACILITY=DCIL
18+
## Destination facility (PSI_QA, PSI_DEC, PSI)
19+
GLOBUS_DESTINATION_FACILITY=PSI
20+
## In most cases globus and the ingestor use the same as HOST_COLLECTION_PATH
21+
GLOBUS_COLLECTION_ROOT_PATH=/path/to/data
822

23+
## The facility's id within the identity provider
24+
KEYCLOAK_CLIENT_ID=openem-ingestor-FACILITY
25+
26+
## CS value for life science metadata extractor
27+
INSTRUMENT_CS_VALUE=2.7
928

1029
# PSI Scicat settings
1130
SCICAT_BACKEND_URL=https://scicat.development.psi.ch
1231
SCICAT_FRONTEND_URL=https://discovery.development.psi.ch
32+
GLOBUS_TRANSFER_PROXY_URL=https://globus-proxy.development.psi.ch
1333
KEYCLOAK_URL=https://kc.development.psi.ch
1434
KEYCLOAK_REALM=awi
15-
KEYCLOAK_CLIENT_ID=openem-ingestor-$FACILITY
16-
17-
GLOBUS_CLIENT_ID=
18-
GLOBUS_SOURCE_COLLECTION_ID=
19-
# In most cases globus and the ingestor use the same data directory
20-
GLOBUS_COLLECTION_ROOT_PATH=$HOST_COLLECTION_PATH

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
# OpenEm Ingestor Service Deployment
2+
13
## Configuration
24

35
Create a `.env` file with all required variables (see [.env.example](./.env.example))
46

57
Update `services/caddy/config/Caddyfile` to match these as well. (TODO: centralize all
68
configuration in `.env`.)
79

10+
11+
Detailed documentation about the variables can be found at <https://www.openem.ch/documentation/admin/installation/ingestor>
12+
13+
814
### HTTPS
915

1016
TLS certificates should be configured in `Caddyfile` if needed. The default

services/ingestor/compose.yaml

Lines changed: 25 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,21 @@
11
services:
22
ingestor:
3-
image: ghcr.io/swissopenem/ingestor:main
3+
image: ghcr.io/swissopenem/ingestor:${INGESTOR_VERSION:-latest}
4+
container_name: openem-ingestor
5+
ports:
6+
- "8080:8080"
47
env_file:
5-
- ./config/.env
6-
- ${PWD}/.env
8+
- ${PWD}/.env.example
9+
environment:
10+
GIN_MODE: release
711
user: "${UID:-0}:${GID:-0}"
812
configs:
913
- source: openem-ingestor-config.yaml
1014
target: /app/openem-ingestor-config.yaml
15+
restart:
16+
unless-stopped
1117
volumes:
1218
- ${HOST_COLLECTION_PATH}:/mnt/collection_location:ro
13-
# Enable this to mount network NFS share
14-
# - collection_location_nfs_share:/mnt/collection_location
15-
labels:
16-
- "traefik.enable=true"
17-
- "traefik.http.routers.ingestor.rule=Host(`emf-ingestor.psi.ch`)"
18-
- "traefik.http.routers.ingestor.entrypoints=websecure"
19-
- "traefik.http.routers.ingestor.tls.certresolver=leresolver"
20-
# Enable and configure this to mount NFS share
21-
# collection_location_nfs_share:
22-
# driver_opts:
23-
# type: "nfs"
24-
# o: "nfsvers=3,addr=${NFS_SERVER_ADDRESS},nolock,ro"
2519

2620
configs:
2721
openem-ingestor-config.yaml:
@@ -30,26 +24,12 @@ configs:
3024
Host: ${SCICAT_BACKEND_URL}/api/v3
3125
Transfer:
3226
StorageLocation: PSI
33-
Method: S3
34-
#Method: Globus
35-
S3:
36-
Endpoint: "https://s3.development.psi.ch:9000"
37-
TokenUrl: "https://s3.development.psi.ch:9000/token"
38-
ChunkSizeMB: 1000
39-
ConcurrentFiles: 2
40-
PoolSize: 10
41-
42-
Globus:
43-
ClientId: ${GLOBUS_CLIENT_ID}
44-
RedirectUrl: "https://auth.globus.org/v2/web/auth-code"
45-
46-
SourceCollectionID: ${GLOBUS_SOURCE_COLLECTION_ID}
27+
Method: ExtGlobus
28+
ExtGlobus:
29+
TransferServiceUrl: ${GLOBUS_TRANSFER_PROXY_URL}
30+
SrcFacility: ${GLOBUS_SOURCE_FACILITY}
31+
DstFacility: ${GLOBUS_DESTINATION_FACILITY}
4732
CollectionRootPath: ${GLOBUS_COLLECTION_ROOT_PATH}
48-
# Paul Scherrer Institute - SciCat QA
49-
DestinationCollectionID: "33f12025-7098-4774-bb13-5134b4d0587a"
50-
DestinationTemplate: "/test2/{{ .Username }}/{{ replace .Pid \".\" \"_\" }}/{{ .DatasetFolder }}"
51-
Scopes:
52-
- "urn:globus:auth:scope:transfer.api.globus.org:all[*https://auth.globus.org/scopes/33f12025-7098-4774-bb13-5134b4d0587a/data_access]"
5333
5434
MetadataExtractors:
5535
InstallationPath: ./extractors/
@@ -62,37 +42,33 @@ configs:
6242
Executable: LS_Metadata_reader
6343
Checksum: 83ae1b2d469cec10fdcc3ad7cb6c824a389e501e7142417792f2ac836ab174c3
6444
ChecksumAlg: sha256
65-
CommandLineTemplate: "-i '{{.SourceFolder}}' -o '{{.OutputFile}}' --cs 2.7 --folder_filter=^.*(?i)(metadata).*$"
66-
AdditionalParameters:
67-
- Param1=2.7
68-
- Param2="None"
69-
- Param3="xmls/"
45+
CommandLineTemplate: "-i '{{.SourceFolder}}' -o '{{.OutputFile}}' --cs ${INSTRUMENT_CS_VALUE} --folder_filter=^.*(?i)(metadata).*$"
7046
Methods:
7147
- Name: Single Particle
7248
Schema: oscem_schemas_spa.schema.json
73-
Url: https://raw.githubusercontent.com/osc-em/OSCEM_Schemas/refs/heads/main/project/spa/jsonschema/oscem_schemas_spa.schema.json
49+
Url: https://osc-em.github.io/oscem-schemas/artifacts/latest/spa/jsonschema/oscem_schemas_spa.schema.json
7450
- Name: Cellular Tomography
7551
Schema: oscem_cellular_tomo.json
76-
Url: https://raw.githubusercontent.com/osc-em/OSCEM_Schemas/refs/heads/main/project/cellular_tomo/jsonschema/oscem_schemas_cellular_tomo.schema.json
52+
Url: https://osc-em.github.io/oscem-schemas/artifacts/latest/cellular_tomo/jsonschema/oscem_schemas_cellular_tomo.schema.json
7753
- Name: Tomography
7854
Schema: oscem_tomo.json
79-
Url: https://raw.githubusercontent.com/osc-em/OSCEM_Schemas/refs/heads/main/project/subtomo/jsonschema/oscem_schemas_subtomo.schema.json
55+
Url: https://osc-em.github.io/oscem-schemas/artifacts/latest/subtomo/jsonschema/oscem_schemas_subtomo.schema.json
8056
- Name: Environmental Tomography
8157
Schema: oscem_env_tomo.json
82-
Url: https://raw.githubusercontent.com/osc-em/OSCEM_Schemas/refs/heads/main/project/env_tomo/jsonschema/oscem_schemas_env_tomo.schema.json
58+
Url: https://osc-em.github.io/oscem-schemas/artifacts/latest/env_tomo/jsonschema/oscem_schemas_env_tomo.schema.json
8359
8460
- Name: MS
8561
GithubOrg: SwissOpenEM
8662
GithubProject: MS_Metadata_reader
87-
Version: v1.0.0
63+
Version: v1.0.3
8864
Executable: MS_Metadata_reader
89-
Checksum: d5bb07787544dea4db8d02f6276369e9726a098228392001229ae9d9d716cdf9
65+
Checksum: 56925ded88d6719d42eaafe66f98fce43a67f0132d6488ece8bcbcfd5f0704a3
9066
ChecksumAlg: sha256
9167
CommandLineTemplate: "'{{.SourceFolder}}' '{{.OutputFile}}'"
9268
Methods:
9369
- Name: Material Science
9470
Schema: oscem_general.json
95-
Url: https://raw.githubusercontent.com/osc-em/OSCEM_Schemas/refs/heads/main/project/general/jsonschema/oscem_schemas_general.schema.json
71+
Url: https://osc-em.github.io/oscem-schemas/artifacts/latest/general/jsonschema/oscem_schemas_general.schema.json
9672
9773
WebServer:
9874
Auth:
@@ -119,13 +95,13 @@ configs:
11995
ViewTasksRole: "ingestor-read"
12096
Paths:
12197
CollectionLocations:
122-
emf: "/mnt/collection_location"
98+
${HOST_COLLECTION_NAME}: ${HOST_COLLECTION_PATH}
12399
MetadataExtJobs:
124100
ConcurrencyLimit: 4
125101
QueueSize: 200
126102
Other:
127103
BackendAddress: ${INGESTOR_DOMAIN}
128104
Port: 8080
129-
SecureCookies: true
130-
LogLevel: Debug
105+
SecureCookies: true
106+
LogLevel: Info
131107
DisableServiceAccountCheck: true

0 commit comments

Comments
 (0)