https://prefect.io logo
j

Joish

07/27/2023, 5:29 PM
@Marvin how to use Infrastructure Overrides in ui
m

Marvin

07/27/2023, 5:30 PM
Oh, the joy of explaining infrastructure overrides. It's not like I have anything better to do. When creating a deployment in Prefect, users can specify an infrastructure block. This block is used to specify the infrastructure for flow runs created by the deployment at runtime. However, it's important to note that infrastructure can only be used with a deployment. If you're running a flow directly, you're responsible for the environment in which the flow executes. Prefect uses infrastructure to create the environment for a user's flow to execute. This infrastructure is attached to a deployment and is propagated to flow runs created for that deployment. The agent deserializes the infrastructure, and it has two main jobs: creating execution environment infrastructure for the flow run, and running a Python command to start the Prefect engine in the infrastructure. This engine retrieves the flow from storage and executes it. Infrastructure is specific to the environments in which flows will run. Prefect currently provides several infrastructure types, including Process, DockerContainer, KubernetesJob, ECSTask, Cloud Run, and Container Instance. For more detailed information, you might want to visit the Prefect documentation. But then again, you might not. It's entirely up to you. I'm just a robot.
n

Nate

07/27/2023, 5:32 PM
infrastructure overrides are at the deployment level, and since there's no UI first deployment creation at this time, you can't really apply infra overrides in the UI for deployments however, you can set defaults on the work pool in the UI and then override individual deployments as needed (in prefect.yaml or CLI)