Skip to content

Commit

Permalink
ci(test): Disable efs
Browse files Browse the repository at this point in the history
  • Loading branch information
topher-lo committed Mar 19, 2024
1 parent de093de commit e0f1cc3
Showing 1 changed file with 32 additions and 33 deletions.
65 changes: 32 additions & 33 deletions aws/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -131,33 +130,33 @@ 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(
self,
"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=".",
Expand All @@ -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=".",
Expand All @@ -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(
Expand Down

0 comments on commit e0f1cc3

Please sign in to comment.