Skip to main content

Installation Guide

Prerequisites

Installation

  1. If you already have a Analytics API service running, make sure to stop this by following Stopping the service.

  2. Store the exe-file that you downloaded at the place where you want the installation to take place.

  3. Open a terminal (for example powershell) in administrator mode.

  4. Navigate to the folder where the exe-file is stored:

    cd <PATH_TO_EXE_FILE>
  5. 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
  6. 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

  7. Start the service:

    .\analytics_service.exe start

Configuration options

The service can be configured with the following options:

Setting NameDescriptiondefault value
AUTHENTICATION__API_KEYPort for source database(empty)
AUTHENTICATION__API_KEY_HEADERName of source database(empty)
DATABASE__TYPEType of target database(empty)
DATABASE__USERNAMEUsername for target database(empty)
DATABASE__PASSWORDPassword for target database(empty)
DATABASE__HOSTHost for target database(empty)
DATABASE__PORTPort for target database(empty)
DATABASE__NAMEName 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

  1. Open a terminal (for example powershell) in administrator mode

  2. Navigate to the folder where the old exe-file is stored:

    cd <PATH_TO_EXE_FILE>
  3. Stop the service:

    .\analytics_service.exe stop