RMI-PACTA / factset_data_loader

Setting up a container-based workflow to run FactSet DataFeed Loader
MIT License
0 stars 0 forks source link

FactSet Data Loader

Prerequisites

NOTE: This container is targeting FDSLoader64 version 2.13.6.0

Environment Variables (envvars)

Environment variable control the behavior of this container. During local development, these can are via .env which docker-compose reads, or set as part of azure-deploy.json for cloud deployments.

Acquiring Loader Binaries

In the FactSet Resource Library, find the resource titled "DataFeed Loader for Linux". Note that this resource requires you to log in with your FactSet ID before downloading.

You may also find it useful to have a copy of the DataFeed Loader User Guide and DataFeed Loader resources (also require login before downloading)

Generating key

Create key at: https://auth-setup.factset.com/ and copy contents to key.txt in the same directory as the FDSLoader64 executable.

  1. Log in to page (including MFA)
  2. Enter Serial number for account
  3. Select "PROD" radio select (not "BETA")
  4. Check "Legacy" checkbox.

Example:

KeyId: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Counter: 0000000000000000001

Place key.txt in the same directory as the FDSLoader64 executable.

Build

# login to docker registry
az acr login -n transitionmonitordockerregistry
# build image
docker build . -t transitionmonitordockerregistry.azurecr.io/factset_data_loader
# push to registry
docker push transitionmonitordockerregistry.azurecr.io/factset_data_loader:latest

Deploy

# replace these values with storage account name and resource group appropriate to your deployment
ACI_PERS_STORAGE_ACCOUNT_NAME="pactadata"
ACI_PERS_RESOURCE_GROUP="pacta-data"

STORAGE_KEY=$(az storage account keys list --resource-group "$ACI_PERS_RESOURCE_GROUP" --account-name "$ACI_PERS_STORAGE_ACCOUNT_NAME" --query "[0].value" --output tsv)
echo "$STORAGE_KEY"
# change this value as needed.
RESOURCEGROUP="myResourceGroup"

# run from repo root

az deployment group create --resource-group "$RESOURCEGROUP" --template-file azure-deploy.json --parameters @azure-deploy.parameters.json

Tailing logs

az container logs --resource-group "$RESOURCEGROUP" --name <CONTAINER GROUP NAME> --container-name loader-runner --follow

Debugging


az container exec --name "<CONTAINER GROUP NAME>" --container-name loader-runner --resource-group $RESOURCEGROUP --exec-command "/bin/bash"

To start a long-running process (to allow for attaching and debugging), add this to properties for the container:

  "command": [
    "tail", "-f", "/dev/null"
  ]