Skip to content
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

Merged
merged 12 commits into from
Jan 31, 2025
Merged

Conversation

cgokey
Copy link
Contributor

@cgokey cgokey commented Jan 30, 2025

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.

Copy link

@eereiter eereiter left a 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.

@cgokey cgokey merged commit b7408c0 into main Jan 31, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants