https://prefect.io logo
Title
m

Matheus Rocha

04/26/2023, 6:35 PM
Hey everybody I'm using projects and when deploying some flow, the
deployment.yaml
file is all empty as you can see on the 🧵 Is this file supposed to be filled with some informations such as work_pool?
image.png
a

alex

04/26/2023, 7:08 PM
Yes, you can give information for creating deployments in this file or via options provided when running
prefect deploy
. This section of the docs provides an overview of the
deployment.yaml
file when using a Prefect project: https://docs.prefect.io/latest/concepts/projects/#the-deployment-yaml-file
m

Matheus Rocha

04/26/2023, 7:09 PM
Hey @alex thanks for answering me I'm running this cli command:
prefect deploy alocacao/alocacao.py:main -n alocacao-deploy  -p alocacao-work
Isn't this supposed to be enough to add the data inside deployment.yaml?
a

alex

04/26/2023, 7:11 PM
Yes, that is enough info to create a deployment, and a deployment should have been created as long as the flow and work pool referenced exist. However, those values won’t be added to
deployment.yaml
when running
prefect deploy
. Instead you would add those values yourself and commit them to source control.
m

Matheus Rocha

04/26/2023, 7:15 PM
I think I'm bit confused right now Before projects, when running the prefect deploy I would usually have this .yaml as output:
with projects, I should fill the values (name, version, work_pool etc) manually?
a

alex

04/26/2023, 7:20 PM
Yes, you should either add the values you want to your
deployment.yaml
file, or provide those values via the CLI. yYes,
m

Matheus Rocha

04/26/2023, 7:21 PM
This is the point, I'm passing the name and the work pool already via cli
prefect deploy alocacao/alocacao.py:main -n alocacao-deploy  -p alocacao-work
at least these two values didn't should be filled on the deployment.yaml? Or am I missing something?
a

alex

04/26/2023, 7:24 PM
I recommend filling them in the
deployment.yaml
file, but if you provide the deployment name and entrypoint via the CLI, nothing is required in
deployment.yaml
. The CLI options and the
deployment.yaml
file values are used together to create a deployment.