Hilary Roberts

08/16/2021, 1:44 PM
How does flow registration work in Prefect Server? We’ve been trialling prefect cloud and I have a good understanding of how registering flows with prefect cloud works. Now we also want to look at hosting our own instance of prefect server to get a good comparison. I have a prefect server instance set up on an AWS EKS cluster, and am wondering what the best way is to deploy flows to it. Is there a way to deploy a flow by running flow.register() from my local machine, as I would do if I was using Prefect cloud, or do I have to copy the flow’s code onto the machine on which I’m hosting prefect server and run flow.register() there? Can prefect user use external storage (like cloud does) or are flows always stored on the server instance? I haven’t found the answer to the above in the docs, sorry if I missed something obvious.

Sam Cook

08/16/2021, 2:00 PM
@Hilary Roberts Wherever you're registering, you need to set the
environment variable (or config option) to point to your apollo instance and run
prefect backend server
before attempting to register. You can also use whatever external storage mechanism you want since flows aren't stored on the server. You would only need to copy code over if you were using the local storage storage mechanism.
👍 1

Hilary Roberts

08/16/2021, 2:01 PM
Thank you so much! That really helps.