datamongus
06/28/2025, 6:08 PMMarvin
06/28/2025, 6:08 PMMarvin
06/28/2025, 6:09 PMprefect.yaml
configuration for a shell serve deployment. Here's a properly structured configuration:
yaml
# prefect.yaml
version: 0.0.1
name: my-shell-deployment
deployments:
- name: shell-serve
version: 1
tags: ["shell"]
description: "Shell serve deployment example"
schedule: null # or use a cron expression like "0 0 * * *"
flow_name: my_shell_flow
entrypoint: my_flow.py:my_shell_flow
parameters: {}
work_pool:
name: my-shell-pool
work_queue_name: default
job_variables:
command: "python -m prefect.engine serve"
Key components to note:
1. Version and Name: These identify your project
2. Deployments: A list of deployment configurations
3. Work Pool: Specifies the execution environment
- Must be configured as a shell work pool
- The command
under job_variables
specifies the shell command to run
To use this configuration:
1. First, create a shell work pool:
bash
prefect work-pool create my-shell-pool --type shell
2. Save the configuration as prefect.yaml
3. Deploy using:
bash
prefect deploy
You can customize this configuration by:
- Adding schedules using cron expressions
- Including additional tags
- Specifying parameters for your flow
- Adding environment variables under job_variables
Remember that the entrypoint
should point to your actual flow file and function. The path is relative to the location of your prefect.yaml
file.
For more detailed configuration options, you can refer to the Prefect deployment configuration documentation.