Adam
06/24/2024, 2:01 PMMarvin
06/24/2024, 2:01 PMbash
az container create \
--name <your-work-pool-name> \
--resource-group <your-resource-group-name> \
--assign-identity <your-identity-id> \
--image "prefecthq/prefect:2-python3.11" \
--secure-environment-variables PREFECT_API_URL=<PREFECT_API_URL_HERE> PREFECT_API_KEY=<PREFECT_API_KEY_HERE> \
--command-line "/bin/bash -c 'while true; do sleep 30; done'"
3. Using Docker-in-Docker:
- When defining your worker, ensure the Docker daemon runs inside the container. You can use the official Docker-in-Docker (DinD) image as a base for this.
- Modify your Docker image to include docker:dind
, set up Docker within Docker as described in the Docker Hub Docker-in-Docker documentation.
4. Set Up Workflows:
- Define your Prefect flows and deployments to be executed within this Docker-in-Docker setup by creating a work pool that references the setup.
- Schedule flows to run by starting the worker instance in your chosen serverless infrastructure.
以下是相关Prefect文档的链接:
- Serverless Workers Guide
- ACI Worker Integration
For more examples and deeper steps:
- A tale of two docker tutorials
- Guide to Workers and Work Pools
To learn about creating deployments and scheduling them in serverless environments, refer to the following documents.Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by