Slackbot
02/05/2024, 1:08 PMMarvin
02/05/2024, 1:08 PMdeployment.yaml
file before applying the deployment via the Prefect CLI:
yaml
# deployment.yaml
version: 2
type: DeploymentSpec
metadata:
name: my-flow-deployment
tags:
- "example"
spec:
name: my-flow
flow_location: my_flow.py
parameters: # <--- This is where you define your parameters
parameter1: value1
parameter2: value2
...
Once you have configured your deployment.yaml
with the desired parameters, you can create the deployment on the Prefect API by running the prefect deployment apply <deployment-file.yaml>
command. Optionally, you can use the --upload
flag with this command if you want to upload the deployment's files to remote storage.
For ad-hoc runs with custom parameter values that differ from the defaults specified in the deployment, use the UI or CLI to specify custom values for the flow run.
Here is how you would apply the deployment using Prefect CLI:
shell
$ prefect deployment apply my-flow-deployment.yaml
You can refer to the documentation for block-based deployments for more detailed instructions.