Skip to main content

Applications

An application is a bundle with no IaC of its own. It is built on a runtime, a bundle your platform team publishes that decides how services run: networking, IAM, logging, and autoscaling. The application declares only what is specific to the service: its dependencies, the resources it exposes, its environment variables, and its secrets.

massdriver.yamlyaml
name: orders-api
description: Takes and tracks orders.
version: 0.3.0

dependencies:
db:
resource_type: postgres@~1
required: true

app:
runtime: ecs-service@~2
envs:
DB_HOST: .dependencies.db.authentication.hostname
secrets:
STRIPE_KEY:
required: true

That is the whole application.

Who owns what​

RuntimeApplication
Written byThe platform teamThe team that owns the service
HoldsThe IaC, params, and configuration formDependencies, resources, envs, and secrets
DecidesHow the service runs: compute, network, IAM, logsWhat the service needs and what it offers
VersionedOn its ownOn its own, pinned to the runtime version it was built on

Everything an application gets from its runtime is inherited. The application can add to it, but it cannot change it. When the platform team publishes a new runtime version, an application picks it up the next time it is published, if the version matches the application's app.runtime constraint.

RUNTIMEecs-servicenetwork, IAM, loggingorders-api+ postgres, STRIPE_KEYsearch-api+ opensearchemails-worker+ queue

What a runtime can do for you​

  • Create an IAM role or service account for each application, scoped to what it connects to.
  • Run the application as a container on the compute your organization chose.
  • Turn the application's dependencies and params into environment variables.
  • Grant the application access to the databases, buckets, and queues it depends on.

Common runtimes:

  • AWS Lambda and ECS services
  • Azure App Service
  • GCP Cloud Run
  • Kubernetes deployments, cron jobs, and jobs on EKS, AKS, GKE, or your own clusters

A runtime is a bundle in your organization. You need repo:pull on its repository to build an application on it, because mass bundle build and mass bundle publish pull the runtime. The application-templates repository is a starting point for writing one.

Next steps​