Skip to content

Infrastructure

Liz Krznarich edited this page Nov 2, 2023 · 1 revision

Infrastructure overview

ROR infrastructure is hosted in AWS. Services that ROR uses include:

  • Fargate for hosting containerized apps (ror-api, generate-id, ror-reconciler)
  • EC2 Elastic load balancing for handling traffic to apps hosted in Fargate (ror-api, generate-id, ror-reconciler)
  • Elasticsearch for ROR data storage, retrieval and search
  • Cloudfront for handling traffic to apps/sites hosted in S3 (ror-app, ror-site, leo-form)
  • Lambda functions for altering/redirecting some requests to ror-app and ror-site and for forwarding logs to Datadog
  • S3 for hosting JS apps (ror-app, leo-forms) and static site (ror-site) and for storing ROR record JSON files as part of the data deployment process
  • Route53 for DNS and some domain registration

Infrastructure architecture

ROR architecture diagram

Draw IO file

Infrastructure provisioning & management

  • Infrastructure is provisioned and managed using Terraform
  • Terraform code is located in [new-deployment (https://github.com/ror-community/new-deployment). Most code uses the Terraform AWS provider to interact with the AWS CLI.
  • Terraform code is deployed via Terraform Cloud.
  • Projects in Terraform Cloud are connected to directories in new-deployment and configured to automatically run plan on pull requests and apply on merges.

Developer tips & best practices

  • Always push changes to a branch and open a pull request against master. Pushing directly to main will trigger a Terraform apply.
  • All infrastructure should have dev, staging, and production instances.
  • DO NOT INCLUDE sensitive info such as credentials in any Terraform files! Secrets and other environment variables are stored in Terraform Cloud variables. For containerized app, these are added to .env files on deployment.
  • Each developer needs their own account to access Terrform Cloud. Contact Liz to get an account.