From e0f1cc3410648b442f4254e22b6f05e226794917 Mon Sep 17 00:00:00 2001 From: Christopher Lo <46541035+topher-lo@users.noreply.github.com> Date: Tue, 19 Mar 2024 03:07:16 +0000 Subject: [PATCH] ci(test): Disable efs --- aws/stack.py | 65 ++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/aws/stack.py b/aws/stack.py index 54009cd02..cabe99469 100644 --- a/aws/stack.py +++ b/aws/stack.py @@ -11,7 +11,6 @@ from aws_cdk import Duration, Stack from aws_cdk import aws_ec2 as ec2 from aws_cdk import aws_ecs as ecs -from aws_cdk import aws_efs as efs from aws_cdk import aws_elasticloadbalancingv2 as elbv2 from aws_cdk import aws_iam as iam from aws_cdk import aws_route53 as route53 @@ -131,14 +130,14 @@ def __init__(self, scope: Construct, id: str, **kwargs) -> None: ) } - # Define EFS - file_system = efs.FileSystem( - self, - "FileSystem", - vpc=vpc, - performance_mode=efs.PerformanceMode.GENERAL_PURPOSE, - throughput_mode=efs.ThroughputMode.BURSTING, - ) + # # Define EFS + # file_system = efs.FileSystem( + # self, + # "FileSystem", + # vpc=vpc, + # performance_mode=efs.PerformanceMode.GENERAL_PURPOSE, + # throughput_mode=efs.ThroughputMode.BURSTING, + # ) # Create task definition task_definition = ecs.FargateTaskDefinition( @@ -146,18 +145,18 @@ def __init__(self, scope: Construct, id: str, **kwargs) -> None: "TaskDefinition", execution_role=execution_role, task_role=task_role, - volumes=[ - ecs.Volume( - name="Volume", - efs_volume_configuration=ecs.EfsVolumeConfiguration( - file_system_id=file_system.file_system_id - ), - ) - ], + # volumes=[ + # ecs.Volume( + # name="Volume", + # efs_volume_configuration=ecs.EfsVolumeConfiguration( + # file_system_id=file_system.file_system_id + # ), + # ) + # ], ) # Tracecat API - api_container = task_definition.add_container( + task_definition.add_container( "ApiContainer", image=ecs.ContainerImage.from_asset( directory=".", @@ -179,16 +178,16 @@ def __init__(self, scope: Construct, id: str, **kwargs) -> None: secrets=api_secrets, port_mappings=[ecs.PortMapping(container_port=8000)], ) - api_container.add_mount_points( - ecs.MountPoint( - container_path="/home/apiuser/.tracecat", - read_only=False, - source_volume="Volume", - ) - ) + # api_container.add_mount_points( + # ecs.MountPoint( + # container_path="/home/apiuser/.tracecat", + # read_only=False, + # source_volume="Volume", + # ) + # ) # Tracecat Runner - runner_container = task_definition.add_container( + task_definition.add_container( "RunnerContainer", image=ecs.ContainerImage.from_asset( directory=".", @@ -207,13 +206,13 @@ def __init__(self, scope: Construct, id: str, **kwargs) -> None: secrets=runner_secrets, port_mappings=[ecs.PortMapping(container_port=8001)], ) - runner_container.add_mount_points( - ecs.MountPoint( - container_path="/home/apiuser/.tracecat", - read_only=False, - source_volume="Volume", - ) - ) + # runner_container.add_mount_points( + # ecs.MountPoint( + # container_path="/home/apiuser/.tracecat", + # read_only=False, + # source_volume="Volume", + # ) + # ) # Create ALB Fargate service ecs_service = ecs.FargateService(