Here's a concise guide on best practices for organ...
# ask-marvin
m
Here's a concise guide on best practices for organizing your Prefect workflows and integrating with CI/CD, particularly as you transition to Prefect Cloud: 1. Mono-Repo Structure: Organizing workflows in a mono-repo is a valid approach. Prefect supports Docker-based storage, which aligns with your preference to package flow code into Docker containers during the build step. This can simplify version control and dependency management. Read more about flow code storage. 2. Code-Based Deployments: Prefect 3.x encourages code-based deployments, which can be managed directly through your CI/CD pipeline. This avoids the need for
prefect.yaml
files, offering a more programmatic approach to deployment. You can use Prefect's deployment features combined with CI/CD tools like GitHub Actions to automate deployment processes. Explore CI/CD integration. 3. Environment Setup: Prefect supports environment-specific configurations. You can use settings to customize behavior across different environments (local, dev, prod) without altering workflow code. This involves using different settings profiles for each environment to control things like logging levels and database connections. Learn about environment-specific settings. 4. Work Pools and Workers: In Prefect 3.x, agents are replaced by workers, and work pools replace infrastructure blocks. You can create Docker hybrid work pools for different environments to dynamically provision infrastructure. Create work pools. 5. Common Gotchas: Be aware that Prefect 3.x has notable changes from 2.x, such as the replacement of agents with workers and the introduction of work pools. Ensure your team is familiar with these changes to avoid confusion. Review common 3.x gotchas. By following these guidelines, you can streamline the introduction of Prefect to your team and enhance your CI/CD integration.