Skip to content

Commit 384381f

Browse files
version 1.6.1
1 parent 28f6b80 commit 384381f

362 files changed

Lines changed: 9257 additions & 9716 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/.env.destination

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
DB_HOST="db-destination"
22
PORT=8001
33
EURYDICE_API=destination
4-
ALLOWED_HOSTS=destination.localhost,backend-destination
4+
ALLOWED_HOSTS=destination.test,backend-destination
55
CSRF_TRUSTED_ORIGINS=""
66
DJANGO_MANAGEPY_MIGRATE="on"
77
METRICS_SLIDING_WINDOW=${METRICS_SLIDING_WINDOW:-60min}

.devcontainer/.env.origin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ DB_HOST=db-origin
22
TRANSFERABLE_MAX_SIZE="54975581388800"
33
PORT=8000
44
EURYDICE_API=origin
5-
ALLOWED_HOSTS="origin.localhost,backend-origin"
5+
ALLOWED_HOSTS="origin.test,backend-origin"
66
CSRF_TRUSTED_ORIGINS=""
77
DJANGO_MANAGEPY_MIGRATE="on"
88
METRICS_SLIDING_WINDOW=${METRICS_SLIDING_WINDOW:-60min}

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG REGISTRY="docker.io/"
22
ARG DEBIAN_RELEASE="bullseye"
3-
ARG PYTHON_VERSION="3.10"
3+
ARG PYTHON_VERSION="3.12"
44

55
FROM ${REGISTRY}python:${PYTHON_VERSION}-${DEBIAN_RELEASE} AS devcontainer
66

.devcontainer/compose.devcontainer.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,6 @@ services:
1212
volumes:
1313
- "../:/home/abc/workdir/"
1414
- "/var/run/docker.sock:/var/run/docker.sock:ro"
15-
labels:
16-
traefik.enable: "true"
17-
# origin backend
18-
traefik.http.routers.backend_origin.rule: Host(`origin.localhost`) && PathPrefix(`/api`, `/admin`, `/static`)
19-
traefik.http.routers.backend_origin.entrypoints: web
20-
traefik.http.routers.backend_origin.service: backend_origin_service
21-
traefik.http.services.backend_origin_service.loadbalancer.server.port: 8000
22-
# origin frontend
23-
traefik.http.routers.frontend_origin.rule: Host(`origin.localhost`)
24-
traefik.http.routers.frontend_origin.entrypoints: web
25-
traefik.http.routers.frontend_origin.service: frontend_origin_service
26-
traefik.http.services.frontend_origin_service.loadbalancer.server.port: 8080
27-
# destination backend
28-
traefik.http.routers.backend_destination.rule: Host(`destination.localhost`) && PathPrefix(`/api`, `/admin`, `/static`)
29-
traefik.http.routers.backend_destination.entrypoints: web
30-
traefik.http.routers.backend_destination.service: backend_destination_service
31-
traefik.http.services.backend_destination_service.loadbalancer.server.port: 8001
32-
# destination frontend
33-
traefik.http.routers.frontend_destination.rule: Host(`destination.localhost`)
34-
traefik.http.routers.frontend_destination.entrypoints: web
35-
traefik.http.routers.frontend_destination.service: frontend_destination_service
36-
traefik.http.services.frontend_destination_service.loadbalancer.server.port: 8081
3715
extra_hosts:
3816
- "lidis.docker.host:${LIDIS_DOCKER_HOST:-host-gateway}"
3917
networks:

