To expose applications for serving, ForML uses the application inventory as a lightweight storage service used for application deployment. At runtime, the serving engine looks up the requested descriptors of published applications to facilitate their serving.
In order to provide the inventory service, particular inventory provider instance(s) need to be configured within the runtime platform setup.
Content of the inventory is populated through application publishing and can be managed using the CLI as follows (see the integrated help for full synopsis):
Inventory content listing
The inventory concept is based on the following simple API:
- class forml.io.asset.Inventory(*args, **kwargs)[source]¶
Abstract base class for application descriptor storage providers.
There is no concept of versioning - individual descriptors are held in a flat namespace requiring the uniqueness of each application
- abstract list() Iterable[str] [source]¶
List all the application names contained within the inventory.
List of application names.
- abstract get(application: str) application.Descriptor [source]¶
Retrieve the descriptor for the given application name.
Only applications returned by
list()can be requested.
forml.MissingError – If the application does not exist.
- abstract put(descriptor: application.Descriptor.Handle) None [source]¶
Store the application descriptor in the inventory.
Existing application with the same
- descriptor: application.Descriptor.Handle¶
Handle of the application descriptor to be stored.
- class forml.application.Descriptor.Handle(path: str | Path)¶
Descriptor handle referring to a module file containing the application descriptor instance.
forml.MissingError – If the path does not exist.
forml.InvalidError – If the path does not refer to a valid application descriptor.
Inventory providers can be configured within the runtime platform setup using the
The available implementations are:
Posix inventory implementation.