ThrillOffice service - Installation instructions

ThrillOffice image now packs a fully fledged standalone service that needs some extra context to operate properly. By design, ThrillOffice utilizes a secondary, read-only connection to ThrillPots DB in order to generate regular snapshots and detailed insights of the Jackpots' operations, storing these in its own new DB.

ThrillPots DB user

It is recommended that a separate user for Mongo DB is created on ThrillPots DB for the use of ThrillOffice. This user should have read-only permissions.

ThrillOffice DB

ThrillOffice now uses its own DB in Mongo to persist various snapshots and aggregation results.

Please note that the ENV configuration defines 2 separate DB connections - the one to service's own DB and additional one to ThrillPots DB where readPreference set to secondary.

Replicas and redundancy

A single instance of the service is sufficient.

ENV Variables

Following is the full list of ENV variables that ThrillOffice uses. Most of the exposed configuration is in line of the rest of the services, with the addition of the secondary DB connection to ThrillPots DB.

TO_WEB_HOST=0.0.0.0
TO_WEB_PORT=8088
TO_LOG_LEVEL=debug
TO_MONGO_HOST=mongodb://localhost:27017
TO_MONGO_DB_NAME=thrilloffice
TO_MONGO_USERNAME=admin
TO_MONGO_PASSWORD=admin
TO_POTS_MONGO_HOST=mongodb://localhost:27017/?readPreference=secondary
TO_POTS_MONGO_DB_NAME=thrillpots
TO_POTS_MONGO_USERNAME=admin
TO_POTS_MONGO_PASSWORD=admin
TO_THRILLID_HOST=http://localhost:9000
TO_THRILLID_USERNAME=thrilloffice
TO_THRILLID_PASSWORD=password
TO_FULL_PROXY=false

Reporting users account permissions

All Backoffice user accounts will need to be updated via the Thrill-ID API to be able to access the new ThrillOffice system. To do so you need to execute the following steps:

  • Fetch the registered users in Thrill-ID
curl '{{THRILLID_HOST}}/admin/accounts' \
--header 'Authorization: Bearer {{ADMIN_ACCOUNT_JWT}}'
  • Using the ID of the reporting user, configure the account with the following permissions
curl --request PUT '{{THRILLID_HOST}}/admin/accounts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{ADMIN_ACCOUNT_JWT}}' \
--data '{
    "id": {{REPORTING_USER_ID}},
        "permissions": [
        {
            "system_id": "thrillpots",
            "permissions": []
        },
        {
            "system_id": "thrilloffice",
            "permissions": [{
                "resource_id": "*",
                "permission": "Read"
            }]
        }
    ]
}'

Hostname configuration in DB

Once service boots it will create a services collection under the DB that its configured to use (TO_MONGO_DB_NAME in ENV). Documents in that collection will need to be edited with the hostnames of the listed services matching the environment where ThrillOffice is running. A ThrillOffice service reboot is required after the modifications.