I’ve found that the easiest way to deploy an agent on a GCP VM is the following:
gcloud compute instances create-with-container prefect-agent \
--container-image prefecthq/prefect:2-python3.8 \
--container-mount-host-path=host-path=/var/run/docker.sock,mount-path=/var/run/docker.sock,mode=rw \
--container-privileged \
--container-env PREFECT_API_URL=${PREFECT_API_URL} \
--container-env PREFECT_API_KEY=${PREFECT_API_KEY} \
--container-command="prefect" \
--container-arg="agent" \
--container-arg="start" \
--container-arg="-q" \
--container-arg="YOUR-WORK-QUEUE" \
--container-restart-policy='always' \
--boot-disk-size="100Gi" \
--machine-type="e2-micro" \
--zone="europe-west4-a"
2 Likes
very cool! thanks so much for sharing
The link mentioned earlier on Azure VM doesn’t seem to work.
Is there a publicly accessible link on how to setup a Prefect agent to run on Azure VM?
1 Like
This link also appears to be broken, sorry, returning a 404 error