Skip to content

Commit 38dc20e

Browse files
authored
48 feature add monitoring stack (#257)
2 parents 21dbe4f + d245095 commit 38dc20e

23 files changed

Lines changed: 25497 additions & 79 deletions

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ data/postgres/**
3030
data/prefect/**
3131
data/uppy-server-data/**
3232
.site/**
33-
.secrets/**
34-
.certs/**
33+
**/.secrets/**
34+
**/.certs/**
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PREFECT_LOGGING_LEVEL=DEBUG
66
PREFECT_WORKER_LTS_VOLUME_NAME=lts-mock-volume
77
PREFECT_JOB_TEMPLATE=prefect-jobtemplate-dev.json
88
LTS_FREE_SPACE_PERCENTAGE=2
9-
PREFECT_VARS_FILE=./backend/prefect/vars_dev.toml
9+
PREFECT_VARS_FILE=../backend/prefect/vars_dev.toml
1010

1111
### Authentik
1212
# Use `AUTH_MIDDLEWARE=authentik` to protect access to dashboards
@@ -16,14 +16,14 @@ AUTHENTIK_HOST=https://authentik.ethz.ch
1616
AUTHENTIK_INSECURE=true
1717

1818
### Scicat
19-
SCICAT_USER_FILE=./.secrets/scicatuser.txt
20-
SCICAT_PASSWORD_FILE=./.secrets/scicatpass.txt
19+
SCICAT_USER_FILE=.secrets/scicatuser.txt
20+
SCICAT_PASSWORD_FILE=.secrets/scicatpass.txt
2121
SCICAT_ENDPOINT=https://scopem-openem2.ethz.ch/scicat/backend
2222
SCICAT_INGESTOR_GROUP=ingestor
2323

2424
### IDP
25-
IDP_CLIENT_SECRET_FILE=./.secrets/idpclientsecret.txt
26-
IDP_PASSWORD_FILE=./.secrets/idppassword.txt
25+
IDP_CLIENT_SECRET_FILE=.secrets/idpclientsecret.txt
26+
IDP_PASSWORD_FILE=.secrets/idppassword.txt
2727
IDP_URL=https://scopem-openem2.ethz.ch/keycloak
2828
IDP_USERNAME=archiver-service
2929
IDP_REALM=facility

.env.prod renamed to deployment/.env.prod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ PREFECT_ARCHIVAL_WORKPOOL_NAME=archival-docker-workpool
5454
# Workpool name for retrieval jobs
5555
PREFECT_RETRIEVAL_WORKPOOL_NAME=retrieval-docker-workpool
5656

57-
PREFECT_VARS_FILE=./backend/prefect/vars.toml
57+
PREFECT_VARS_FILE=../backend/prefect/vars.toml
5858
### Authentik
5959
# Use `AUTH_MIDDLEWARE=authentik` to protect access to dashboards
6060
AUTH_MIDDLEWARE=authentik
@@ -66,7 +66,7 @@ AUTHENTIK_INSECURE=true
6666
### Scicat
6767
SCICAT_ENDPOINT=https://scicat.development.psi.ch
6868
SCICAT_API_PREFIX=/api/v3
69-
SCICAT_USER_FILE=./.secrets/scicatuser_prod.txt
70-
SCICAT_PASSWORD_FILE=./.secrets/scicatpass_prod.txt
69+
SCICAT_USER_FILE=.secrets/scicatuser_prod.txt
70+
SCICAT_PASSWORD_FILE=.secrets/scicatpass_prod.txt
7171
SCICAT_INGESTOR_GROUP=unx-openem
7272

archiver-service.docker-compose.yml renamed to deployment/archiver-service.docker-compose.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
image: ${OPENEM_BACKEND_IMAGE_NAME}:${OPENEM_IMAGE_TAG}
44
container_name: archiver-service-api
55
build:
6-
context: ./backend/api
6+
context: ../backend/api
77
dockerfile: ./Dockerfile
88
environment:
99
- PREFECT_LOGGING_LEVEL=${PREFECT_LOGGING_LEVEL}
@@ -120,7 +120,7 @@ services:
120120
image: ${PREFECT_CONFIG_IMAGE_NAME}:${OPENEM_IMAGE_TAG:-latest}
121121
container_name: prefect-config
122122
build:
123-
context: ./backend/
123+
context: ../backend/
124124
dockerfile: ./prefect/config.Dockerfile
125125
args:
126126
PREFECT_VERSION: ${PREFECT_VERSION}
@@ -146,7 +146,7 @@ services:
146146
source: ${PREFECT_VARS_FILE}
147147
target: /var/local/vars.toml
148148
- type: bind
149-
source: ./backend/prefect/concurrency-limits.toml
149+
source: ../backend/prefect/concurrency-limits.toml
150150
target: /var/local/concurrency-limits.toml
151151
command: "-v /var/local/vars.toml -s MINIO_USER_FILE MINIO_PASSWORD_FILE GITHUB_USER_FILE GITHUB_PASSWORD_FILE SCICAT_USER_FILE SCICAT_PASSWORD_FILE -l /var/local/concurrency-limits.toml"
152152
depends_on:
@@ -163,7 +163,7 @@ services:
163163
# Uses the runtime image: prefect will import the code and there it needs all packages installed
164164
image: ${PREFECT_RUNTIME_IMAGE_NAME}:${OPENEM_IMAGE_TAG:-latest}
165165
build:
166-
context: ./backend/archiver
166+
context: ../backend/archiver
167167
dockerfile: ../prefect/runtime.Dockerfile
168168
args:
169169
LTS_ROOT_FOLDER: ${LTS_ROOT_FOLDER}
@@ -201,16 +201,22 @@ services:
201201
- "traefik.enable=false"
202202
volumes:
203203
lts-mock-volume:
204-
driver: local
204+
name: scopemarchiver_lts-mock-volume
205+
# driver: local
206+
external: true
205207
nfs-lts-share:
206208
driver_opts:
207209
type: "nfs"
208210
o: "nfsvers=3,addr=lts22,nolock"
209211
device: ":/scopem_lts_nfs_test_lts22"
210212
postgres-volume-new:
211-
driver: local
213+
name: scopemarchiver_postgres-volume-new
214+
# driver: local
215+
external: true
212216
prefect-volume-new:
213-
driver: local
217+
name: scopemarchiver_prefect-volume-new
218+
# driver: local
219+
external: true
214220

215221
secrets:
216222
postgres_user:
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
name: scopemarchiver
12
include:
23
# Traefik
34
- traefik.docker-compose.yml
@@ -8,10 +9,11 @@ include:
89
# S3 storage
910
# - minio.docker-compose.yml
1011
# Monitoring stack
11-
# - monitoring.docker-compose.yml
12+
- monitoring.docker-compose.yml
1213

1314

1415
networks:
1516
scopemarchiver_network:
1617
name: scopemarchiver_network
17-
driver: bridge
18+
# driver: bridge
19+
external: true

deployment/grafana-stack/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
HOST=scopem-openem2.ethz.ch

0 commit comments

Comments
 (0)