hey team! If im using a `cloud-run` work pool to p...
# ask-community
c
hey team! If im using a
cloud-run
work pool to push flow execution to gcp cloud run- does the
PREFECT_API_URL
need to be set to anything specific? Currently, the
PREFECT_API_URL
is set to the address of the prefect server (gcp VM). How does container that gets spun up in cloud run communicate back to the server?
w
Hey @Choenden Kyirong - just to be clear, you’re on cloud right? the prefect server in this case is our hosted API at an api.prefect.cloud url, not a GCP vm url, and im pretty sure that we take care of all of that for you - how did the url become a gcp vm url?
c
hey @Will Raphaelson, i’m not on prefect cloud- self hosted server in GCP VM!
w
sorry - i saw the word “push” and thought you were using a cloud only feature “push work pools”. my bad! So you have the server and db running on a vm, and then is your worker process running in a cloud run job or service, which will spin up other cloud run jobs? I think that all you need to do is set the API URL in the worker process infrastructure to be the vm url where your prefect API is hosted. The worker will pass that into the job container and the worker and/or flow run container will communicate back to the server assuming all the networking is all good. I work more on the cloud side so I’ll tag in a colleague for review as well.
c
no problem! @Will Raphaelson I have set up a
serverless push work pool
, more specifically, the
google cloud run
push pool. At the moment, the worker is on the same vm instance as the server. I saw in the documentation for serverless push work pools that workers are not needed to poll for flow runs as well?
w
hmm, so cloud run work pools come in two flavors - cloud run push and cloud run (regular). cloud run push pools are only available via prefect cloud, where we will schedule work and push the jobs to cloud run. Can you show me a screenshot of the work pool config? Feel free to DM me as well if its anything sensitive.
🙌 1