Hi, I have a prefect-orion 2.50. prefect-agent 2.5...
# prefect-community
l
Hi, I have a prefect-orion 2.50. prefect-agent 2.5.0 and MinIO running on openshift. I have written a simple .py to create a deployment. The files are uploaded to minio and the script returns me a deployment ID but it doesnt seem to be registered on the server: the UI deployment panel is still blank. Any idea how to debug ? I’ve been trying for hours but couldnt solve it. thanks
2
z
👋 Have you set your
PREFECT_API_URL
to the server’s IP? (including port and
/api
)
You also need to set the
PREFECT_ORION_UI_API_URL
to your server’s IP on the server so that the UI directs client traffic to the correct API.
l
it seems that
os.environ['PREFECT_API_URL']=…
was not enough
i had to use the CLI
prefect config set PREFECT_API_URL=…
and it worked…
👍 1
z
We don’t load settings from environment variables after import (generally) because we need to isolate settings at a more granular level than that.
👍 2
p
Hello. Raising this thread from the dead. 🧟‍♂️ - had to resort to this same solution - this is not great because I wanted to write tests where the deployments get tested with S3 locally but then the final placement changes.
z
I’m a little confused by the problem here. Can you not set an environment variable before the script is run or use a different profile or use our
temporary_settings
context manager?
🙌 1
p
why yes sir;
Copy code
with prefect.settings.temporary_settings(updates={prefect.settings.PREFECT_API_URL: '<http://localhost:4200/api/'}>):
would be the Perfect solution
why this was not suggested to the previous person I don't know. would have done that.