Skip to content

Overview

Arda implements its Runtime Platform using an Infrastructure as Code (IaC) approach. The primary tools are AWS CDK V2 in TypeScript for AWS resource provisioning and Helm charts for Kubernetes deployments. Shell scripts choreograph the deployment of these tools.

ToolPurpose
AWS CDK V2Define and deploy AWS resources using TypeScript
HelmPackage and deploy Kubernetes resources
TypeScriptLanguage for CDK code
Node.js / npmExecution environment and build targets for CDK
AWS SDKSpecial operations not yet supported by CDK
AWS CLICredential and profile management

The IaC code lives in the infrastructure repository:

infrastructure/
├── amm.sh # Orchestration script: deploys Infrastructure + Partition
├── root/ # CFn templates for Root Services (being migrated to CDK)
├── src/main/cdk/ # Main CDK code
│ ├── apps/ # CDK Applications (one per concrete environment group)
│ ├── constructs/ # Reusable L2/L3 CDK constructs
│ ├── stacks/ # Reusable CDK stacks (Infrastructure, Partition, Component)
│ ├── instances/ # Concrete infrastructure/partition deployments
│ ├── platform/ # Platform-wide configuration and conventions
│ ├── platforms.ts # Data types and instances for Infrastructures and Partitions
│ └── utils/ # Utility code
└── tools/ # Utility scripts

constructs/ — High-level (L2/L3) CDK constructs representing pre-configured groups of AWS resources. Organized by resource type:

  • compute — Lambda functions, EKS clusters
  • networking — VPCs, Load Balancers
  • storage — S3 buckets, RDS, DynamoDB
  • xgress — API Gateway, VPC Links, DNS entries
  • oam — CloudWatch, X-Ray, monitoring
  • platform — Global Arda Platform configuration

An inline-lambdas/ subdirectory holds Lambda function code edited in IDE context but read as text by CDK constructs.

stacks/ — Reusable CDK stacks deploying complete Infrastructure, Partition, or Component elements. Parametrized to deploy in different contexts.

apps/ — CDK Applications representing complete configurations of infrastructures and partitions (e.g., Al1x). Minimally configurable; coupled to dedicated CI/CD configuration.

instances/ — Concrete TypeScript programs that instantiate specific infrastructures and partitions. Organized by Infrastructure name (e.g., Alpha001/, Alpha002/). Each infrastructure directory contains infra.ts for the Infrastructure layer and partition-named files for each Partition.

platform/ — Shared configuration:

  • ari-configuration.ts — Arda Resource Identifier config (domain names, REST realms)
  • aws-configuration.ts — AWS account IDs, regions
  • conventions.ts — Shared naming patterns
  • user-account-configuration.ts — Cognito user attributes and scopes
  • web-configuration.ts — Web application configuration
Terminal window
./amm.sh --infra <infrastructure> --partition <partition> --profile <aws_profile> --region <aws_region>

This script deploys the Infrastructure layer followed by the Partition layer for the specified combination.

IaC assets for deploying individual Components belong in each component’s own repository. Until constructs and stacks are published as npm packages, there may be some temporary duplication of reusable code between the infrastructure repository and component repositories.

  • Orchestration (amm.sh) — Top-level deployment script: usage, resource effects, flow diagrams, failure modes, and modification guide
  • Stacks — CDK stack patterns with Configuration, Props, Built, and CloudFormation Output conventions
  • Constructs — CDK construct patterns and organization by resource category
  • Apps — CDK application entry points and deployment orchestration
  • Failure Mode & Effects Analysis - A point in time analysis of potential failure modes to be aware of.