Metadata Database
Debug Information
Image: docker.io/bitnami/mariadb-galera:11.3.2-debian-12-r9
- Ports: 3306/tcp
- JDBC:
jdbc://mariadb:<hostname>:3306
To directly access in Kubernetes (for e.g. debugging), forward the svc port to your local machine:
kubectl [-n namespace] port-forward svc/metadata-db 3306:3306
Overview¶
The metadata database is the single, central source of truth within DBRepo and holds all metadata information for interaction between the services and displaying information in the UI.
On the first start, the schema is generated by the file /docker-entrypoint-initdb.d/setup-schema.sql
within the
container. You can add custom files that should be executed on the first start by placing them into the
/docker-entrypoint-initdb.d/
folder as well. For example:
services:
dbrepo-metadata-db:
...
volumes:
- /path/to/setup-schema.sql:/docker-entrypoint-initdb.d/1_setup-schema.sql
- /path/to/setup-data.sql:/docker-entrypoint-initdb.d/2_setup-data.sql
...
Configuration¶
By default, the Metadata Database is configured as a cluster of three nodes where each node has a maximum of 2048 MiB
RAM available. As recommended by
MariaDB, we set
innodb_buffer_pool_size=1430M
(70% of the available RAM). If you have more RAM available, you should set the variable
accordingly to improve the performance.
Image¶
1.4.4
We recommend to use the MariaDB image directly instead of our own maintained image which just copied
the setup-schema.sql
into the container. This can be done more transparently through volume mounts.
Alphabetic Filename Sorting
Beware that the init script provided by Bitnami executes files in alphabetic order! For example: the file
setup-schema.sql
is executed after the file setup-data.sql
! Thefore a sorting prefix 1-9 is recommended!