IMAP-Science-Operations-Center / sds-data-manager

MIT License
0 stars 9 forks source link

Add ECS to I-ALiRT Architecture #265

Closed laspsandoval closed 2 months ago

laspsandoval commented 2 months ago

Change Summary

Overview

Adds ECS to I-ALiRT Architecture for container 1. The next step will be to add container 2. I tried to design the architecture to handle the two containers. I am working on being able to deploy resources for both, but this PR is for a single container.

For this setup we are using an Application Load Balancer and following best practices shown here: https://docs.aws.amazon.com/AmazonECS/latest/bestpracticesguide/networking-inbound.html

New Files

Updated Files

Note: I put docstrings throughout the code to describe each of the bullet points.

Testing

Important: You must deploy the ECR and push the Docker image in tests/test-data/ialirt_ec2 before deployment of IalirtProcessing.

laspsandoval commented 2 months ago

Added the NLB as suggested by Brian. Confirm that everything is up and running.

laspsandoval commented 2 months ago

I find it a bit odd that we have to deploy two separate stacks for i-alirt now. Since it is a unit of deployment I think we'd want just one stack if possible. Are you able to move the for primary/secondary: loop into the stack itself to create the load balancers with separate names there? I am wondering if there are name conflicts within the stack that are causing the issues and we just need to add some more of your f-string additions to the resource names to create multiples of the resources.

I thought you might say that. I like it because if we need to change the cdk code for any reason then we don't have to bring the entire system down. We could deploy the primary stack first, for example, and maintain functionality. Everything is now redundant.