Hey Prefecters! I have created a new prefect.yaml ...
# ask-community
u
Hey Prefecters! I have created a new prefect.yaml file for deployment, but when I run prefect deploy --all it throws the following error even after I have defined work_pool.
a
Hey @UD! It looks like your work pool
my-pool
is a
prefect-agent
typed work pool.
prefect-agent
work pools aren’t compatible with
prefect deploy
. If you’d like to use
prefect deploy
, then you can create a different type of work pool for your flow to schedule runs in. If you leave
work_pool
unset in your
deployment.yaml
, the interactive CLI will help guide you through either selecting or creating a valid work pool. If you want to use a
prefect agent
work pool, then you’ll need to use
prefect deployment build
and
prefect deployment apply
in order to register your deployment.
u
Thanks a lot for your reply!! What type of
work-pool
is more preferred? Also can you specify what is the difference between
prefect deploy
&
prefect deployment build & apply
?
a
Which work pool you use depends on what type of infra structure you want to run your flow on. It’s general easiest to get started with a
process
work pool. It will run your flows in subprocesses on the same machine as your worker. The configuration between the two commands is different.
prefect deploy
allows you to configure and register multiple deployments with a single command while
prefect deployment build
and
prefect deployment apply
work with only a single deployment.
prefect deploy
is also more interactive and can help guide your to a correct setup.
👍 1