Configuration - Datachain Core

This page describes how to configure the images of the Datachain Core module.

The images are configured through Docker *.env files or environment variables.

The images run without root privileges for the application and are compatible with OpenShift: see Running without privileges (OpenShift).

Overview

Datachain Core is delivered as several images, each running one service.

Service Image Ports Role

web

dc/web_ui

8080 (application), 9080 (monitoring)

Web server: serves the Datachain application and relays calls to the backend

backend

dc/backend

8089 (API), 9089 (monitoring)

Business modules and application API

spark

dc/spark

8090 (API), 9090 (monitoring), 4040 (Spark driver interface)

Computation module (embedded Spark driver), distributed computation context

pg-migration

dc/pg_migration

None

Runs the update patches on the PostgreSQL database (single run)

The services interact as follows:

  • users access the application through the web service, usually behind a reverse proxy;

  • the web service relays calls to the backend;

  • the backend delegates data computations to one or more Spark contexts;

  • the migration service updates the PostgreSQL database before the backend uses it.

Datachain Core also uses:

  • a PostgreSQL database, provided by the dc/dc_pg image;

  • a Valkey server (Redis-compatible), for caching and queues.

These components are described in Data management. The Console, Marketplace, Dc-Maestro and SSO modules are described in their own pages (see Configuration).

Web Module - Image dc/web_ui

Image description

Description

Contains the web server that serves the HTML pages of the DataChain application

Size

~175MB

Technical components

Nginx HTTP server (unprivileged Alpine image)

User

nginx (uid 101, primary group root (gid 0)). The container does not run as root. The image also accepts any uid imposed at startup (OpenShift): this uid belongs to the root group (gid 0). See Running without privileges (OpenShift).

Volumes

No volumes

Logs

Nginx logs (Access Log) on the Docker standard output

URLs

Port URL Purpose

8080

/

Access to the Datachain Core application

9080

/stub_status

Access to the Nginx usage metrics (monitoring)

The image listens on port 8080 (no longer 80): the reverse proxy, port mapping or service that accesses it must target this port. The monitoring port has changed from 8080 to 9080.

Environment variables

Variable Default Description

PROXY_PASS_BACKEND

dc-backend:8089

Internal URL of the backend: this variable should not be modified, except if the backend’s DNS name changes in the Docker network

PUBLIC_IP_PORT_443

localhost:443

Only used for deployments without a reverse proxy, which is rarely the case in a production infrastructure

DOC_VERSION

Corresponds to the server version - should not be modified, except in special cases communicated by Adobis

DOC_SERVER_URL

https://docs.adobisdc.fr

Public URL of the Adobis documentation server

CONTENT_SECURITY_POLICY

default-src * data: blob: filesystem: about: ws: wss: 'unsafe-inline' 'unsafe-eval';script-src * data: blob: 'unsafe-inline' 'unsafe-eval'; connect-src * data: blob: 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src * data: blob: ; style-src * data: blob: 'unsafe-inline';font-src * data: blob: 'unsafe-inline';frame-ancestors * data: blob:;

Configuration of the CSP HTTP security header

Backend Module - Image dc/backend

Image description

Description

Contains the business modules and the application API

Size

~570MB

Technical components

Java/Spring Boot/Jetty application

User

The container starts as root (process supervisor), then the application runs as dc (uid 38330, primary group root (gid 0), secondary group datachain (gid 38330)). If a uid is imposed at startup (OpenShift, Docker --user option), the whole container runs with that uid, which must belong to the root group (gid 0). Host directories mounted as volumes must be writable by uid 38330 or by group 0. See Running without privileges (OpenShift).

Volumes

Path Purpose Required

/logs

Directory where the server writes its logs

No, but recommended

Logs

Several types of logs, located under /logs/datachain/backend

Log Purpose

dc-backend.log

Application logs: mainly used for debugging.

One new file per day, compressed on rollover, and several files per day if the current size exceeds 200MB.

First increment at 0. Total size of all files capped at 10GB. Retention period: 30 days.

access.log

Access logs

management.log

Management logs: can be ignored

gc.log

JVM garbage collector (GC) logs. Not enabled by default: the container’s default command line contains no GC logging option. To enable them, add the options to the JAVA_OPTIONS environment variable, for example -Xlog:gc*:file=/logs/datachain/dc_core_backend/gc.log:time,uptime:filecount=5,filesize=20m.

Warning: setting JAVA_OPTIONS replaces the container’s default heap options (-Xms, -Xmx): include them in addition to the GC options. The -Duser.home option, on the other hand, is always added by the container, after JAVA_OPTIONS.

URLs

Port URL Purpose

8089

/

Standard listening port of the backend

9089

