Service responsible for saving a data source mapping and generating the corresponding R2RML / RML mapping file.
The application must be run as a Docker container. The Dockerfile is located in the docker
directory. It is a python image with the necessary dependencies to run the application.
The application runs on port 8080 and is executed by the user mapper
.
Check that openssl is installed:
openssl version
If not, install it:
-
Linux
sudo apt install openssl
-
macOS
brew install openssl
-
Windows
-
Download and install the .exe file Win32/Win64 OpenSSL Light version from https://slproweb.com/products/Win32OpenSSL.html
-
Add the path to the OpenSSL installation, for instance C:\Program Files\OpenSSL-Win64\bin, to the PATH environment variable.
-
Verify that the installation was successful by running the command openssl version
and generate a secret key to encrypt and decrypt the passwords of the data sources:
openssl enc -aes-128-cbc -k secret -P -md sha1
Replace in application.yaml cipher-key with generated value.
Build the image using the following command:
docker build -f docker/Dockerfile --tag com.inesdata-map/mapper-backend .
The image requires the following environment variables:
SPRING_DATASOURCE_URL
: URL of the database to be used by the application.SPRING_DATASOURCE_USERNAME
: Username to access the database.SPRING_DATASOURCE_PASSWORD
: Password to access the database.APP_DATAPROCESSINGPATH
: Path to the directory where the data source files and mapping outputs will be stored. It must be a directory with write permissions (for example, the home folder).APP_CIPHERKEY
: Secret key used to encrypt and decrypt the passwords of the data sources.
A volume is needed to store the datasource's files. It is important that it is mounted into the same directory as defined on the environment variable APP_DATAPROCESSINGPATH
.
For starting a container, run the following command:
docker run --name mapper-backend -p 8080:8080 -d --env-file ./docker/env.list -v $(pwd)/inesdata-map-data:/home/mapper/data -d com.inesdata-map/mapper-backend:latest