Page tree
Skip to end of metadata
Go to start of metadata

Historical Datastore is configured using a JSON configuration file, path to which is provided to the executable via -conf flag.


Configuration File

{
  "serviceID": "",
  "http": {
    "publicEndpoint": "http://public-endpoint",
    "bindAddr": "0.0.0.0",
    "bindPort": 8085
  },
  "web": {
    "bindAddr": "0.0.0.0",
    "bindPort": 4000,
    "staticDir": "../web"
  },
  "registry": {
    "backend": {
      "type": "leveldb",
      "dsn": "/data/hds-registry"
    },
    "retentionPeriods": ["1h", "1w"]
  },
  "data": {
    "backend": {
      "type": "influxdb",
      "dsn": "http://user:password@influxdb-hostname:8086/hds"
    },
    "autoRegistration": false
  },
  "serviceCatalogs": [],
  "auth": {}
}

where

  • http is the configuration object for the http server
    • publicEndpoint is the URL of the gateway protocol://fqdn:port, which must be accessible in the deployment environment
    • bindAddr is the bind address for the service
    • bindPort is the tcp port for the service
  • web is the configuration object for the GUI web-server
    • bindAddr is the bind address for the Web GUI
    • bindPort is the tcp port for the Web GUI
    • staticDir is the directory where Web GUI source files are located
  • registry.backend is the configuration object for the backend of Registry API
    • type is the registry backend type: Supported backends are memoryleveldb
    • dsn is the Data Source Name for storage backend, the location where persistent data is stored (ignored for memory, absolute or relative path for leveldb)
  • registry.retentionPeriods is the list of accepted retention periods
  • data.backend is the configuration object for the backend of Data API
    • data.backend.type is the data backend type: Supported backend(s) are influxdbmongodb
    • data.backend.dsn is the Data Source Name for storage backend
  • data.autoRegistration enables implicit registration of data sources into the registry when a new data point is submitted.

Sample configuration file: historical-datastore.json

Service Catalog

The serviceCatalogs field configures Service Catalogs:

  "serviceCatalogs": [
    {
      "discover": false,
      "endpoint": "http://localhost:8082/sc",
      "ttl": 60
    }
  ]

where

  • serviceCatalog is an array of Service Catalogs. The Historical Datastore will be published as a service to each configured Service Catalog (if not empty)
    • discover is a flag enabling automatic discovery of the Service Catalog using DNS-SD
    • endpoint is the URL of the remote Service Catalog API (http://address:port/path)
    • ttl is the TTL for the service registration

Registration to a service catalog with authentication is explained below.

Authentication

The auth field configures the Authentication for Historical Datastore:

    "auth": {
        "enabled": "bool",
        "provider": "string",
        "providerURL": "string",
        "serviceID": "string",
        "basicEnabled": "bool",
        "authorization": {}
    }
where
  • enabled is a boolean flag enabling/disabling the authentication
  • provider is the name of a supported auth provider
  • providerURL is the URL of the auth provider endpoint
  • serviceID is the ID of the service in the authentication provider (used for validating auth tokens provided by the clients)
  • basicEnabled is a boolean flag enabling/disabling the Basic Authentication
  • authorization - optional, see authorization configuation

To publish the Historical Datastore to an authenticated Service Catalog, the auth field of that catalog should be set:

    "serviceCatalog": [
        {
            "discover": "bool",
            "endpoint": "string",
            "ttl": "int",
            "auth": {
                "provider": "string",
                "providerURL": "string",
                "username": "string",
                "password": "string",
                "serviceID": "string"
            }
        }
    ]
where
  • provider and providerURL are the authentication configurations used by that Service Catalog
  • username and password are the authentication credentials for accessing that Service Catalog
  • serviceID is the ID of that Service Catalog in the authentication provider

Sample configuration file (with authentication): historical-datastore-auth.json

  • No labels