/actuator-backend/*

Access to Spring actuator information, for example on /actuator-backend/prometheus if the module configuration enables metrics:

  • management.endpoints.web.base-path=/actuator-backend

  • management.metrics.export.prometheus.enabled=true

Environment variables

Variable Default Description

DC_PG_PASSWORD_FILE

Name of the "docker secret" file used to override spring.datasource.password

DC_PG_EXPOSE_PASSWORD_FILE

Name of the "docker secret" file used to override spring.expose-datasource.password

DC_PG_JOB_PASSWORD_FILE

Name of the "docker secret" file used to override spring.job-datasource.password. If not overridden, but the DC_PG_PASSWORD_FILE value is present, then DC_PG_PASSWORD_FILE will be used

SPARK_SECURITY_USER_PASSWORD_FILE

Name of the "docker secret" file used to override dc.app.api.spark.security.user.password (identical on backend and spark)

KEYCLOAK_INTERNAL_CLIENT_SECRET_FILE

Name of the "docker secret" file used to override dc.keycloak.internal-client-secret

Configuration file

################################################
##   DATACHAIN Backend CONFIGURATION FILE    ##
################################################
# DataChain Backend configuration file example.
# Exemple de fichier de configuration du backend DataChain.
######################################### Data Properties ##########################################
####################################################
## Main Database Configuration                    ##
## Configuration de la base de données principale ##
####################################################
## For detailed configuration, see :
## Pour la configuration détaillés, voir :
### https://docs.spring.io/spring-boot/docs/2.3.12.RELEASE/reference/html/production-ready-features.html
# database ip or dns address. Default value 'localhost
# Adresse ip ou dns de la base de données. Valeur par défaut 'localhost'
dc.app.db.host=localhost
# JDBC URL of the database.
# Chaîne de connexion JDBC.
# By default, the database name is 'adobis' and the port is '5432.
# Par défaut, le nom de la base de données est "adobis" et le port est "5432".
spring.datasource.url=jdbc:postgresql://${dc.app.db.host}:5432/adobis?prepareThreshold=0&preparedStatementCacheQueries=0
# Login username of the database. Default value 'postgres'
# Nom d'utilisateur de la base de données.
spring.datasource.username=postgres
# Login password of the database.
# Mot de passe de la base de données.
spring.datasource.password=changeIt
## pool configuration ##
## For detailed pool configuration, see :
## Pour la configuration ## Pour la configuration du pool détaillé, voir : détaillés, voir :
### https://github.com/brettwooldridge/HikariCP#configuration-knobs-baby
# This property controls the maximum number of milliseconds that a client (that's you) will wait for a connection from the pool.
# Cette propriété contrôle le nombre maximum de millisecondes pendant lesquelles un client (c'est-à-dire vous) attendra une connexion depuis le pool.
spring.datasource.hikari.connectionTimeout=30000
# This property controls the maximum size that the pool is allowed to reach.
# Cette propriété contrôle la taille maximale que le pool est autorisé à atteindre.
spring.datasource.hikari.maximumPoolSize=20
# This property controls the minimum number of idle connections that HikariCP tries to maintain in the pool.
# Cette propriété contrôle le nombre minimum de connexions inactives que HikariCP essaie de maintenir dans le pool.
spring.datasource.hikari.minimumIdle=20
# This property controls the maximum lifetime of a connection in the pool.
# Cette propriété contrôle la durée de vie maximale d'une connexion dans le pool.
spring.datasource.hikari.maxLifetime=600000
# This property controls how frequently HikariCP will attempt to keep a connection alive, in order to prevent it from being timed out by the database or network infrastructure.
# Cette propriété contrôle la fréquence à laquelle HikariCP tentera de maintenir une connexion active, afin d'éviter qu'elle ne soit interrompue par la base de données ou l'infrastructure réseau.
spring.datasource.hikari.keepaliveTime=60000
# This property controls the pool name.
# Cette propriété contrôle le nom du pool.
spring.datasource.hikari.poolName=MainDatasourcePool
# Whether to enable logging of SQL statements.
# Paramètre gérant l’affichage du SQL de la dataSource JDBC dans les logs.
spring.jpa.show-sql=false
# Register OpenEntityManagerInViewInterceptor. Binds a JPA EntityManager to the thread for the entire processing of the request.
# Enregistrez OpenEntityManagerInViewInterceptor. Lie un EntityManager JPA au thread pour l'ensemble du traitement de la demande.
spring.jpa.open-in-view=false
## Hibernate configuration ##
## For detailed Hibernate configuration, see :
## Pour la configuration ## Pour la configuration détaillés, voir : détaillés, voir :
### https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html
# Defines the query timeout, in milliseconds.
# Définit le délai d'expiration de la requête, en millisecondes.
spring.jpa.properties.javax.persistence.query.timeout=30000
# If enabled, Hibernate will collect statistics useful for performance tuning.
# Si activé, Hibernate collectera des statistiques utiles pour le réglage des performances.
spring.jpa.properties.hibernate.generate_statistics=false
# Disable/Enable the second level cache
# Désactiver/Activer le cache de second niveau
spring.jpa.properties.hibernate.cache.use_second_level_cache=false
# Controls the maximum number of statements Hibernate will batch together before asking the driver to execute the batch. Zero or a negative number disables this feature.
# Contrôle le nombre maximum d'instructions qu'Hibernate regroupera avant de demander au pilote d'exécuter le lot. Zéro ou un nombre négatif désactive cette fonction.
spring.jpa.properties.hibernate.jdbc.batch_size=2000
# Forces Hibernate to order inserts to allow for more batching to be used.
# Force Hibernate à commander des insertions pour permettre l'utilisation de plus de lots.
spring.jpa.properties.hibernate.order_inserts=true
# Forces Hibernate to order SQL updates by the entity type and the primary key value of the items being updated.
#Force Hibernate à trier les mises à jour SQL par le type d'entité et la valeur de la clé primaire des éléments mis à jour.
spring.jpa.properties.hibernate.order_updates=true
# Defines the Hibernate-specific FlushMode to use.
# Définit le FlushMode spécifique à Hibernate à utiliser
spring.jpa.properties.org.hibernate.flushMode=COMMIT
# Should versioned entities be included in batching?
# Les entités versionnées doivent-elles être incluses dans le traitement par lot ?
spring.jpa.properties.hibernate.jdbc.batch_versioned_data=true
# Should we not use contextual LOB creation ?
# Ne devrions-nous pas utiliser la création contextuelle de LOB ?
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
#########################################################################
###################################
## Expose Database Configuration ##
###################################
### See Main Database Configuration.
### Configuration de la base de données principale.
# Standard configuration #
spring.expose-datasource.dbtype=pgSql
spring.expose-datasource.host=localhost
spring.expose-datasource.port=5432
spring.expose-datasource.database=expose
spring.expose-datasource.schema=public
spring.expose-datasource.username=postgres
spring.expose-datasource.password=changeIt
spring.expose-datasource.url=jdbc:postgresql://${spring.expose-datasource.host}:${spring.expose-datasource.port}/${spring.expose-datasource.database}
### See Main Database Configuration -  Pool configuration.
### Configuration de la base de données principale -  Pool configuration.
# Pool configuration #
spring.expose-datasource.hikari.connectionTimeout=30000
spring.expose-datasource.hikari.maximumPoolSize=20
spring.expose-datasource.hikari.minimumIdle=20
spring.expose-datasource.hikari.maxLifetime=600000
spring.expose-datasource.hikari.keepaliveTime=60000
spring.expose-datasource.hikari.poolName=ExposeDatasourcePool
###################################
## Job Database Configuration ##
###################################
### See Main Database Configuration.
### Configuration de la base de données principale.
# Standard configuration #
spring.job-datasource.host=${dc.app.db.host}
spring.job-datasource.port=5432
spring.job-datasource.database=adobis
spring.job-datasource.schema=job
spring.job-datasource.username=${spring.datasource.username}
spring.job-datasource.password=${spring.datasource.password}
spring.job-datasource.url=jdbc:postgresql://${spring.job-datasource.host}:${spring.job-datasource.port}/${spring.job-datasource.database}
### See Main Database Configuration -  Pool configuration.
### Configuration de la base de données principale -  Pool configuration.
# Pool configuration #
spring.job-datasource.hikari.connectionTimeout=30000
spring.job-datasource.hikari.maximumPoolSize=10
spring.job-datasource.hikari.minimumIdle=10
spring.job-datasource.hikari.maxLifetime=600000
spring.job-datasource.hikari.keepaliveTime=60000
spring.job-datasource.hikari.poolName=JobDatasourcePool
######################################### Server Properties ########################################
###############################
## HTTP server Configuration ##
###############################
## For detailed configuration, see :
## Pour la configuration détaillés, voir :
### https://docs.spring.io/spring-boot/docs/2.3.12.RELEASE/reference/html/production-ready-features.html
# Server HTTP port.
# Port HTTP du serveur.
server.port=8089
## see https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-graceful-shutdown
server.shutdown=graceful

# Session tracking modes. par cookie.
# Modes de suivi de session. par cookie.
server.servlet.session.tracking-modes=COOKIE
server.servlet.session.cookie.name=dcCoreSid
server.servlet.session.cookie.http-only=true
server.servlet.session.cookie.same-site=lax

# Secure cookie. SHould be true when https, false if http.
# Cookie securisé : devrait être positionné à true pour site sécurisé, false si http.
server.servlet.session.cookie.secure=true

# Session timeout: in seconds (s) default unit, in minutes (m), in hours (h).
# Gestion du timeout de session en heure (h) ou minutes (m) ou secondes (s) unité par défaut.
server.servlet.session.timeout=8h

# max-age of cookie : should be same as session timeout.
# durée du cookie de session : devrait être à la même valeur que la session
server.servlet.session.cookie.max-age=${server.servlet.session.timeout}

# Context path of the application.
# Chemin de contexte de l'application.
server.servlet.context-path=/
# Whether response compression is enabled.
# Indique si la compression des réponses est activée.
server.compression.enabled=true
# Comma-separated list of MIME types that should be compressed.
# Liste séparée par des virgules des types MIME qui doivent être compressés.
server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain,text/csv,application/octet-stream
# Minimum "Content-Length" value that is required for compression to be performed.
# Valeur "Content-Length" minimale requise pour que la compression soit effectuée.
server.compression.min-response-size=2KB
# Time that the connection can be idle before it is closed.
# Temps pendant lequel la connexion peut être inactive avant d'être fermée.
server.jetty.connection-idle-timeout=10000s
server.jetty.accesslog.enabled=true
server.jetty.accesslog.custom-format=%{client}a - %u %t "%r" %s %O (%{ms}T ms)
server.jetty.accesslog.filename=${DC_ROOT_LOG_DIRECTORY:/tmp/log}${DC_LOG_DIRECTORY:/datachain/dc_core_backend}/access_yyyy_MM_dd.log
server.jetty.accesslog.file-date-format=yyyy_MM_dd
server.jetty.accesslog.retention-period=30

### Web properties ###
# Max file size.
# Taille maximale du fichier.
spring.servlet.multipart.max-file-size=10000MB
# Max request size.
# Taille maximale de la requête.
spring.servlet.multipart.max-request-size=10000MB
# Maximum size of data buffers used in file upload..
# Taille maximale des tampons de données utilisés dans le téléchargement de fichiers.
dc.app.http.upload.chunk-size=32768
####################################### Actuator properties ########################################
##############################
## Monitoring avec Actuator ##
##############################
## For detailed configuration, see :
## Pour la configuration détaillés, voir :
## https://docs.spring.io/spring-boot/docs/2.3.12.RELEASE/reference/html/production-ready-features.html
## Spring actuator configuration.
## Configuration de Spring actuator.
management.endpoint.shutdown.enabled=false
management.server.port=9089
management.endpoints.web.base-path=/actuator
management.server.address=127.0.0.1
management.endpoints.web.exposure.include=health,prometheus
management.metrics.export.prometheus.enabled=false
management.health.ldap.enabled=false
######################################### Core properties ##########################################
## For detailed configuration, see :
## Pour la configuration détaillés, voir :
## https://docs.spring.io/spring-boot/docs/2.3.12.RELEASE/reference/html/production-ready-features.html
# Expose management beans to the JMX domain.
# Exposer les beans de gestion au domaine JMX
spring.jmx.enabled=false
######################################### Log properties ###########################################
###############################
## Log & Trace Configuration ##
###############################
# Trace
# data profiling activation switch (calculation and log of service execution time).
# Interrupteur d’activation du profilage des données (calcul et log du temps d’exécution des services).
dc.app.log.aspect.enable=false
# Http traceability activation switch
# Interrupteur d’activation de la traçabilité http
logbook.filter.enabled=false
# Http traceability level
# Niveau de traçabilité http
logbook.write.level=INFO
# Exclude certain URLs
# Exclure certaines URL
logbook.exclude=/oauth/token/**
####################################### Security properties ########################################
############################
## keycloak configuration ##
############################
## For detailed configuration, see :
## Pour la configuration détaillés, voir :
## https://www.keycloak.org/docs/20.0.3/securing_apps/#_spring_boot_adapter

# Client inactivity max delay in minutes
# Délai maximal d'inactivité du client en minutes
dc.app.backend.security.inactivity-max-delay=2400
########################################## Spark properties ########################################
#########################
## Spark configuration ##
#########################
# Spark
# The user/password used by backend to communicate with DATACHAIN SPARK
# Le nom d'utilisateur/mot de passe utilisé par le backend pour communiquer avec DATACHAIN SPARK
dc.app.api.spark.security.user.name=backend
dc.app.api.spark.security.user.password=70171933-e656-4183-9955-bfd0354d2250
#Spark rest request timeout
# The connection timeout (in milliseconds) for Spark REST requests.
# Le temps d'attente de connexion (en millisecondes) pour les requêtes Spark REST.
dc.api.spark.request-connection-timeout=10000
#The reading timeout (in milliseconds) for Spark REST requests.
# Le temps d'attente de lecture (en millisecondes) pour les requêtes Spark REST.
dc.api.spark.request-reading-timeout=60000
####################################### Cache properties ###########################################
########################
## Cache Configuration ##
########################
# Path to ehcache the configuration file
# Chemin pour mettre en cache le fichier de configuration
dc.app.ehcahce.configuration=
################################## Internationalization properties #################################
########################
##         i18n       ##
########################
# This property specifies the base name for the message resource bundles used for internationalization.
# Cette propriété spécifie le nom de base des fichiers de ressources de message utilisés pour l'internationalisation.
spring.messages.basename=i18n/common/jobtype,i18n/common/messages,i18n/common/validations,i18n/gd/autodoc,i18n/gd/exporttemplate,i18n/gd/messages,i18n/gd/datalink,i18n/gd/validations,i18n/hd/messages,i18n/hd/validations
# This property specifies whether the system locale should be used as a fallback for messages that are not found in the message resource bundles.
# Cette propriété spécifie si la locale système doit être utilisée comme solution de secours pour les messages qui ne sont pas trouvés dans les fichiers de ressources de message.
spring.messages.fallback-to-system-locale=false
######################################## Misc Configuration ########################################
##########################
## Web-ui configuration ##
##########################
# Network
# Cette propriété spécifie l'URL de l'interface web.
dc.app.url.web-ui=http://localhost:4200
# Cette propriété spécifie l'URL interne de l'interface web.
dc.app.url.internal-web-ui-url=http://localhost:4200
##############################################################################
## Configuration des échanges de message entre backend et Spark via Redis   ##
## Configuration for message exchanges between backend and spark via redis  ##
##############################################################################

## Configuration pour les échanges de message entre backend et spark via redis
## Url de Redis
## Redis Url
# spring.redis.host=dc-redis
# spring.redis.database=0
# spring.redis.port=6379
# spring.redis.timeout=60000

dc.app.notification.urls=redis://${spring.redis.host}:${spring.redis.port}

# The prefixes are in case one day we make multiple DataChain work on the same
# Les prefixes sont pour le cas ou un jour, on fait travailler plusieurs DataChain sur la même
#
# Redis infrastructure and to ensure that we do not overwrite the queue of another application if
# infra Redis et pour permettre de s'assurer ne pas écraser la file d'une autre application si
#
# Redis is shared with other applications
# Redis est partagé avec d'autres applications
dc.app.session.namespace=datachain:${dc.app.module.plateform-id}:${dc.app.module.instance-id}:dc_core_sessions
dc.app.notification.job.queue.name.prefix=datachain:${dc.app.module.plateform-id}:${dc.app.module.instance-id}:notification.job.queue
dc.app.notification.event.job.queue.name.prefix=datachain:${dc.app.module.plateform-id}:${dc.app.module.instance-id}:notification.event.job.queue
dc.app.notification.cancel.job.topic.name.prefix=datachain:${dc.app.module.plateform-id}:${dc.app.module.instance-id}:notification.cancel.job.topic
dc.app.notification.event.job.topic.name.prefix=datachain:${dc.app.module.plateform-id}:${dc.app.module.instance-id}:notification.event.job.topic
dc.app.notification.cache.job.result.name.prefix=datachain:${dc.app.module.plateform-id}:${dc.app.module.instance-id}:notification.cache.job.result
dc.app.notification.event.heart.beat.name.prefix=datachain:${dc.app.module.plateform-id}:${dc.app.module.instance-id}:notification.event.heart.beat

# Cron to deeply clean the cache
# Cron de nettoyage en profondeur du cache
dc.app.cron.clean.cache=0 0 1 * * ?
# Cron for clearing job details by setting requests to null. The default schedule is set to run at 1:30 AM every Sunday (0 30 1 * * SUN).
# Cron pour effacer les détails des emplois en définissant les demandes comme nulles. L'horaire par défaut est programmé pour s'exécuter à 1 h 30 chaque dimanche (0 30 1 * * SUN).
dc.app.cron.clean.job.request=0 30 1 * * SUN
# Threshold for data cleaning in days. Default 60 days
# Seuil de nettoyage des données en jours. Par défaut, 60 jours.
dc.app.cron.clean.job.request.threshold=60
# Short cache duration in second (default one hour)
# Durée du cache court en second (une heure par défaut)
dc.app.short.job.cache.duration.minutes=60
# Long cache duration in minutes (default one day)
# Durée du cache long en minutes (une journée par défaut)
dc.app.long.job.cache.duration.minutes=1440
###########################################
## Exposure API configuration            ##
## Configuration de l'API d'exposition   ##
###########################################
# Configuration of the maximum number of elements for the exposed API.
# By default at 100000, can be overloaded with potential performance risk.
# Configuration du nombre max d'éléments pour l'api d'exposition
# Par défaut à 100000, peut être surchargé avec risque potentiel sur les performances
dc.app.expose.api.max-results-number=100000
dc.app.expose.api.default-results-number=1000
################################################
## Data Encryption configuration              ##
## Configuration du chiffrement des données   ##
################################################
# This property specifies whether exported project files should be encrypted (true by default).
# If false a .zip file will be returned
# Cette propriété spécifie si les fichiers de projet exportés doivent être chiffrés (true par défaut).
# Si false un fichier .zip sera renvoyé
dc.project.export.zip.cipher=true
# Cipher key (If changed, all the connectors password must be revalidate)
# The key is optional. If set it must be exactly 16 characters
# Must be the same as spark
# Cette propriété spécifie la clé de chiffrement utilisée pour le backend et Spark. (doit contenir exactement 16 caractères).
# Si cette clé est modifiée, tous les mots de passe des connecteurs doivent être validés à nouveau.
# Doit être le même que spark
dc.app.backend.cipher.key=
################################################
## Data DCRepository configuration              ##
## Configuration du dépôt de données          ##
################################################
# This property specifies the maximum number of headers allowed for the repository in the application. (2000 by default)
# Cette propriété spécifie le nombre maximum d'en-têtes autorisés pour le dépôt dans l'application. (2000 par défaut)
dc.app.repository.headers.max.number=2000
################################################
##                         Date              ##
################################################
# Default timezone setting for dates
# This parameter allows you to set the default timezone for date handling in front end date pickers (DataBlocks/Sources filters and centering zones).
# Paramètre de fuseau horaire par défaut pour les dates
# Ce paramètre vous permet de définir le fuseau horaire par défaut pour la gestion des dates dans les sélecteurs de date (Filters de DataBlocks/Sources et zones de centrage) côté frontend."
dc.app.date.timezone=
# Default timezone setting for dates in %date variables
# (for example when choosing file export name in Datablock export)
# Paramètre de fuseau horaire par défaut pour les dates utilisées dans les expressions %date
# (par exemple lors du choix du nom de fichier pour un export datablock
dc.app.date.sl.timezone=UTC
##########################
## SMTP Configuration ##
##########################
# You can define STMP configuration vith datachain admin IHM or with this file
# La configuration SMTP peut-être définie dans ce fichier ou via l'interface web de datachain.
# choice between IHM(in database configuration) or via configuration file required value : "db" or "file"
# choix de configuration entre IHM (configuration en base de donnée) ou fichier de configuration - obligatoire : "ihmdb" ou "file"
dc.app.smtp.config=ihmdb
#dc.app.smtp.config=file
# Les autre paramètres ne sont nécessaires que si dc.app.mail.config=file
# Please fill others parameters only if dc.app.mail.config=file
# serveur smtp : obligatoire
# smtp server : required
dc.app.smtp.host=
# port smtp (465 par défaut)
# smtp port (default 465)
dc.app.smtp.port=465
# Authentification smtp (false par défaut)
# smtp authentication (default false )
dc.app.smtp.auth=false
# Utilisateur pour Authentification
# authentication username
dc.app.smtp.user=
# Mot de passe pour Authentification
# authentication password
dc.app.smtp.password=
# Utilisateur emetteur des messages (par défaut : dc.datachain@datachain.fr)
# mail sender (default : dc.datachain@datachain.fr)
dc.app.smtp.sender=dc.datachain@datachain.fr
# nom d'hote smtp de confiance
# trusted host name
dc.app.smtp.ssl.trust=*
# utiliser ssl pour les échanges smtp
# Use ssl when using smtp
dc.app.smtp.ssl.enable=true
# utiliser ssl pour les échanges smtp
# Use ssl when using smtp
dc.app.smtp.ssl.protocols=TLSv1.2
# utiliser starttls pour les échanges smtp
# Use starttls when using smtp
dc.app.smtp.starttls.enable=true
# rendre starttls obligatoire (si oui, une erreur aura lieu si l'échange starttls ne peut avoir lieu)
# is starttls mandatory
dc.app.smtp.starttls.required=false
##########################
## SECURITY             ##
##########################
## Enable datachain tokens for api call
## Activation de l'authentification par token pour les appels API
dc.app.security.auth.api-token.enable=true

## Database cleaning of last users login
## Cron de nettoyage des dernières dates de logins utilisateurs
#dc.app.module.user.last-login-cleaner.cron=0 5 22 * * ?

#################################################
## Console Exchange configuration              ##
## Configuration des échanges avec la console  ##
#################################################

# Plateform code modify if multiple plateforme sharing same redis
# code de la plateforme, à modifier si plusieurs plateformes partagent le même redis
dc.app.module.plateform-id=default

# Module code
# code du module selon la topology
dc.app.module.instance-id=DATACHAIN_CORE

# private console url
# Url privée de la console
#dc.app.module.console.url=http://dc-console:8093

# Authentication token for module exchanges
# token d'authentification pour les appels à la console
# dc.app.module.console.api-key=****

## Event incremental synchronisation with console configuration (unit : seconds)
## five seconds after start, then every 3 minutes.
## Cron de synchronisation des évènements consoles en second
## 5 secondes après redémarrage, puis toutes les trois minutes.
dc.app.module.console.sync.events.incremental.cron=-
dc.app.module.console.sync.events.incremental.initial-delay=5
dc.app.module.console.sync.events.incremental.fixed-delay=180

## Event full synchronisation with console configuration (unit : seconds)
## Use it if there are problems with incremental event synchronization.
## Cron de synchronisation de tous les évènements consoles en second
## A n'activer qu'une fois par jour maximum si nécessaire, et
## en dehors des heures d'utilisations intenses, non actif.
# dc.app.module.console.sync.events.full.cron=-
# dc.app.module.console.sync.events.full.initial-delay=99999d
# dc.app.module.console.sync.events.full.fixed-delay=99999d

Main parameters

Parameter Default Description

dc.app.db.host

localhost

IP address or DNS name of the database

spring.datasource.url

jdbc:postgresql://${dc.app.db.host}:5433/adobis?prepareThreshold=0&preparedStatementCacheQueries=0

JDBC connection string

spring.datasource.username

**

JDBC connection user name

spring.datasource.password

**

JDBC connection password

spring.datasource.jmx-enabled

false

switch to enable JMX for the JDBC dataSource

spring.jpa.show-sql

false

parameter controlling whether the JDBC dataSource SQL is displayed in the logs

server.port

8089

HTTP port

server.compression.enabled

true

switch to enable HTTP compression

server.compression.mime-types

application/json,application/xml,text/html,text/xml,text/plain

MIME types to compress

server.compression.min-response-size

2KB

(in bytes) compress from this size

spring.servlet.multipart.max-file-size

10000MB

maximum size of a file sent over HTTP

spring.servlet.multipart.max-request-size

10000MB

maximum size of an HTTP request

dc.app.http.upload.chunk-size

32768

maximum size in bytes of a file chunk sent over HTTP

spring.jmx.enabled

false

switch to enable JMX for Spring

management.endpoint.shutdown.enabled

true

switch to enable the shutdown service

management.server.port

9089

HTTP port of the actuator service

management.server.address

127.0.0.1

network address the actuator endpoints must bind to

dc.app.backend.user.username

**

system user to create at startup of the backend service, used by the Spark context(s)

dc.app.backend.user.password

**

password of the system user to create at startup of the backend service, used by the Spark context(s)

dc.app.backend.security.oauth.client.id

**

OAuth2 client id

dc.app.backend.security.oauth.client.secret

**

OAuth2 client secret

dc.app.backend.security.login.failure.retry-max-nbr

3

maximum number of authentication attempts

dc.app.backend.security.login.failure.retry-delay

1

duration in minutes for which the authentication service is blocked after dc.app.backend.security.login.failure.retry-max-nbr is exceeded

dc.app.backend.security.token.validity

240

duration in minutes of the validity of an authentication

dc.app.backend.security.password-validity-delay

90

duration in days of the password validity

dc.app.backend.security.inactivity-max-delay

3

maximum duration in minutes of UI inactivity; once exceeded, the user is automatically logged out

dc.app.backend.security.authentication.2fa.active

false

switch to enable two-factor authentication

dc.app.backend.security.authentication.2fa.code-expiration

5

maximum duration in minutes of the validity of the 2FA token

logbook.filter.enabled

false

switch to enable HTTP traceability

logbook.write.level

INFO

HTTP traceability level

dc.app.log.aspect.enable

false

switch to enable data profiling (computation and logging of service execution time)

dc.app.url.web-ui

http://localhost

public web-ui address

dc.app.api.spark

http://localhost:8090

list of Spark "context" addresses (comma-separated)

dc.app.api.spark.security.user.name

**

list of Spark "context" logins (comma-separated)

dc.app.api.spark.security.user.password

**

list of Spark "context" passwords (comma-separated)

dc.api.spark.shared-file-system

false

indicates whether the Spark "contexts" share the same file system

dc.api.spark.request-connection-timeout

10000

Connection timeout in milliseconds with a Spark "context"

dc.api.spark.request-reading-timeout

10000

Reading timeout in milliseconds with a Spark "context"

dc.app.ehcahce.configuration

redefine the location of the ehcache configuration file

Spark Module - Image dc/spark

Image description

Description

Hosts the computation module (embedded Spark driver), which is the distributed computation context. This module can interface with a Spark cluster (not delivered with the solution).

The image runs two processes:

* the companion: the module API (exchanges with the backend, notifications); * the Spark job: the embedded Spark driver, which runs the computations.

Size

~1GB

Technical components

Java/Spring Boot/Spark applications

User

The container starts as root (process supervisor), then the application runs as dc (uid 38330, primary group root (gid 0), secondary group datachain (gid 38330)). If a uid is imposed at startup (OpenShift, Docker --user option), the whole container runs with that uid, which must belong to the root group (gid 0). Host directories mounted as volumes must be writable by uid 38330 or by group 0. See Running without privileges (OpenShift).

Volumes

Path Purpose Required

/data

If the HDFS storage is a local directory on the machine, this volume is required. It is not needed when using an HDFS cluster.

No (see left)

/logs

Directory where the server writes its logs

No, but recommended

/java_cert_import

Directory in which to place the certificates that Datachain will access through HTTPS connectors. See Application certificates.

No, if no HTTPS connector is planned.

Logs

Several types of logs, located under /logs/datachain/spark

Log Purpose

dc-spark.log

Application logs: mainly used for debugging.

One new file per day, compressed on rollover, and several files per day if the current size exceeds 200MB.

First increment at 0. Total size of all files capped at 10GB. Retention period: 30 days.

access.log

Access logs

management.log

Management logs: can be ignored

URLs

Port URL Purpose

8090

/

Standard listening port of the component: all business operations with the backend

9090

/management/*

Access to Spring actuator information (companion), for example on /management/prometheus if the module configuration enables metrics:

  • management.endpoints.web.base-path=/management (default value)

  • management.prometheus.metrics.export.enabled=true

4040

/

Access to the Spark driver interface (Spark job): can be used to analyze job execution and identify the cause of performance problems on a particular job. Warning: this URL is not protected in any way, and in particular allows killing a Spark job. Enable it on a development platform only.

Value of "dc.app.spark.driver.port"

/

When a Spark cluster is set up, the container listens on the defined port, which must be reachable from the cluster machines, to carry the exchanges between the driver and the Spark cluster.

Environment variables

Variable Default Description

SPARK_SECURITY_USER_PASSWORD_FILE

Name of the "docker secret" file used to override dc.app.api.spark.security.user.password (identical on backend and spark)

JAVA_OPTIONS

-Xms1024M -Xmx3g

JVM options of the Spark job, notably memory. If the variable is set, it replaces the default memory options (-Xms, -Xmx): include them again.

JAVA_JAR_OPTIONS

-Xms128M -Xmx256M

JVM options of the companion, notably memory. Variable distinct from JAVA_OPTIONS, which is not taken into account by the companion.

Environment variables whose name contains dots (for example dc.app.module.instance-id) are passed as system properties (-D) to both processes of the image. They allow overriding the parameters described below, and apply the same value to the companion and the Spark job.

Configuration files

The image parameters are spread over three configuration files:

  • the public configuration of the companion;

  • the shared configuration of the companion: it contains the parameters common to both processes (storage paths, S3 access, limits);

  • the public configuration of the Spark job.

Companion: public configuration

######################################################################################################################
##   DATACHAIN DC-SPARK-COMPANION PUBLIC CONFIGURATION FILE
##
##   Operator-facing settings. This file is published as-is in the documentation (Maven artifact with
##   classifier "conf"). Settings shared with hdh-spark-job are in application-shared.properties.
##   Profile "public": loaded first, overridden by "shared" then by "local" / "prod-default".
##
##   Réglages exposés à l'exploitation. Ce fichier est publié tel quel dans la documentation
##   (artefact Maven classifier "conf"). Les paramètres partagés avec hdh-spark-job sont dans
##   application-shared.properties.
##   Profil "public" : chargé en premier, surchargé par "shared" puis par "local" / "prod-default".
######################################################################################################################

###############################################################
## HTTP server.
## Serveur HTTP.
###############################################################
## Server HTTP port.
## Port HTTP du serveur.
server.port=8090

## Whether response compression is enabled.
## Indique si la compression des réponses est activée.
server.compression.enabled=true
## Comma-separated list of MIME types that should be compressed.
## Liste séparée par des virgules des types MIME qui doivent être compressés.
server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain,text/csv,application/octet-stream
## Minimum "Content-Length" value required for compression to be performed.
## Valeur "Content-Length" minimale requise pour que la compression soit effectuée.
server.compression.min-response-size=2KB

## Multipart uploads are disabled.
## Les téléversements multipart sont désactivés.
spring.servlet.multipart.enabled=false

## Access log: enabled, encoding, retention in days, and directory (the directory should not be modified).
## Logs d'accès : activation, encodage, rétention en jours et répertoire (ne devrait pas être modifié).
server.tomcat.accesslog.enabled=true
server.tomcat.accesslog.max-days=31
server.tomcat.accesslog.directory=${DC_ROOT_LOG_DIRECTORY:/tmp/log}${DC_LOG_DIRECTORY:/datachain/dc_spark_companion}

###############################################################
## API documentation.
## Documentation de l'API.
###############################################################
springdoc.api-docs.enabled=true
springdoc.swagger-ui.enabled=true
dc.app.doc.server.url=none

###############################################################
## Monitoring with Spring actuator. For the detailed configuration, see
## https://docs.spring.io/spring-boot/docs/3.1.5/reference/html/actuator.html
## Monitoring avec Spring actuator. Pour la configuration détaillée, voir le lien ci-dessus.
###############################################################
management.server.port=9090
management.server.address=127.0.0.1
management.endpoint.shutdown.enabled=false
management.endpoints.web.base-path=/management
management.endpoints.web.exposure.include=health, info, prometheus
management.prometheus.metrics.export.enabled=false

###############################################################
## Context identity.
## Identité du contexte.
###############################################################
## Context ID must match the one registered in the backend configuration.
## L'identifiant de contexte doit correspondre à celui déclaré dans la configuration du backend.
dc.app.context.id=0
dc.app.context.name=context_1
## URL of this companion instance, reported to the backend via the heartbeat.
## URL de cette instance du companion, remontée au backend par le heartbeat.
dc.app.context.url=http://localhost:8090

###############################################################
## Job scheduling.
## Ordonnancement des jobs.
###############################################################
## Spark scheduling mode. FAIR lets several jobs run concurrently, FIFO runs them one at a time.
## Must match hdh-spark-job's dc.app.spark.scheduler.mode.
## Mode d'ordonnancement Spark. FAIR accepte plusieurs jobs en parallèle, FIFO les exécute un par un.
## Doit correspondre au dc.app.spark.scheduler.mode de hdh-spark-job.
dc.app.spark.scheduler.mode=FAIR

## Number of threads dequeuing and running the Spark jobs coming from the backend. Only used in FAIR
## mode. Keep it in line with the power allocated to the context, otherwise jobs always wait.
## Nombre de threads chargés de dépiler et exécuter les jobs Spark venant du backend. Utilisé en mode
## FAIR uniquement. À adapter à la puissance allouée au contexte, sinon des jobs attendent en permanence.
dc.app.job.manager.spark.thread.number=5
## Number of threads running the non-Spark jobs (project import/export).
## Nombre de threads chargés des jobs non Spark (import/export de projets).
dc.app.job.manager.other.thread.number=5

## Spark resource parameters, reported in the heartbeat so the backend knows the context capacity.
## Must match the values configured in hdh-spark-job's application.public.properties.
## Paramètres de ressources Spark, remontés dans le heartbeat pour que le backend connaisse la
## capacité du contexte. Doivent correspondre aux valeurs de l'application.public.properties de hdh-spark-job.
dc.app.spark.master=local[2]
dc.app.spark.executor.memory=2g
dc.app.spark.cores.max=2

###############################################################
## Redis messaging with the backend.
## Échanges de messages avec le backend via Redis.
###############################################################
## Redis URL.
## URL de Redis.
dc.app.notification.urls=redis://localhost:33333

## Platform code, to change when several platforms share the same Redis.
## Code de la plateforme, à modifier si plusieurs plateformes partagent le même Redis.
dc.app.module.plateform-id=default
## Module code, according to the topology.
## Code du module, selon la topologie.
dc.app.module.instance-id=DATACHAIN_CORE

## The prefixes below exist so that several Datachain instances can share one Redis without
## overwriting each other's queues. They must match the ones configured on the backend.
## Les préfixes ci-dessous permettent à plusieurs instances Datachain de partager un même Redis sans
## écraser mutuellement leurs files. Ils doivent correspondre à ceux configurés sur le backend.
dc.app.instance-unique-id=${dc.app.module.plateform-id}:${dc.app.module.instance-id}
dc.app.notification.lockmap=datachain:${dc.app.instance-unique-id}:notification.lockmap
dc.app.notification.job.queue.name.prefix=datachain:${dc.app.instance-unique-id}:notification.job.queue
dc.app.notification.event.job.queue.name.prefix=datachain:${dc.app.instance-unique-id}:notification.event.job.queue
dc.app.notification.cancel.job.topic.name.prefix=datachain:${dc.app.instance-unique-id}:notification.cancel.job.topic
dc.app.notification.event.job.topic.name.prefix=datachain:${dc.app.instance-unique-id}:notification.event.job.topic
dc.app.notification.cache.job.result.name.prefix=datachain:${dc.app.instance-unique-id}:notification.cache.job.result
dc.app.notification.event.heart.beat.name.prefix=datachain:${dc.app.instance-unique-id}:notification.event.heart.beat

###############################################################
## Hadoop / S3A configuration used by CompanionContextListener through HdfsConfigurationInitiator.
## Configuration Hadoop / S3A utilisée par CompanionContextListener via HdfsConfigurationInitiator.
###############################################################
dc.app.spark.hadoop.dfs.client.use.datanode.hostname=false

## Hadoop S3A implementation to use.
## Implémentation Hadoop S3A à utiliser.
dc.app.spark.hadoop.fs.s3a.impl=org.apache.hadoop.fs.s3a.S3AFileSystem
## Path-style access (http://host/bucket/...). Required for MinIO and S3-compatible storages.
## Accès path-style (http://host/bucket/...). Nécessaire pour MinIO ou un stockage compatible S3.
dc.app.spark.hadoop.fs.s3a.path.style.access=true
dc.app.spark.hadoop.fs.s3a.fast.upload=true
## Buffer type used (disk, array, bytebuffer) and local directory holding the disk buffers.
## Type de buffer utilisé (disk, array, bytebuffer) et répertoire local des buffers disque.
dc.app.spark.hadoop.fs.s3a.fast.upload.buffer=disk
dc.app.spark.hadoop.fs.s3a.buffer.dir=/tmp/spark-buffers
## Maximum number of blocks an output stream may have in flight.
## Nombre maximum de blocs qu'un flux de sortie peut avoir en activité.
dc.app.spark.hadoop.fs.s3a.fast.upload.active.blocks=10
## Threshold triggering a multipart upload, and size of each part.
## Seuil déclenchant le multipart upload, et taille de chaque partie.
dc.app.spark.hadoop.fs.s3a.multipart.threshold=67108864
dc.app.spark.hadoop.fs.s3a.multipart.size=64M
## Maximum number of threads and of simultaneous connections for the S3A operations.
## Nombre maximum de threads et de connexions simultanées pour les opérations S3A.
dc.app.spark.hadoop.fs.s3a.threads.max=100
dc.app.spark.hadoop.fs.s3a.connection.maximum=300
## HTTP connection timeout in milliseconds, retry count and retry interval.
## Timeout de connexion HTTP en millisecondes, nombre de tentatives et intervalle entre tentatives.
dc.app.spark.hadoop.fs.s3a.connection.timeout=200000
dc.app.spark.hadoop.fs.s3a.attempts.maximum=20
dc.app.spark.hadoop.fs.s3a.retry.interval=500ms

Companion: shared configuration

######################################################################################################################
##   DATACHAIN DC-SPARK-COMPANION SHARED CONFIGURATION FILE
##
##   Settings shared with hdh-spark-job: both processes run in the same container and must
##   resolve exactly the same paths and the same limits. Any change here must be reported verbatim in
##   java-source/hdh-spark-job/src/main/resources/application.shared.properties
##   Profile "shared": loaded after the "public" profile and before "local" / "prod-default".
##
##   Paramètres partagés avec hdh-spark-job : les deux processus tournent dans le même conteneur et
##   doivent résoudre exactement les mêmes chemins et les mêmes limites. Toute modification ici doit
##   être reportée à l'identique dans
##   java-source/hdh-spark-job/src/main/resources/application.shared.properties
##   Profil "shared" : chargé après le profil "public" et avant "local" / "prod-default".
######################################################################################################################

###############################################################
## Storage root.
## file:/// for the local disk, s3a://bucket for S3, hdfs://host:port for HDFS.
## Racine du stockage.
## file:/// pour le disque local, s3a://bucket pour S3, hdfs://host:port pour HDFS.
###############################################################
dc.app.data-file.hdfs=file:///tmp/hdh

###############################################################
## Input depot paths.
## Répertoires des dépôts en entrée.
###############################################################
dc.app.data-file.hdfs.input.depot.csv.execution=${dc.app.data-file.hdfs}/input/depot/csv/execution
dc.app.data-file.hdfs.input.depot.csv.tmp=${dc.app.data-file.hdfs}/input/depot/csv/tmp
dc.app.data-file.hdfs.input.depot.db.sql.execution=${dc.app.data-file.hdfs}/input/depot/db/execution
dc.app.data-file.hdfs.input.depot.db.mongodb.execution=${dc.app.data-file.hdfs}/input/depot/mongodb/execution
dc.app.data-file.hdfs.input.depot.db.neo4j.execution=${dc.app.data-file.hdfs}/input/depot/neo4j/execution
dc.app.data-file.hdfs.input.depot.json.execution=${dc.app.data-file.hdfs}/input/depot/json/execution
dc.app.data-file.hdfs.input.depot.json.tmp=${dc.app.data-file.hdfs}/input/depot/json/tmp
dc.app.data-file.hdfs.input.depot.parquet.execution=${dc.app.data-file.hdfs}/input/depot/parquet/execution
dc.app.data-file.hdfs.input.depot.parquet.tmp=${dc.app.data-file.hdfs}/input/depot/parquet/tmp
dc.app.data-file.hdfs.input.depot.excel.execution=${dc.app.data-file.hdfs}/input/depot/excel/execution
dc.app.data-file.hdfs.input.depot.excel.tmp=${dc.app.data-file.hdfs}/input/depot/excel/tmp
dc.app.data-file.hdfs.input.depot.excel.tmp.cache=${dc.app.data-file.hdfs}/input/depot/excel/cache
dc.app.data-file.hdfs.input.depot.binary.execution=${dc.app.data-file.hdfs}/input/depot/binary/execution
dc.app.data-file.hdfs.input.depot.binary.tmp=${dc.app.data-file.hdfs}/input/depot/binary/tmp
dc.app.data-file.hdfs.input.depot.xml.execution=${dc.app.data-file.hdfs}/input/depot/xml/execution
dc.app.data-file.hdfs.input.depot.xml.tmp=${dc.app.data-file.hdfs}/input/depot/xml/tmp
dc.app.data-file.hdfs.input.depot.trino.execution=${dc.app.data-file.hdfs}/input/depot/trino/execution
dc.app.data-file.hdfs.input.depot.dataLink.execution=${dc.app.data-file.hdfs}/input/depot/dataLink/execution

## Folder where an imported project archive is unzipped.
## Répertoire de décompression d'une archive de projet importée.
dc.app.data-file.hdfs.input.import.zip=${dc.app.data-file.hdfs}/input/import/zip

###############################################################
## Export output paths.
## Répertoires de sortie des exports.
###############################################################
dc.app.data-file.hdfs.output.export.zip=${dc.app.data-file.hdfs}/output/export/zip
dc.app.data-file.hdfs.output.export.csv=${dc.app.data-file.hdfs}/output/export/csv
dc.app.data-file.hdfs.output.export.json=${dc.app.data-file.hdfs}/output/export/json
dc.app.data-file.hdfs.output.export.parquet=${dc.app.data-file.hdfs}/output/export/parquet
dc.app.data-file.hdfs.output.export.xml=${dc.app.data-file.hdfs}/output/export/xml
dc.app.data-file.hdfs.output.export.excel=${dc.app.data-file.hdfs}/output/export/excel
dc.app.data-file.hdfs.output.export.txt=${dc.app.data-file.hdfs}/output/export/txt
dc.app.data-file.hdfs.output.export.txt.tmp=${dc.app.data-file.hdfs}/output/export/txt/tmp

###############################################################
## Parquet cache paths.
## Répertoires de cache parquet.
###############################################################
dc.app.data-file.hdfs.output.cache.parquet=${dc.app.data-file.hdfs}/output/cache/parquet
dc.app.data-file.hdfs.output.cache.parquet.datablock=${dc.app.data-file.hdfs.output.cache.parquet}/datablock
dc.app.data-file.hdfs.output.cache.parquet.uet=${dc.app.data-file.hdfs.output.cache.parquet}/uet

###############################################################
## Depot snapshot path.
## Répertoire des snapshots de dépôt.
###############################################################
dc.app.data-file.hdfs.output.snapshot.depot=${dc.app.data-file.hdfs}/output/snapshot/depot

###############################################################
## Project data root and DataLink snapshot root.
## Racine des données projet et racine des snapshots DataLink.
###############################################################
dc.app.data-file.hdfs.project.root=${dc.app.data-file.hdfs}/data
dc.app.data-file.hdfs.dataLinks.root=${dc.app.data-file.hdfs.project.root}/dataLinks

## Free disk safety margin kept on the folders written, in minutes.
## Marge de sécurité sur l'espace disque libre des répertoires écrits, en minutes.
dc.app.free-disk.safety-margin-minutes=10

###############################################################
## S3 access, set by the deployment.
## Accès S3, renseigné par le déploiement.
###############################################################
## S3 service endpoint URL.
## URL de l'endpoint du service S3.
dc.app.data-file.s3.endpoint=none
## Bucket used for the storage.
## Nom du bucket utilisé pour le stockage.
dc.app.data-file.s3.bucket=none
## S3 access key.
## Clé d'accès S3.
dc.app.data-file.s3.access.key=none
## S3 secret key.
## Clé secrète S3.
dc.app.data-file.s3.secret.key=none

###############################################################
## Shared limits read by both processes.
## Limites partagées, lues par les deux processus.
###############################################################
## Maximum number of rows returned on a "take" request from the UI.
## Nombre maximum de lignes remontées lors d'un "take" au niveau de l'IHM.
dc.app.take.max-row=500000

## SFTP connector timeout, in milliseconds.
## Timeout des connecteurs SFTP, en millisecondes.
dc.app.connector.sftp.timeout=10000

## Cipher key. Optional; if set it must be exactly 16 characters, and must match the backend.
## If it is changed, every connector password must be revalidated.
## Clé de chiffrement. Optionnelle ; si renseignée elle doit faire exactement 16 caractères et être
## identique à celle du backend. Si elle change, tous les mots de passe des connecteurs sont à revalider.
dc.app.backend.cipher.key=

Spark job: public configuration

Native Spark parameters are declared under dc.app. followed by the usual Spark key: at startup, the dc.app. prefix is removed and the resulting key is passed to Spark. For example, dc.app.spark.master=yarn sets spark.master=yarn.

######################################################################################################################
#   DATACHAIN HDH-SPARK-JOB PUBLIC CONFIGURATION
#   Paramètres de réglage exposés à l'exploitation. Ce fichier est publié tel quel dans la
#   documentation (artefact Maven classifier "conf").
#
#   Ordre de chargement (le dernier gagne) :
#     application.public.properties -> application.shared.properties -> application.properties
#     -> variables d'environnement -> -Dcle=valeur
#
#   Les paramètres Spark natifs se déclarent sous dc.app.<clé spark habituelle> : au démarrage le
#   préfixe dc.app. est retiré et la clé résultante est poussée dans la SparkConf.
#   Exemple : dc.app.spark.master=yarn  ->  spark.master=yarn
######################################################################################################################

####################################################
## Serveur d'exécution de jobs (API du spark-job) ##
####################################################
## Port sur lequel le companion soumet les jobs
dc.app.job.execution.server.port=8099
## Nombre de jobs Spark exécutés en parallèle
dc.app.job.execution.thread.number=5
## Nombre de threads servant les appels HTTP (statut / annulation) ; séparé du pool d'exécution
dc.app.job.execution.http.thread.number=10

####################
## Contexte Spark ##
####################
dc.app.spark.app-name=DATACHAIN
## Configuration de la puissance allouée au contexte spark.
## Vis-à-vis de Spark, le service spark-job se comporte comme un driver spark.
## Par défaut, la configuration est de type local si bien que le driver est aussi un worker Spark.
## local[2] indique que spark utilise deux coeurs au maximum
dc.app.spark.master=local[2]
## Mémoire allouée au contexte spark
dc.app.spark.executor.memory=2g
## Nombre de coeurs alloués au contexte spark
dc.app.spark.cores.max=2

####################
## Job scheduling ##
####################
## Mode de scheduling Spark
## par default, spark est lancé en mode FAIR : le contexte accepte plusieurs tâches, et essaye
## d'allouer des ressources à chaque tâches
## Fair scheduling (multiple jobs can be executed concurrently)
dc.app.spark.scheduler.mode=FAIR
## Fifo scheduling (only one job can be executed concurrently)
# dc.app.spark.scheduler.mode=FIFO
## Pool de scheduling utilisé par les jobs
dc.app.spark.scheduler.pool=default
## Fichier de définition des pools FAIR.
## Chemin local ou URI (file:/// , hdfs:// , s3a://). Le déploiement surcharge cette valeur.
dc.app.spark.scheduler.allocation.file=/opt/dev/dc/java-source/hdh-spark-job/src/main/resources/fairScheduler.xml

###########################################
## Parametrage des ports sparks Standard ##
###########################################
dc.app.spark.blockManager.port=7010
dc.app.spark.driver.port=7020
dc.app.spark.driver.host=localhost
dc.app.spark.driver.bindAddress=localhost
dc.app.spark.driver.maxResultSize=1g
dc.app.spark.local.dir=/tmp
dc.app.spark.ui.port=4040
dc.app.spark.ui.killEnabled=false

#############################################
## Timeouts des UDF HTTP (formules) en ms  ##
#############################################
dc.app.spark.formula.http.timeout.read=200
dc.app.spark.formula.http.timeout.connect=200

###########################################
## Parametrage Optimizations             ##
###########################################
dc.app.spark.sql.adaptive.enabled=true
dc.app.spark.sql.adaptive.coalescePartitions.enabled=true
dc.app.spark.sql.adaptive.coalescePartitions.initialPartitionNum=10
dc.app.spark.sql.adaptive.forceOptimizeSkewedJoin=true
dc.app.spark.sql.adaptive.localShuffleReader.enabled=true
dc.app.spark.sql.autoBroadcastJoinThreshold=-1
dc.app.spark.sql.shuffle.partitions=250
dc.app.spark.sql.files.minPartitionNum=10

## Paramètres positionnés pour corriger l'écriture de timestamp
## d'avant le premier janvier 1900 dans un fichier parquet.
dc.app.spark.sql.parquet.int96RebaseModeInWrite=CORRECTED
dc.app.spark.sql.parquet.int96RebaseModeInRead=CORRECTED
dc.app.spark.sql.parquet.datetimeRebaseModeInWrite=CORRECTED
dc.app.spark.sql.parquet.datetimeRebaseModeInRead=CORRECTED

#############################################
## Configuration Spark Hadoop pour S3A     ##
#############################################
dc.app.spark.hadoop.dfs.client.use.datanode.hostname=false
# Implementation Hadoop S3A a utiliser
dc.app.spark.hadoop.fs.s3a.impl=org.apache.hadoop.fs.s3a.S3AFileSystem
# Acces path-style (http://host/bucket/...). Nécessaire pour MinIO ou S3 compatible
dc.app.spark.hadoop.fs.s3a.path.style.access=true
dc.app.spark.hadoop.fs.s3a.fast.upload=true
# Type de buffer utilise (disk, array, bytebuffer)
dc.app.spark.hadoop.fs.s3a.fast.upload.buffer=disk
# emplacement locale pour les buffers en disque
dc.app.spark.hadoop.fs.s3a.buffer.dir=/tmp/spark-buffers
# Nombre maximum de blocs qu un flux de sortie peut avoir en activite
dc.app.spark.hadoop.fs.s3a.fast.upload.active.blocks=10
# Seuil pour declencher le multipart upload
dc.app.spark.hadoop.fs.s3a.multipart.threshold=67108864
# Taille de chaque partie du multipart upload
dc.app.spark.hadoop.fs.s3a.multipart.size=64M
# Nombre maximum de threads pour les operations S3A
dc.app.spark.hadoop.fs.s3a.threads.max=100
# Nombre maximal des connexions simultannees
dc.app.spark.hadoop.fs.s3a.connection.maximum=300
# Timeout de connexion HTTP en millisecondes
dc.app.spark.hadoop.fs.s3a.connection.timeout=200000
# Nombre maximal de tentatives en cas d echec
dc.app.spark.hadoop.fs.s3a.attempts.maximum=20
# Intervale de temps de tentatives en cas d echec
dc.app.spark.hadoop.fs.s3a.retry.interval=500ms

## La version 2 de l'algorithme du FileOutputCommitter introduit un mécanisme de commit plus robuste.
# Dans les versions antérieures, les échecs partiels pouvaient entrainer des données corrompues ou incomplétes.
dc.app.spark.hadoop.mapreduce.fileoutputcommitter.algorithm.version=2

## Committer (1) Magic Committer d'hadoop (écriture des parquets en S3 plus performante et plus robuste)
dc.app.spark.hadoop.fs.s3a.committer.magic.enabled=true
dc.app.spark.hadoop.fs.s3a.committer.name=magic
dc.app.spark.hadoop.mapreduce.outputcommitter.factory.scheme.s3a=org.apache.hadoop.fs.s3a.commit.S3ACommitterFactory
dc.app.spark.sql.sources.commitProtocolClass=org.apache.spark.internal.io.cloud.PathOutputCommitProtocol
dc.app.spark.sql.parquet.output.committer.class=org.apache.spark.internal.io.cloud.BindingParquetOutputCommitter

##Committer (2) staging committer directory mode
#dc.app.spark.hadoop.fs.s3a.committer.name=directory

##Committer (3) staging committer partitioned mode
#dc.app.spark.hadoop.fs.s3a.committer.name=partitioned

##Committer (0) default committer : Hadoop committer

#######################################################
## Job configuration used by hdh-spark-job only.
## The settings shared with dc-spark-companion-app are in application.shared.properties.
## Configuration des jobs utilisée par le seul hdh-spark-job.
## Les réglages partagés avec dc-spark-companion-app sont dans application.shared.properties.
#######################################################
## Number of rows fetched per JDBC batch, for the SQL connectors.
## Nombre de lignes retournées lors de chaque requête SQL pour les connecteurs SQL.
dc.app.jdbc.fetchSize=5000

## Maximum payload size returned on a "take" request from the UI.
## Taille maximum de données remontées lors d'un "take" au niveau de l'IHM.
dc.app.take.max-object-size=258002000

## File extensions handled as Excel workbooks.
## Extensions de fichier traitées comme des classeurs Excel.
dc.app.xlsx.file.extensions=xlsx,xlsm

## Timezone used by the date-based window functions. Empty means the JVM default.
## Fuseau horaire utilisé pour les fonctions window basées sur les dates. Vide = défaut de la JVM.
## example / exemple : dc.app.window.default.tz=Europe/Paris
dc.app.window.default.tz=

Main parameters

The server., management., dc.app.module. and dc.app.job.manager. parameters belong to the companion. The dc.app.spark. and dc.app.job.execution. parameters belong to the Spark job. The other dc.app.* parameters are read by both processes.

Parameter Default Description

server.port

8090

HTTP port of the companion

server.compression.enabled

true

switch to enable HTTP compression

server.compression.mime-types

application/json,application/xml,text/html,text/xml,text/plain,text/csv,application/octet-stream

MIME types to compress

server.compression.min-response-size

2KB

compress from this size

dc.app.module.plateform-id

default

platform code. Together with dc.app.module.instance-id, it is used to build the names of the Redis keys used for notifications between the backend and the companion (datachain:<plateform-id>:<instance-id>:…​). Keep the value default: it must be identical on the backend.

dc.app.module.instance-id

DATACHAIN_CORE

To be set to the identifier of the Datachain Core instance, i.e. the same value as for the backend module (dc.app.module.instance-id). This identifier is the code of the DC_CORE product declared in the deployment topology description file of the console configuration. The default value is only suitable if this code is DATACHAIN_CORE. It must be distinct between two Datachain Core instances sharing the same Redis.

dc.app.job.manager.spark.thread.number

5

number of companion threads in charge of dequeuing and running the Spark jobs coming from the backend (FAIR mode only). To be adapted to the power allocated to the context, otherwise jobs wait permanently

dc.app.job.manager.other.thread.number

5

number of companion threads in charge of non-Spark jobs (project import/export)

dc.app.job.execution.thread.number

5

number of Spark jobs run in parallel by the Spark job

dc.app.job.execution.http.thread.number

10

number of Spark job threads serving HTTP calls (status, cancellation), distinct from the execution pool

dc.app.spark.scheduler.mode

FAIR

Spark scheduling mode: FAIR accepts several jobs in parallel, FIFO runs them one at a time

dc.app.spark.master

local[2]

connection string to the Spark master (spark://HOST:PORT) or local[n] to run in local mode. This value is also reported to the backend by the companion (context capacity)

dc.app.spark.executor.memory

2g

memory allocated to an executor

dc.app.spark.cores.max

2

maximum number of cores available to the executors

dc.app.spark.ui.port

4040

Spark monitoring console

dc.app.spark.blockManager.port

7010

communication port for the blockManagers, valid for the driver (Spark job) and the executors (cluster mode only)

dc.app.spark.driver.port

7020

communication port between the driver (Spark job), the master and the executors (for cluster mode)

dc.app.spark.driver.host

localhost

host name or IP address of the driver for communication between the driver (Spark job), the master and the executors (for cluster mode)

dc.app.spark.driver.bindAddress

localhost

host name or IP address to bind the connection interfaces (sockets) to. This setting overrides (replaces) the "SPARK_LOCAL_IP" environment variable (cluster mode only)

dc.app.spark.driver.maxResultSize

1g

maximum size of serialized data for the partitions after a collect action (greater than dc.app.take.max-object-size)

dc.app.spark.local.dir

/tmp

temporary location for the executors: it should be on a fast, local disk of the system. It can also be a comma-separated list of directories located on different disks.

dc.app.spark.formula.http.timeout.read

200

read-timeout value in milliseconds for HTTP requests from formulas

dc.app.spark.formula.http.timeout.connect

200

connect-timeout value in milliseconds for HTTP requests from formulas

dc.app.take.max-row

500000

maximum number of rows (on a "take")

dc.app.take.max-object-size

258002000

maximum size of strings in bytes (on a "take")

dc.app.jdbc.fetchSize

5000

value used by the database connectors, indicates the size of a batch of data to process

dc.app.connector.sftp.timeout

10000

timeout of the SFTP connectors, in milliseconds

dc.app.backend.cipher.key

(empty)

encryption key, optional: if set, it must be exactly 16 characters long and identical to the backend one. If it changes, all connector passwords must be revalidated

dc.app.context.id

0

id of the current context (must be unique for a backend)

dc.app.context.name

context_1

name of the current context

dc.app.context.url

http://localhost:8090

URL of the current context, communicated to the backend

dc.app.api.backend

http://localhost:8089

HTTP address of the backend API

dc.app.api.maps.url

http://localhost/service/maps/udf/

HTTP address of the google-map API in the backend module

dc.app.backend.user.username

sparktobackend

system user to create at startup of the backend service, used by the Spark context(s)

dc.app.backend.user.password

**

password of the system user to create at startup of the backend service, used by the Spark context(s)

dc.app.backend.security.oauth.client.id

**

OAuth2 client id of the backend module

dc.app.backend.security.oauth.client.secret

**

OAuth2 client secret of the backend module

management.endpoints.web.base-path

/management

prefix of the actuator endpoints

management.prometheus.metrics.export.enabled

false

switch to enable the export of metrics in Prometheus format

management.server.port

9090

HTTP port of the actuator service

management.server.address

127.0.0.1

network address the actuator endpoints must bind to

spring.security.user.name

**

login of the Spark "context"

spring.security.user.password

**

password of the Spark "context"

dc.app.data-file.hdfs

file:///tmp/hdh

HDFS root connection string: file:/// for the local disk, s3a://bucket for S3, hdfs://host:port for HDFS

dc.app.data-file.hdfs.dataLinks.root

${dc.app.data-file.hdfs.project.root}/dataLinks

root directory of the DataLinks snapshots

dc.app.data-file.s3.endpoint

none

URL of the S3 service endpoint (S3 access set by the deployment)

dc.app.data-file.s3.bucket

none

S3 bucket

dc.app.data-file.s3.access.key

**

S3 access key

dc.app.data-file.s3.secret.key

**

S3 secret key

dc.app.free-disk.safety-margin-minutes

10

when the backend requests a disk space cleanup, directories written during this duration (in minutes) before the request are kept: they may belong to items the backend did not know about yet

Core Migration Module - Image dc/pg_migration

Image description

Description

Responsible for running the PostgreSQL-related update patches.

Size

~400MB

Technical components

Java 17/Groovy application

User

dc (uid 38330, primary group root (gid 0), secondary group datachain (gid 38330)). The image also accepts any uid imposed at startup (OpenShift): this uid belongs to the root group (gid 0). Host directories mounted as volumes must be writable by uid 38330 or by group 0. See Running without privileges (OpenShift).

Volumes

No volumes

Logs

Migration module logs on the Docker standard output

URLs

No URL on this component

Environment variables

Variable Default Description

PG_HOST

localhost

DNS name of the database: will generally be set to dc-pg

PG_PORT

5432

Database port: should not be modified

PG_USER

postgres

User used for table migrations

PG_PASSWORD

changeIt

Password used for table migrations: should be changed via this parameter or the following one: PG_PASSWORD_FILE

PG_PASSWORD_FILE

Name of the "docker secret" file used to define the password used for table migrations: should be changed via this parameter or the previous one: PG_PASSWORD

PG_DB

adobis

Database name

PG_EXPOSE_DB

expose

Name of the expose database

PG_EXPOSE_HOST

localhost

DNS name of the expose database: will generally be set to dc-pg

PG_EXPOSE_PORT

5432

Port of the expose database: should not be modified

PG_EXPOSE_USER

postgres

User used for expose table migrations

PG_EXPOSE_PASSWORD

changeIt

Password used for expose table migrations: should be changed via this parameter or the following one: PG_EXPOSE_PASSWORD_FILE

PG_EXPOSE_PASSWORD_FILE

Name of the "docker secret" file used to define the password used for expose table migrations: should be changed via this parameter or the previous one: PG_EXPOSE_PASSWORD

PG_JOB_HOST

value of PG_HOST

DNS name of the "job" database (cleanup of job requests at each new version). By default, this is the main database: set only if jobs use a separate database

PG_JOB_PORT

value of PG_PORT

Port of the "job" database

PG_JOB_DB

value of PG_DB

Name of the "job" database

PG_JOB_USER

value of PG_USER

User of the "job" database

PG_JOB_PASSWORD

value of the main database password

Password of the "job" database: should be changed via this parameter or the following one: PG_JOB_PASSWORD_FILE

PG_JOB_PASSWORD_FILE

Name of the "docker secret" file used to define the password of the "job" database: should be changed via this parameter or the previous one: PG_JOB_PASSWORD

Dernière mise à jour le 2 novembre 2026 à 15:16