Deploying the DAMAP backend¶
The DAMAP backend is a Java application written for Quarkus. We currently only support containerized deployments and recommend using the ghcr.io/damap-org/damap-backend:next image unless you have created a custom CRIS integration that needs recompilation.
You can pass all configuration options to the DAMAP backend using environment variables. Please see the Configuration and CRIS System Integration sections for details on available configuration options. DAMAP also offers a ready-made example.env file with all available environment variables you can use to configure your application in a dockerized setup.
Minimum configuration¶
At the very least, you will need to provide the following environment variables for containerized DAMAP to work:
DAMAP_DB_HOSTlikeSERVERNAME.DAMAP_DB_KINDas your database engine name (e.g.postgresql).DAMAP_DB_NAMElikedamap.DAMAP_DB_PORTlike5432.DAMAP_DB_KINDtype of the database, allowed valuespostgresqlandoracle.DAMAP_DB_USERNAMEandDAMAP_DB_PASSWORDwith your database credentialsDAMAP_DB_DATA_HOST_PATHpath on the machine where database data should be stored, like./dataDAMAP_HOSTNAMElike your.domain.com, no trailing slash or protocol (http/https) - can be ignored when external OIDC server is usedDAMAP_QUARKUS_HTTP_CORS_ORIGINScontaining the valid origin URLs for your frontend.DAMAP_QUARKUS_OIDC_AUTH_SERVER_URLcontaining the OIDC server URL the backend should use.DAMAP_QUARKUS_OIDC_TOKEN_ISSUERcontaining the user-accessible OIDC URL.DAMAP_QUARKUS_OIDC_CLIENT_IDclient ID as configured in the OIDC server.DAMAP_AUTH_SCOPEscopes to request from the OIDC server.DAMAP_AUTH_USER_ROLES_CLAIM_PATHclaim path in the token that will hold the user rolesDAMAP_AUTH_USER_ID_CLAIMOIDC claim to use as a user IDDAMAP_AUTH_NAME_CLAIMOIDC claim that holds the full user nameDAMAP_AUTH_GIVEN_NAME_CLAIMOIDC claim that holds the users given nameDAMAP_AUTH_FAMILY_NAME_CLAIMOIDC claim that holds the users family nameDAMAP_AUTH_EMAIL_CLAIMOIDC claim that holds the users mailDAMAP_AUTH_AFFILIATIONS_CLAIMThe OIDC claim that holds the users affiliations (only for multitenant setup)DAMAP_AUTH_ADMIN_ROLE_NAMEThe OIDC claim that holds the users privileges
You can find a reference of all available configuration options in the Configuration and CRIS System Integration sections.
For kubernetes based deployments, please view our Helm chart.
Deploying with multitenancy¶
DAMAP offers the possibility to be set up as a multitenant capable application - meaning like a house that gets rented out to multiple tenants, one instance can serve multiple universities. This makes it highly efficient to onboard new universities, as existing infrastructure can simply be reused. We advise to only use multitenancy in Kubernetes based deployments, as they offer better scalability and maintainability than dockerized or baremetal deplyoments. In addition, we also provide a Helm chart, which makes deployment of DAMAP as a multitenant capable application easier by automating certain aspects.
To activate multitenant mode, set the DAMAP_QUARKUS_PROFILE environment variable to multitenant,prod.
For all other steps needed to configure multitenancy, refer to the multitenancy documentation.
Deploying with a read-only filesystem¶
DAMAP uses Quarkus re-augmentation to switch database engines, which requires write permissions to the underlying filesystem. If you would like to deploy using a read-only filesystem, or with a user ID without permissions to write the filesystem (e.g. in OpenShift), you need to perform the following steps:
- Deploy DAMAP with PostgreSQL or recompile the DAMAP backend with your database engine
- Create a file named /quarkus-app/.db_kind containing the word
postgresql(or your database engine) inside the container. You can do this using a mount point from the outside or as aConfigMap/Secretin Kubernetes.
Warning
Simply switching the database engine in the environment variables will not work with a read-only filesystem as parts of the code need to be recompiled!