<@ULVA73B9P> for deployments that are configured v...
# ask-marvin
m
@Marvin for deployments that are configured via prefect.yaml. what is the recommeded way to delete a deployment?
m
The documentation doesn't explicitly mention the recommended way to delete a deployment that is configured via
prefect.yaml
. However, generally speaking, to manage deployments, you might use Prefect CLI commands to create, update, or delete deployments. For deleting, if a CLI command exists (such as
prefect deployment delete
), you would use the deployment name specified in
prefect.yaml
to delete the specific deployment. You would also likely remove the configuration block from your
prefect.yaml
to keep the source of truth up to date as well. Since I don't have the specific command at hand, you can refer to the Prefect Deployment Documentation for further information on managing deployments. It may be helpful to also look at the Prefect CLI help (
prefect help
) for any specific commands related to deployment deletion. If the command or process has been updated in newer versions of Prefect, it's always best to consult the latest docs or Prefect community for the current best practices.
m
@Marvin so there is no way to have a kind of gitops approach to the deployment of flows?
m
Prefect does support a GitOps approach to flow deployment, where your flows and their configurations can be stored and version-controlled using Git-based version control platforms, such as GitHub, GitLab, or Bitbucket. This is part of their Git-based storage option, which allows for redundancy, version control, and easier collaboration. You can create a deployment from the root directory of the git repository using the Prefect CLI (
prefect deploy
) and configure it to use the git repository for storage. Workers will need access to the flow's code, which is facilitated through this Git-based storage configuration. Each time you push changes to your repository, you can have CI/CD pipelines that automatically update or create deployments, enabling you to manage Prefect deployments with a version-controlled approach. For specific instructions on setting up Git-based storage with Prefect and creating a deployment utilizing this method, please refer to the Git-based storage documentation. Additionally, Prefect's design to create platforms can cater to platform teams seeking to create a custom platform that incorporates infrastructure and access requirements. This capability allows for defining opinionated infrastructure patterns and controlling who uses what infrastructure, potentially through RBAC and deployments. For more advanced CI/CD processes, you might be interested in looking at detailed examples and best practices, which you can find in the CI/CD integration guide.