Skip to main content

Bundles

A bundle is a reusable, versioned definition of cloud infrastructure or an application component. It packages infrastructure-as-code (IaC), the schema of its configuration, the resources it consumes and produces, its deployment steps, and its policy-as-code into one unit.

A bundle's massdriver.yaml declares:

  • Inputs: params, and the dependencies it takes from other bundles
  • Outputs: the resources it produces
  • Deployment: the provisioning steps
  • Application configuration: environment variables and secrets
  • Policies: policy-as-code validations

Operations teams encode architecture, security policy, and best practice into bundles. Developers configure and deploy them from a form, without writing IaC or waiting on a CI pipeline.

Principles​

Validation before deployment​

The bundle's params schema validates every input before a deployment starts.

Typed composition​

Resource types are the contract between bundles. A component that expects a Redis resource cannot be linked to one that produces PostgreSQL. Compatibility is checked when the link is drawn, before anything deploys.

No standing pipelines​

Each deployment is an ephemeral run of the bundle. There is no per-module CI pipeline to maintain.

Consistent environments​

Every environment in a project is built from the same bundles and the same validation rules. Environments differ in param values and can run different bundle versions.

Single purpose​

A bundle serves one use case, not a whole cloud service. Prefer AWS RDS MySQL to AWS RDS, and S3 Logging Bucket or CDN (S3 and CloudFront) to S3 Bucket. Single-purpose bundles compose better and are easier to maintain.

Bring your own IaC​

Use OpenTofu, Terraform, Helm, Bicep, or another IaC tool. The IaC stays in your repositories.

No lock-in​

Infrastructure runs in your cloud accounts. You own the IaC and its state. Bundles are published as OCI artifacts.

Lifecycle​

Develop​

  1. Create the bundle with mass bundle new, from a template or from scratch. See Bundle Templates.
  2. Write the massdriver.yaml: params, dependencies, resources, and steps.
  3. Publish a development release with mass bundle publish --development and deploy it to a test environment.

Publish​

Each bundle has its own OCI repository in your organization's catalog. Create it once with mass bundle create <name>, then publish versions to it with mass bundle publish. Published versions are immutable. See Versioning.

An instance can pin an exact version or follow a release channel such as ~1 or latest. An instance on a release channel picks up the newest matching release on its next deployment.

Deploy​

  1. Add the bundle to a project as a component.
  2. Configure its params and link its dependencies.
  3. Deploy it to an environment.