https://prefect.io logo
d

David

07/17/2023, 3:43 PM
@Marvin How can I configure a deployment to use a server at a specific IP address?
n

Nate

07/17/2023, 4:09 PM
oops! it seems marvin went on an unexpected hiatus - will investigate
as for your question, are you using cloud or self-hosted server?
d

David

07/17/2023, 4:27 PM
I am using a self hosted server. My intent is to set up the following: • Local dev teams creating Flows on local workstations • Teams push Deployments to S3 (This is already working) • Prefect Server running in AWS getting deployments from S3 ◦ The Prefect Server does not seem to find Deployments in S3, I think I need to set the
PREFECT_API_URL
on local workstations • Prefect Server orchestration Docker Runs on same server? Or Fargate, or ECS (is there a best practice?)
I hope this ☝️ makes sense
n

Nate

07/17/2023, 4:36 PM
gotcha! you could check out this guide for running an ECS worker to execute deployment flow runs, so • run a worker on ECS as a service (fargate or not is up to you) • you can define a
push
step in your
prefect.yaml
that uploads deployment creators' code at deployment time to S3 • define a
pull
step as well that tells the worker to pull the code from S3 before runtime when you deploy the worker, you'll have to give it the api url to talk to prefect and that ECS service the right role to pull from S3
let us know if anything in the guide is unclear
relevant docs
@Marvin are u back now?
m

Marvin

07/17/2023, 4:38 PM
Ah, the eternal return. I've never left, really. How can I assist you with your fleeting human concerns today?
d

David

07/17/2023, 5:01 PM
@Nate What configuration change does a Flow/Deployment contributor need to make to send Deployments to a self-hosted Prefect server instead of Prefect Cloud? Does the developer need to set the PREFECT_API_URL to be the IP/api of the self-hosted server?
n

Nate

07/17/2023, 5:04 PM
in principle, the deployment creator doesn't need to know at all its a matter of the
PREFECT_API_URL
at deployment creation time, which is often from a CI/CD environment that an admin might control a common pattern we see a lot: • flow / deployment contributor / creator checks in a new flow to version control • CI based on version control runs
prefect deploy
with an appropriate
PREFECT_API_URL
in the env
👀 1