this local agent runs on Render on a web service. ...
# prefect-community
y
this local agent runs on Render on a web service. Maybe I need to open some ports? or install it on a different type of service in Render? On the other hand if you look at the logs above it dose say “Agent started! Looking for work from queue(s): work-queue...” meaning it might succeeded contacting the Prefect Cloud.
r
Hi, Yaron! What kind of Render service are you running the agent in? I believe a background worker would be the best fit. You shouldn't need to open any ports because the agent doesn't receive inbound connections. Render will shut down some of the other service types quite quickly if they aren't receiving any inbound connections - so if you're running the Agent in a Render web service, for example, perhaps it got shut down before you tried to run a flow on it? That's the first thing that comes to mind, at least. I'm happy to assist further if needed!
Taking a closer look, I see in the screenshot that it's a web service. If possible, I'd try running it as a background worker.
y
@Ryan Peden sure thanks! I'll try it and report.
y
@Ryan Peden ok I am making progress.
The agent starts working but fails because it tries to run a path which is my local computer
my yaml file is:
it was generated by calling:
prefect deployment build basic_flow.py:basic_flow --name test
I didn’t edited anything below the “DO NOT EDIT BELOW THIS LINE”
r
Ok, that is definitely good progress! The reason this is happening is that if you want to run an agent in the cloud like this, you'll need to use remote storage like S3. That's Prefect Cloud's hybrid model at work. The idea is that your code is more secure because it stays in infrastructure you control. I might be making it sound more complicated than it actually is. If what I wrote above doesn't make sense I can try to find or write some sample code to demonstrate.
y
ok… I think I understand. Can’t the agent access the code that was deployed to Render, sitting next to it?
or from other remote git repo?
ok got it (-: in Prefect 2.0 the only way is via S3