Scott Melhop
11/22/2023, 3:36 PMKevin Grismore
11/22/2023, 3:38 PMScott Melhop
11/22/2023, 3:43 PMScott Melhop
11/22/2023, 3:43 PMprefect-server
and prefect-worker
deployed to my local cluster.Kevin Grismore
11/22/2023, 3:49 PM.deploy
you can set build=False
and push=False
and then image="my_registry/my_image:my_image_tag"
.
https://docs.prefect.io/latest/guides/prefect-deploy/?#additional-configuration-with-deploy
With prefect.yaml
and prefect deploy
you can leave build:
and push:
as null
and set the image
under your deployment's job_variables
https://docs.prefect.io/latest/guides/prefect-deploy/?#deployment-actionsScott Melhop
11/22/2023, 4:10 PMKevin Grismore
11/22/2023, 4:12 PMentrypoint
, which is a path to a python script and a flow function name, something like flows/my_flow.py:flow_func
Kevin Grismore
11/22/2023, 4:13 PMKevin Grismore
11/22/2023, 4:15 PMScott Melhop
11/22/2023, 4:18 PMScott Melhop
11/22/2023, 4:19 PMKevin Grismore
11/22/2023, 4:28 PMprefecthq/prefect:2-latest
, add dependencies and code on top of that, and let Prefect handle starting your flow via the deployment's config. You're welcome to override all this behavior or use your own image entirely if you want though.Scott Melhop
11/22/2023, 4:35 PMKevin Grismore
11/22/2023, 4:36 PMScott Melhop
11/22/2023, 4:46 PMKevin Grismore
11/22/2023, 5:09 PMjob_variables
on a deployment.Kevin Grismore
11/22/2023, 5:11 PMjob_variables
Scott Melhop
11/22/2023, 5:17 PMScott Melhop
11/24/2023, 7:25 PMprefect.yaml
file. When you look at prefect deployment apply --help
it refers to a deployment yaml file. This I learnt is not anything to do with the deployment I wanted to deploy. Instead it was prefect --no-prompt deploy --name example
I was looking for, which doesn't say anything about running against the prefect.yaml
file, so it was all a bit magic. It's also pretty counter intuitive to have to supply an entrypoint
when that isn't even an input to the standard kubernetes job template. It's a little bit annoying to have put something valid to get it to run, but mostly a little misleading IMO. I hope you like getting feedback, in general I am liking a lot about the framework, and it feels like it's moving in the right direction. This is what I ended up with, which I would have struggled to achieve with out your help, so big thanks!
name: flows
prefect-version: 2.13.8
build:
push:
pull:
deployments:
- name: example
schedule:
work_pool:
name: development
job_variables:
image: prefect-example:latest
namespace: prefect-worker
image_pull_policy: Never
work_queue_name:
entrypoint: src/examples/flow/__main__.py:get_repo_info
version:
tags: []
description:
parameters: {}
Scott Melhop
11/24/2023, 7:29 PMKevin Grismore
11/24/2023, 7:30 PMKevin Grismore
11/24/2023, 7:33 PMprefect.yaml
but that's not entirely clear without more specificity.Scott Melhop
11/24/2023, 7:34 PM