mira
12/07/2023, 10:49 AMflow.deploy(
...
image=DeploymentImage(
name=os.getenv("ECR_REPO_URL", ""),
tag=os.getenv("IMAGE_TAG"),
dockerfile=cfd / "Dockerfile",
),
...
)
But then I get the error: Flow run could not be submitted to infrastructure: An error occurred (ClientException) when calling the RegisterTaskDefinition operation: Fargate requires task definition to have execution role ARN to support ECR images.
Why do I still have to provision the deployment with an execution role, shouldn't it (or the work pool) create one? Or is it because it is a my own ECR Repo? Where do you usually push / save the flow image to run it on the ecs cluster (especially in the frame of the ecs:push work pool with infra provisioning)?
Thank you and best regards!mira
12/07/2023, 7:58 PMmira
12/08/2023, 7:07 AMmira
12/09/2023, 7:18 AMJenny
12/09/2023, 1:19 PMprefect work-pool create
with the —provision-infra
flag and the wizard should walk you through the rest.
There’s a guide here that should help: https://github.com/PrefectHQ/prefect/pull/11316/filesJenny
12/09/2023, 1:40 PMprefect deploy
CLI command can walk you through that.mira
12/09/2023, 1:58 PMJenny
12/09/2023, 2:48 PMmira
12/09/2023, 2:59 PMJenny
12/09/2023, 3:33 PMJenny
12/09/2023, 3:47 PMmira
12/11/2023, 7:37 PMFlow run could not be submitted to infrastructure: TaskFailedToStart - CannotPullContainerError: pull image manifest has been retried 5 time(s): failed to resolve ref public.ecr.aws/r1j4r6c7/prefect_ecr:my-custom-build: failed to do request: Head "<https://public.ecr.aws/v2/r1j4r6c7/prefect_ecr/manifests/my-custom-build>": dial tcp 99.83.145.10:443: i/o timeout
• pushing the image to DockerHub (public):
Flow run could not be submitted to infrastructure: TaskFailedToStart - CannotPullContainerError: pull image manifest has been retried 5 time(s): failed to resolve ref docker.io/my-user/dataflow_test:my-custom-build: failed to do request: Head "<https://registry-1.docker.io/v2/my-user/dataflow_test/manifests/my-custom-build>": dial tcp 54.227.20.253:443: i/o timeout
what do you mean by "aimed at helping users get started with our public docker images", what am I doing wrong? I think the inet gateway should be assigned, so why does it have no access? Since the infrastructure gets created by prefect, I am not aware of what I could have done wrong ...
how do you deploy your flow to the provision-infra work pool (and where do you push the image)?Derek Heyman
12/12/2023, 5:19 PMDerek Heyman
12/12/2023, 5:20 PMJenny
12/13/2023, 11:58 AMalex
12/15/2023, 3:20 PMprefect work-pool provision-infra
for your existing work pool and it will create an ECR repository that is fully set up to use with a ECS push work pool. Let me know if you run into any issues with it!mira
12/15/2023, 3:33 PM