Installation Guide
Prerequisites
- Install Microsoft SQL Server ODBC Driver 18: learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server
- Might need to install Microsoft Visual C++ Redistributable in order to install Microsoft SQL Server ODBC Driver: learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
- The Bliksund Analytics Data Processing artifacts are downloaded for deployment
Installation
-
If you already have a Analytics API service running, make sure to stop this by following Stopping the service.
-
Store the exe-file that you downloaded at the place where you want the installation to take place.
-
Open a terminal (for example powershell) in administrator mode.
-
Navigate to the folder where the exe-file is stored:
cd <PATH_TO_EXE_FILE>
-
Add and update needed configurations
Create a file named .env in the same folder as the exe-file and add the following infromation to it:
LOGGING__LEVEL=INFO
LOGGING__SENTRY__ENABLED=False #Not used for on-prem
LOGGING__SENTRY__DSN="" #Not used for on-prem
APP__ROOT_PATH=/main/analytics #Do not change
AUTHENTICATION__API_KEY= #Select your own API key
AUTHENTICATION__API_KEY_HEADER=BLIKSUND-X-API-KEY
# Database connection details (Analytics database)
DATABASE__TYPE=mssql
DATABASE__USERNAME=
DATABASE__PASSWORD=
DATABASE__HOST=
DATABASE__PORT=1433
DATABASE__NAME=
DATABASE__SCHEMAS__EWA_GOLD_LAYER=ewa_core -
Install the service:
.\analytics_service.exe install
Note: A log file (Logging) will be created and placed at the same location as the .exe file during the installation
-
Start the service:
.\analytics_service.exe start
Configuration options
The service can be configured with the following options:
Setting Name | Description | default value |
---|---|---|
AUTHENTICATION__API_KEY | Port for source database | (empty) |
AUTHENTICATION__API_KEY_HEADER | Name of source database | (empty) |
DATABASE__TYPE | Type of target database | (empty) |
DATABASE__USERNAME | Username for target database | (empty) |
DATABASE__PASSWORD | Password for target database | (empty) |
DATABASE__HOST | Host for target database | (empty) |
DATABASE__PORT | Port for target database | (empty) |
DATABASE__NAME | Name of target database | (empty) |
Logging
Logs are placed in bliksund_analytics.log
, and if you are running the code as a windows service, the log file will be placed in the same folder as analytics_service.exe
.
Stopping the service
Follow this guide if you want to stop an already running service
-
Open a terminal (for example powershell) in administrator mode
-
Navigate to the folder where the old exe-file is stored:
cd <PATH_TO_EXE_FILE>
-
Stop the service:
.\analytics_service.exe stop