-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KMS-510: cdk infrastructure code for deploying rdf4j #2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cgokey
requested review from
jceaser,
mandyparson,
eereiter,
isja17 and
johnwteague
January 30, 2025 22:20
eereiter
reviewed
Jan 31, 2025
eereiter
reviewed
Jan 31, 2025
eereiter
reviewed
Jan 31, 2025
eereiter
reviewed
Jan 31, 2025
eereiter
approved these changes
Jan 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor changes.
jceaser
reviewed
Jan 31, 2025
jceaser
approved these changes
Jan 31, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The purpose of this code is to use CDK to deploy infrastructure code for deploying the RDF4J database. It deploys 3 stacks:
rdf4jIamStack - This stack sets up the necessary IAM permissions for ECS tasks to run and be managed, interaction with EFS for file storage, using the ECS Execute Command feature for debugging, and pulling images from ECR. The exported role ARN can be used by other stacks or services that need to reference this IAM role.
rdf4jEfsStack - This stack essentially sets up a persistent file storage system (EFS) that can be used by ECS tasks. This is used for storing RDF4j data. The security group configurations ensure that only the specified ECS tasks can access the EFS. The exported IDs can be used by other stacks or services that need to reference this EFS setup.
rdf4jEcsStack - This stack essentially sets up a containerized RDF4J service running on ECS Fargate, with persistent storage provided by EFS, and accessed through an Application Load Balancer. It's designed to run a single instance of the service, with auto-scaling configured to maintain exactly one task. The service integrates with other AWS services like ECR for container images and CloudWatch for logging. One thing to note. Multiple processes can read from the RDF db, but only 1 can write. A future ticket will setup a lock manager so we can scale, but for now, we will prevent any scaling.
Finally, this includes a custom configuration for the container that runs in ECS. It creates a customized RDF4J database environment, tailored for use with AWS EFS for persistent storage. It includes custom configuration and setup scripts, and prepares the environment for running as a non-root user (tomcat) for security purposes.