psimakis
11/18/2020, 3:40 PM$ prefect agent fargate start cpu=256 memory=512 executionRoleArn=arn:aws:iam::xxxxxxxxx:role/ecsTaskExecutionRole networkConfiguration="{'awsvpcConfiguration':{'assignPublicIp': 'ENABLED', 'subnets': ['subnet-xxxxxx'], 'securityGroups': ['sg-xxxxxxxxxxx']}}" cluster=fargate-cluster
Below you will find the flow:
from prefect import Flow, task, Parameter
from prefect.environments.storage import Docker
@task
def square_int(x):
return x * x
@task
def sub_2(x):
return x - 2
with Flow(
name='sp-flow-test',
storage=Docker(registry_url='xxxxxxxx.dkr.ecr.eu-west-1.amazonaws.com',
image_name='prefecttest', image_tag='latest'),
) as flow:
integer = Parameter('integer', default=2)
x_sqr = square_int(integer)
x_less_2 = sub_2(x_sqr)
flow.register(project_name='test', idempotency_key=flow.serialized_hash())
When I run the flow, the fargate task seems to run fine (check out the screenshot). The problem is that flow run stays Submitted
forever. Have you any clue?
Thanks.Spencer
11/18/2020, 3:43 PMpsimakis
11/18/2020, 3:58 PMlogConfiguration
and I will come back with more detailsrequests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=4200): Max retries exceeded with url: /graphql (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f7cec8e1250>: Failed to establish a new connection: [Errno 111] Connection refused'))
Should I expose prefect server to www?Spencer
11/18/2020, 6:18 PMPREFECT__CLOUD__API
environment variable?psimakis
11/19/2020, 7:26 AMSpencer
11/19/2020, 1:04 PMlocalhost
is running prefect server. 🙂