https://prefect.io logo
#best-practices
Title
# best-practices
j

Jon Ruhnke

07/12/2022, 4:22 PM
Hey all, I'm trying to figure out a very simple method of deploying my prefect flows to DEV and PROD environments, and not sure how to automatically point at environment-appropriate config variables based on which environment I'm deploying/running from. I've created very simple DEV and PROD BAT files to pull latest code from gitlab and update dependencies, then register the flows under an appropriate Prefect project name ("Data Pipelines" for PROD, "Data Pipelines DEV" for DEV), then I also need to somehow set a single "ENV" variable to "PROD" or "DEV" so my flows read from the appropriate variables in my configuration file when they run. My only thought so far is passing an "ENV" parameter into each flow, but not sure if that's the best practice?
a

Anna Geller

07/12/2022, 4:28 PM
1. Is it for 1.0 or 2.0? 2. Are you deploying your agents and flow storage to AWS or some other cloud/on prem?
j

Jon Ruhnke

07/12/2022, 4:29 PM
1.0 I don't understand the storage/deployment options very well yet, so I believe it's just registering to a default local location
a

Anna Geller

07/12/2022, 4:29 PM
generally speaking all resources on the subjects for 1.0 are collected here https://discourse.prefect.io/tag/environments
j

Jon Ruhnke

07/12/2022, 4:39 PM
Thanks, I'll dig through these a bit. Most of the examples I've seen so far tend to be way overcomplicated for what I need right now.
a

Anna Geller

07/12/2022, 5:35 PM
Given that 2.0 will come out of beta this summer and that it has profiles and workspaces for environment management, it may be easier to consider 2.0 before you invest too much time in building the strategy for managing environments with Prefect 1.0
6 Views