Hey folks, we've been playing around with Prefect ...
# prefect-community
j
Hey folks, we've been playing around with Prefect 2.0.4 and got a question related to deployments with storage blocks, is the expectation that the deployment files are built per environment that exist? Our thought was that we would create the deployment yaml once and apply the same yaml between dev, preprod, and prod environments which are all separate instances. The problem we're running into is that when we generate the storage block (remote file system using minio) the storage block ids are different between our environments, so when we attempt to apply the deployment yaml via CLI it fails because the yaml file references the storage block id of the environment that the build command was executed on
1
To add to this, I just realized the deployment yaml contains the endpoint url for our minio bucket which also has different urls between dev, preprod, and prod
o
Yep, you should build a deployment file per environment. In my team we don't even keep the deployment files in source control, we view them as more of an intermediate stage/temporary file in the build process. Seems to be the way to go.
gratitude thank you 1
🙌 1
j
thanks @Oscar Björhn, does your team just generate the deployment files when it's time for a deployment or do you use a CI/CD pipeline to facilitate the auto generation of the deployment files?
o
Right now we're just using our own cli python program to handle it. We run it with something like "cli.py register prod flow-name" and it handles everything for us: builds a docker image, builds a deployment, creates a storage block and finally applies the deployment. We're deploying our first proper CI/CD pipelines in the next weeks, not sure if we'll switch to a more pure/traditional setup or if we'll keep using our custom python cli, I suppose either would work.
So to answer your question: The former, I suppose. But working toward the latter. 🙂