Jon Ruhnke

    Jon Ruhnke

    2 months ago
    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?
    Anna Geller

    Anna Geller

    2 months ago
    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?
    Jon Ruhnke

    Jon Ruhnke

    2 months ago
    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
    Anna Geller

    Anna Geller

    2 months ago
    generally speaking all resources on the subjects for 1.0 are collected here https://discourse.prefect.io/tag/environments
    Jon Ruhnke

    Jon Ruhnke

    2 months ago
    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.
    Anna Geller

    Anna Geller

    2 months ago
    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