1.6 Tiled#

Tiled is a server and data management system used to store and organise experimental data through a web API. It is run as a (mostly) centralised service. The RunEngine inserts bluesky documents directly into Tiled. At the moment, NeXus files are written from the messages published on the message bus. Tiled should contain the same information that is in the NeXus files but in due course, Tiled should be the one source of truth.

Configuration#

An example configuration to enable tiled is shown in this config.yaml file.

api:
  url: http://0.0.0.0:8000
env:
  metadata:
    instrument: adsim
  sources:
    - kind: deviceManager
      module: dodal.beamlines.adsim
    - kind: planFunctions
      module: dodal.plans
    - kind: planFunctions
      module: dodal.plan_stubs.wrapped
stomp:
  enabled: true
  url: tcp://localhost:61613/
numtracker:
  url: http://localhost:8406/graphql
tiled:
  enabled: true
  url: http://localhost:8407/api/v1
  authentication:
    client_id: "tiled-writer"
    client_secret: "secret"
oidc:
  issuer: "http://localhost:8081/realms/master"
  client_id: "ixx-cli-blueapi"
  client_audience: "ixx-blueapi"
opa:
  root: "http://localhost:8181/v1/data/diamond/policy/"

The options to configure Tiled are in the TiledConfig model which can be found in the config.py file. Apart from the url, the main aspect is authentication. This is either an ApiKey:

authentication: secret-key 

or service account details:

authentication:
    client_id: "client-id"
    client_secret: "secret"
    token_url: "url"

The values in the config.yaml are the default ones use if the user doesn’t provide them.