This basic example is designed to show you how to create multiple deployments from a single project.
Video explanation here:
GitHub repository with flow code used here:
Connect to Prefect Cloud or a running Prefect server instance.
To create the deployments:
- Clone the repo linked above and
cd
into it. - Run
prefect project init
- Edit the deployment.yaml file to match this:
deployments:
- name: buy_deployment
entrypoint: buy.py:buy
work_pool:
name: local-work
- name: sell_deployment
entrypoint: sell.py:sell
work_pool:
name: local-work
prefect deploy --all
You should now have deployments on the server!
Start a worker polling from the local-work
work pool and run your deployment.