https://prefect.io logo
Title
b

Bebeto Nyamwamu

10/18/2022, 4:12 AM
Hello, What is the best practice when establishing prefect on the cloud? Should it run in a cloud instance or in a docker container in a cloud instance?
1
j

Jeff Hale

10/18/2022, 11:58 AM
I’m not sure I understand your question, Bebeto. A Docker container is not necessary, but Docker has some conveniences and complexities. Are you trying to run Prefect 2 flows in AWS or another cloud provider?
m

Michael Shoemaker

10/18/2022, 2:53 PM
Not to piggy back on this, but I'm curious as well. Say I want to create a VM on GCP and run Prefect there. Is there a good docker-compose example or other resources which show how one would go about this?
j

Jeff Hale

10/18/2022, 7:52 PM
Hi Michael. You could just install conda into your GCP Compute Engine instance and put your agent there and run flows. The prefect-gcp collection has some conveniences. You can put your flow code in a GCP Cloud Storage bucket - Prefect 2 ships with that - you just need to install
gcsfs
. This Prefect tutorial walks through storage and infrastructure. If you want to see an example that uses Docker Compose - but not on GCP - here’s a guide.
:party-parrot: 1
:thank-you: 1
b

Bebeto Nyamwamu

10/22/2022, 3:54 PM
@Jeff Hale I'm having this error:
[Errno 99] error while attempting to bind on address ('my-gcp compute public ip', 4200): cannot assign requested address
when I run
prefect orion start
please help
j

Jeff Hale

10/24/2022, 1:07 PM
Looks like maybe you need to enter your GCP address instead of the string
my-gcp compute public ip
b

Bebeto Nyamwamu

10/24/2022, 1:07 PM
i did but its not working
j

Jeff Hale

10/24/2022, 1:11 PM
If you can share the traceback and a minimum reproducible example that might be helpful.
b

Bebeto Nyamwamu

10/24/2022, 1:16 PM
INFO:     Started server process [234109]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
ERROR:    [Errno 99] error while attempting to bind on address ('my-gcp compute public ip', 4200): cannot assign requested address
INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.
Orion stopped!
thats the info I get after running
prefect orion start
prefect config set PREFECT_ORION_API_HOST=my-gcp compute public ip
j

Jeff Hale

10/24/2022, 1:54 PM
Sorry if I”m misunderstanding, but
my-gcp compute public ip
is just a stand in for your actual public IP - you’re using that IP address?
b

Bebeto Nyamwamu

10/24/2022, 1:55 PM
yeah, it is a place holder for the real ip. I don't think it is appropriate to share the ip here.
j

Jeff Hale

10/24/2022, 1:59 PM
Yes, that’s fine. Just couldn’t tell.
1
j

Jaafar

10/27/2022, 10:57 AM
@Jeff Hale: I am looking for a simple way to use prefect 2.0 on GCP. Is this tutorial still relevant for prefect 2.0 ? If not, could you please recommend one? Thanks!