Mike Vanbuskirk
05/09/2022, 9:28 PMKevin Kho
05/09/2022, 10:18 PMMike Vanbuskirk
05/09/2022, 11:10 PM$ prefect foo
, where does it assume that is being run from?$ prefect backend cloud
Kevin Kho
05/09/2022, 11:13 PMMike Vanbuskirk
05/10/2022, 12:55 AM$ prefect backend cloud
Kevin Kho
05/10/2022, 12:58 AMMike Vanbuskirk
05/10/2022, 1:00 AMKevin Kho
05/10/2022, 1:04 AMprefect backend cloud
, but it’s really the default so no need, and then you can proceed. I think the needed CLI commands are are completely unavoidable are:
prefect auth login --key API_KEY
and the agent:
prefect agent local start
to startMike Vanbuskirk
05/10/2022, 1:08 AMKevin Kho
05/10/2022, 1:10 AMMike Vanbuskirk
05/10/2022, 1:10 AMKevin Kho
05/10/2022, 1:15 AMflow.run()
. When ready, they register the Flow against Cloud. In order to do so, they need to be authenticated (prefect auth login
). The registration can use the Python flow.register()
call or can use the CLI with prefect register …
. It’s up to them at that point and same outcome for the most part.
On the DevOps side you need to provision the agents to run these on. Let me show you the ECS Agent template. It authenticates using an environment variable for the API token, and the containerDefinitions
takes a command to start an agent. So spinning the agent can be done in one command.
Does that help?Mike Vanbuskirk
05/10/2022, 1:18 AMprefect agent start
correct?Kevin Kho
05/10/2022, 1:19 AMMike Vanbuskirk
05/10/2022, 1:19 AMKevin Kho
05/10/2022, 1:20 AMaws ecs create-service
which makes an ECS Service with prefect agent ecs start
as the command of the container, which creates a container for the agentMike Vanbuskirk
05/10/2022, 1:20 AMKevin Kho
05/10/2022, 1:21 AMMike Vanbuskirk
05/10/2022, 1:24 AMKevin Kho
05/10/2022, 1:24 AMMike Vanbuskirk
05/10/2022, 1:25 AMKevin Kho
05/10/2022, 1:27 AMprefect register
. See this for an idea.Mike Vanbuskirk
05/10/2022, 1:27 AMKevin Kho
05/10/2022, 1:28 AMMike Vanbuskirk
05/10/2022, 1:28 AM