Q: if i successfully run a Flow/Task locally and now wanted to run the same flow/task in another remote cluster and I "register" the Flow/task with the Prefect server, its my understanding that only the Flow/Task DAG metadata got serialized to the Prefect Server/Database. My question is how does the full complement of the Flow/Task code and its third-party dependency libraries got deployed or loaded in the remote cluster? Am I missing something here? Who is the deploying the code to the remote cluster??
01/16/2021, 12:36 AM
Hi @BK Lau - you’re correct that the Server never received your flow’s code, only the metadata. the Agent you deploy to poll the API is responsible for retrieving and deploying your flow from your configured storage method to your configured execution environment.
01/16/2021, 12:39 AM
@nicholas so that Flow/Task must be commited to a storage like
and made available to the Agent? Is there an Agent on every compute/worker node or just one Agent?
01/16/2021, 12:40 AM
Just 1 agent @BK Lau - you don’t need to use storage so long as the code lives on the same filesystem as the agent.
(By not using storage your flow defaults to LocalStorage)
01/16/2021, 12:43 AM
@nicholas Does the metadata passed to Prefect Server includes the location, the Agent should get the Flow code from??