nvflare.lighter.provisioner module

class Provisioner(root_dir: str, builders: List[Builder])[source]

Bases: object

Workflow class that drive the provision process.

Provisioner’s tasks:

  • Maintain the provision workspace folder structure;

  • Invoke Builders to generate the content of each startup kit

ROOT_WORKSPACE Folder Structure:

root_workspace_dir_name: this is the root of the workspace
    project_dir_name: the root dir of the project, could be named after the project
        resources: stores resource files (templates, configs, etc.) of the Provisioner and Builders
        prod: stores the current set of startup kits (production)
            participate_dir: stores content files generated by builders
        wip: stores the set of startup kits to be created (WIP)
            participate_dir: stores content files generated by builders
        state: stores the persistent state of the Builders
Parameters:
  • root_dir (str) – the directory path to hold all generated or intermediate folders

  • builders (List[Builder]) – all builders that will be called to build the content

add_template(template: dict)[source]
provision(project: Project, mode=None)[source]