Hey all - I have 2 prefect agents (1 on ECS, 1 on an EC2). I want a deployment to run on the ECS task after the EC2 flow finishes (orchestrator pattern)
From my googling, it seems that there are two options:
• use an automation (limited to 3 per workspace)
• Use a custom script (like here)
Has anyone come across a simpler, more scalable way to do this? I'm hoping to avoid adding a bunch of code to my flows just to make a handoff between infras, if possible
✅ 1
t
Taylor Curran
05/15/2023, 7:23 PM
Hi Zachary, we’ve actually come a long way since that discourse article was written:
Now you can call run_deployment to kick off deployments as a result of any kind of python logic.
You can call run_deployment from outside or inside of a task or flow.
thank you 1
Taylor Curran
05/15/2023, 7:25 PM
I could see something like this working:
Copy code
@flow
def my_parent_flow():
a = run_deployment("ecs-deployment")
if a.state() == "Completed":
run_deployment("ec2-deployment")
Taylor Curran
05/15/2023, 7:26 PM
Automations are good for setting global automations rules that you want applied across your workspace.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.