Skip to main content

identity

Who a compute is.

The compute's identity is the installation's, not any pod's or dataset's (ADR 0011): the installation id the hub keys its compute record on, plus the owner and the compute's name, which locate its keys and cache on disk.

Classes​

ComputeIdentity​

class ComputeIdentity(username: str, name: str, cluster_id: str | None = None):

The compute's identity and where its files live.

Arguments

  • username: The Bitfount user the compute belongs to.
  • name: The name this compute is known by on the message service and stores its files under. Today it is the pod configuration's name, a legacy of when a compute ran exactly one dataset; on the desktop it is derived from the installation id.
  • cluster_id: The compute cluster to register under, if known. May be None when authenticating with a compute API key, whose cluster the hub uses.

Variables​

  • static cluster_id : str | None
  • static name : str
  • static username : str
  • instance_id : str - The installation id the hub keys this compute's record on.

    Written to disk once per installation and stable across restarts, so the compute keeps its id and domain however often its children come and go.

  • key_directory : pathlib.Path - Where the compute's key pair, TLS key file and certificate live.

    The pods segment is a misnomer kept for compatibility with existing installations: the directory belongs to the compute, and holds files shared by every dataset it serves (see ADR 0011, accepted risks).

  • private_key_path : pathlib.Path - The compute's RSA private key file, also used to decrypt its cache.