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.
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​
| Runtime | Application | |
|---|---|---|
| Written by | The platform team | The team that owns the service |
| Holds | The IaC, params, and configuration form | Dependencies, resources, envs, and secrets |
| Decides | How the service runs: compute, network, IAM, logs | What the service needs and what it offers |
| Versioned | On its own | On 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.
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​
- Create an application: write the
massdriver.yamland publish it. - Deploy an application: add it to a project and ship it.
- Runtimes and Applications: the full reference, including how to publish a runtime and see which versions your fleet runs.