Trever Mock

08/24/2020, 1:15 PM
Good morning! I had a quick question on registering flows. I'm trying to figure out the best way for our team to deploy our Prefect workflows in production. From what I can tell, I've seen two ways: 1 - flow.register() in Python 2- export flow to JSON and import using graphql For option 1, we have a unique situation where we can't run Python command in our production environment. For option 2, some of the docker storage info changes from development to production which means we have to edit the JSON files. So, hopefully a simple question - are there other/better ways to package a workflow for deployment that I might be missing? I can run Python commands in development, but just not in production.

Kyle Moon-Wright

08/24/2020, 3:45 PM
Hey @Trever Mock, This is tough, seems like you'll need to compromise one way or another given your circumstances. Editing your JSON and registering via
mutation may be your best option if you are not able to register from the Core Client in your production environment. Hopefully others have some insight to share on their practices.
:upvote: 2

Trever Mock

08/24/2020, 3:53 PM
Thanks for the reply @Kyle Moon-Wright! The JSON way should work as our last resort, it's just a bit harder to automate. Just wanted to make sure I wasn't missing a better way to do this. Thanks again!