https://prefect.io logo
Title
m

Madison Schott

09/20/2022, 7:50 PM
I'm currently looking at this example https://discourse.prefect.io/t/how-can-i-run-my-flow-in-a-docker-container/64 which looks pretty similar to what I have in 1.0, except I use Docker for storage and ECSRun as my run config. What would this look like in 2.0?
with Flow("data_pipeline_test_new_account", storage=STORAGE, run_config=RUN_CONFIG) as data_pipeline_test_new_account:
1
STORAGE = Docker(registry_url='-',
                 image_name='prefect-flows',
                 dockerfile='')
RUN_CONFIG = ECSRun(run_task_kwargs={'cluster': 'prefect-prod'},
                    env={"PREFECT__LOGGING__LEVEL": "DEBUG"},
                    execution_role_arn='',
                    labels=['ecs-agent', 'prod'])
t

Taylor Curran

09/20/2022, 8:17 PM
Have you checked out our ECS task infrastructure block? Anna give a little guide on it in this article: https://medium.com/the-prefect-blog/prefect-2-4-0-release-adds-support-for-aws-ecs-and-improves-deployment-cli-for-ci-cd-9582458e1e81
:upvote: 1
n

Nate

09/20/2022, 8:22 PM
Hey @Madison Schott both those
STORAGE
and
RUN_CONFIG
variables would be replaced by blocks in your cloud workspace! sounds like you def wanna check out Taylor's link above, but generally wrt deployments we just released a discourse article ( w associated youtube video) giving an overview of setting up infra blocks for deployments!
🎉 2
:gratitude-thank-you: 1