.devcontainer/compose.override.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
services:
2+
apache:
3+
build:
4+
context: ../apache2
5+
target: devcontainer
6+
image: eurydice/apache:devcontainer

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Eurydice",
3-
"dockerComposeFile": ["compose.devcontainer.yml"],
3+
"dockerComposeFile": ["compose.devcontainer.yml", "compose.override.yml"],
44
"service": "devcontainer",
55
"initializeCommand": "bash .devcontainer/init.sh",
66
"postCreateCommand": "bash .devcontainer/setup.sh",
@@ -28,6 +28,7 @@
2828
},
2929
"extensions": [
3030
"davidanson.vscode-markdownlint",
31+
"charliermarsh.ruff",
3132
"dbaeumer.vscode-eslint",
3233
"editorconfig.editorconfig",
3334
"esbenp.prettier-vscode",
@@ -36,7 +37,6 @@
3637
"gruntfuggly.todo-tree",
3738
"iulian-radu-at.vscode-tasks-sidebar",
3839
"ms-azuretools.vscode-containers",
39-
"ms-python.black-formatter",
4040
"ms-python.mypy-type-checker",
4141
"ms-python.python",
4242
"ms-python.vscode-pylance",

.env.dev.example

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LOCAL_DOCKER_REGISTRY=docker.io
77
REMOTE_DOCKER_REGISTRY=docker.io
88
EURYDICE_VERSION=dev
99
LIDI_VERSION=1.3.5
10-
ELK_VERSION=7.17.11
10+
ELK_VERSION=8.18.3
1111

1212
# Backend configuration
1313
GUNICORN_CONFIGURATION=
@@ -18,6 +18,11 @@ USER_ASSOCIATION_TOKEN_SECRET_KEY=user_association_token_secret_key
1818
USER_ASSOCIATION_TOKEN_EXPIRES_AFTER=30min
1919
METRICS_SLIDING_WINDOW=60min
2020

21+
# Encryption configuration
22+
ENCRYPTION_ENABLED=false
23+
PUBKEY_PATH=./data/keys/eurydice.pub
24+
PRIVKEY_PATH=./data/keys/eurydice
25+
2126
# Autentication configuration
2227
REMOTE_USER_HEADER_AUTHENTICATION_ENABLED=true
2328
REMOTE_USER_HEADER=HTTP_X_REMOTE_USER
@@ -35,14 +40,16 @@ BACKEND_HOSTNAMES=localhost
3540
# Server configuration
3641
HTTP_SERVICES_BIND_HOST=127.0.0.1
3742

38-
# Lidi configuration
39-
LIDIR_PORT=6000
40-
LIDIS_PORT=5000
41-
LIDIR_NB_DECODING_THREADS=2
43+
# Lidi common configuration
44+
LIDI_ENCODING_BLOCK_SIZE=600000
45+
LIDI_REPAIR_BLOCK_SIZE=30000
4246
LIDI_UDP_MTU=1500
43-
LIDI_ENCODING_BLOCK_SIZE=60000
44-
LIDI_REPAIR_BLOCK_SIZE=6000
47+
# Lidi sender configuration
4548
LIDIS_NB_ENCODING_THREADS=2
49+
LIDIS_PORT=5000
50+
# Lidi receiver configuration
51+
LIDIR_NB_DECODING_THREADS=2
52+
LIDIR_PORT=6000
4653

4754
# Network configuration
4855
EURYDICE_IPV4_SUBNET=172.42.0.0/24
@@ -53,9 +60,13 @@ LOG_LEVEL=INFO
5360
RUST_LOG=INFO
5461

5562
# File remover configuration
56-
FILE_REMOVER_RUN_EVERY=1min
57-
FILE_REMOVER_EXPIRE_TRANSFERABLES_AFTER=7days
58-
FILE_REMOVER_POLL_EVERY=200ms
63+
ORIGIN_FILE_REMOVER_RUN_EVERY=60min
64+
ORIGIN_FILE_REMOVER_EXPIRE_TRANSFERABLES_AFTER=7days
65+
ORIGIN_FILE_REMOVER_POLL_EVERY=200ms
66+
67+
DESTINATION_FILE_REMOVER_RUN_EVERY=60min
68+
DESTINATION_FILE_REMOVER_EXPIRE_TRANSFERABLES_AFTER=7days
69+
DESTINATION_FILE_REMOVER_POLL_EVERY=200ms
5970

6071
# DB trimmer configuration
6172
DBTRIMMER_RUN_EVERY=6h
@@ -67,6 +78,7 @@ FILEBEAT_CONFIG_PATH="./filebeat/filebeat.yml"
6778
ELASTICSEARCH_CERT_PATH="/etc/ssl/certs/ca-certificates.crt"
6879
ELASTICSEARCH_API_KEY=
6980
ELASTICSEARCH_HOSTS=elasticsearch:9200
81+
ELASTICSEARCH_INDEX_NAME=local-dev
7082

7183
# Sender configuration
7284
SENDER_RANGE_FILLER_CLASS=UserRotatingTransferableRangeFiller
@@ -108,7 +120,6 @@ DESTINATION_DB_LOGS_DIR="./data/db-logs-destination"
108120
PYTHON_LOGS_DIR="./data/python-logs"
109121
FILEBEAT_LOGS_DIR="./data/filebeat-logs"
110122
FILEBEAT_DATA_DIR="./data/filebeat-data"
111-
HOST_TRANSFERABLE_STORAGE_DIR="./data/storage-data"
112123

113124
# Transferable history
114125
TRANSFERABLE_HISTORY_DURATION=15min

.env.prod.example

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
LOCAL_DOCKER_REGISTRY=docker.io
55
REMOTE_DOCKER_REGISTRY=docker.io
66
EURYDICE_VERSION=latest
7-
LIDI_VERSION=latest
8-
ELK_VERSION=7.17.11
7+
LIDI_VERSION=1.3.5
8+
ELK_VERSION=8.18.3
99

1010
# User configuration
1111
PUID=1000
@@ -15,11 +15,16 @@ PGID=1000
1515
GUNICORN_CONFIGURATION=
1616
CSRF_TRUSTED_ORIGINS=
1717
EURYDICE_TRANSFERABLE_MAX_SIZE=54975581388800
18-
DJANGO_SECRET_KEY=
19-
USER_ASSOCIATION_TOKEN_SECRET_KEY=
18+
DJANGO_SECRET_KEY=secretkey
19+
USER_ASSOCIATION_TOKEN_SECRET_KEY=token
2020
USER_ASSOCIATION_TOKEN_EXPIRES_AFTER=30min
2121
METRICS_SLIDING_WINDOW=60min
2222

23+
# Encryption configuration
24+
ENCRYPTION_ENABLED=true
25+
PUBKEY_PATH=./data/keys/eurydice.pub
26+
PRIVKEY_PATH=./data/keys/eurydice
27+
2328
# Autentication configuration
2429
REMOTE_USER_HEADER_AUTHENTICATION_ENABLED=true
2530
REMOTE_USER_HEADER=HTTP_X_REMOTE_USER
@@ -37,14 +42,17 @@ BACKEND_HOSTNAMES=localhost
3742
# Server configuration
3843
HTTP_SERVICES_BIND_HOST=127.0.0.1
3944

40-
# Lidi configuration
41-
LIDIR_PORT=11011
42-
LIDIS_PORT=33010
43-
LIDIR_NB_DECODING_THREADS=2
45+
# Lidi common configuration
46+
LIDI_ENCODING_BLOCK_SIZE=600000
47+
LIDI_REPAIR_BLOCK_SIZE=30000
4448
LIDI_UDP_MTU=1500
45-
LIDI_ENCODING_BLOCK_SIZE=60000
46-
LIDI_REPAIR_BLOCK_SIZE=6000
49+
# Lidi sender configuration
4750
LIDIS_NB_ENCODING_THREADS=2
51+
LIDIS_PORT=33010
52+
# Lidi receiver configuration
53+
LIDIR_NB_DECODING_THREADS=2
54+
LIDIR_PORT=11011
55+
LIDIR_HOST=
4856

4957
# Network configuration
5058
EURYDICE_IPV4_SUBNET=172.18.0.0/24
@@ -55,7 +63,7 @@ LOG_LEVEL=INFO
5563
RUST_LOG=INFO
5664

5765
# File remover configuration
58-
FILE_REMOVER_RUN_EVERY=1min
66+
FILE_REMOVER_RUN_EVERY=10min
5967
FILE_REMOVER_EXPIRE_TRANSFERABLES_AFTER=7days
6068
FILE_REMOVER_POLL_EVERY=200ms
6169

@@ -69,6 +77,7 @@ FILEBEAT_CONFIG_PATH="./filebeat/filebeat.yml"
6977
ELASTICSEARCH_CERT_PATH="/etc/ssl/certs/ca-certificates.crt"
7078
ELASTICSEARCH_API_KEY=
7179
ELASTICSEARCH_HOSTS=
80+
ELASTICSEARCH_INDEX_NAME=prod
7281

7382
# Sender configuration
7483
SENDER_RANGE_FILLER_CLASS=UserRotatingTransferableRangeFiller

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,13 @@ sysctl_backup.conf
102102
!frontend/.env.*
103103
# devcontainer
104104
.devcontainer/customize.sh
105+
dump*.sql
106+
# encryption keypair
107+
eurydice
108+
!eurydice/
109+
eurydice.pub
110+
# dev deployment
111+
apache2/configs/dev-local-origin.conf
112+
apache2/configs/dev-local-destination.conf
113+
# prod deployment
114+
deployment/prod/config-ssl.conf

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Configure formater
33
"editor.formatOnSave": true,
44
"prettier.enable": true,
5+
"ruff.lint.enable": true,
56
"[vue]": {
67
"editor.defaultFormatter": "esbenp.prettier-vscode"
78
},
@@ -17,7 +18,7 @@
1718
"[python]": {
1819
"editor.insertSpaces": true,
1920
"editor.tabSize": 4,
20-
"editor.defaultFormatter": "ms-python.black-formatter",
21+
"editor.defaultFormatter": "charliermarsh.ruff",
2122
"editor.formatOnType": true,
2223
"editor.formatOnSave": true,
2324
"editor.codeActionsOnSave": {

0 commit comments

Comments
 (0)