What is Porter?
main.tgz files. This allows users to install applications without needing deep knowledge of the underlying deployment process or tech stack.repository·main·Indexed 23 days ago
https://github.com/getporter/porterPorter is a tool for packaging applications and their deployment logic into single-command installers following the Cloud Native Application Bundle (CNAB) specification. It utilizes mixins for platform support (including Kubernetes, Helm, AWS, Azure, and Docker) and plugins for external secret and data management. The tool provides a CLI for building, linting, publishing, and archiving bundles, as well as a Porter agent for environments with mounted configuration volumes.
.tgz files. This allows users to install applications without needing deep knowledge of the underlying deployment process or tech stack.The porter CLI allows you to package application artifacts, client tools, configuration, and deployment logic into a versioned bundle. These bundles can be distributed and installed using a single command.
Note: Most commands require a Docker daemon (either local or remote) to function.
porter [flags]When developing a Porter mixin, you must implement specific commands to ensure compatibility with the Porter lifecycle. Commands are categorized into Required (must be implemented or Porter will refuse to load the mixin) and Optional (recommended for better user experience).
| Command | Requirement | Context | Purpose |
|---|---|---|---|
build | Required | Local machine (porter build) | Generates Dockerfile lines via stdout based on stdin config. |
schema | Required | Various (porter schema, build, run) | Returns a JSON Schema for manifest validation and autocomplete. |
install | Required | Inside bundle image (porter run) | Performs installation; writes outputs to /cnab/app/porter/outputs/. |
upgrade | Required | Inside bundle image (porter run) | Performs upgrades; writes outputs to /cnab/app/porter/outputs/. |
uninstall | Required | Inside bundle image (porter run) | Performs uninstallation. |
version | Required | Local machine (porter build, mixins list) | Returns mixin version info (supports --output json or plaintext). |
invoke | Optional | Inside bundle image (porter run) | Handles custom actions defined in the bundle. |
The porter mixins command group provides tools to assist with the authoring of Porter bundles. Mixins allow you to extend or simplify the creation process.
Note: Most Porter commands, including those in the mixins group, require a Docker daemon (either local or remote) to function correctly.
Porter is composed of several key abstractions used to define and manage infrastructure and application lifecycles. To build with Porter, you should understand the following core concepts:
A Cloud Native Application Bundle (CNAB) is an open-source packaging and distribution specification designed to manage distributed applications using a single installable file.
It solves the gap between application code and the various tools (Terraform, Helm, bash scripts, etc.) required to deploy it. Instead of requiring users to manually install specific CLI versions or manage environment variables, a CNAB bundle abstracts these requirements into a single unit.
Key components of a bundle include:
install, upgrade, and uninstall actions.bundle.json): A file containing the content digests for the invocation and application images, as well as definitions for accepted credentials, parameters, and expected outputs.Porter is an implementation of the Cloud Native Application Bundle (CNAB) specification. A bundle acts as a "cloud installer" that packages an application along with its required infrastructure, binaries, and scripts into a single, distributable artifact (typically an OCI image).
Key characteristics of bundles:
kubectl, terraform, gcloud) and installation scripts.A Porter bundle consists of the Porter runtime and a porter.yaml manifest. While the runtime executes the bundle actions, the actual functionality (e.g., installing a Helm chart, running a bash command) is provided by mixins.
How Mixins work:
porter.yaml.mixins:
- exec
name: hello
version: 0.1.0
registry: getporter
install:
- exec:
description: "Say Hello"
command: bash
flags:
c: echo Hello WorldPorter is an implementation of the Cloud Native Application Bundle (CNAB) specification. It is used to create installers called bundles.
A bundle packages together the logic required to install an application along with its necessary infrastructure and configuration. This allows you to provide a consistent installation experience to other teams or customers without requiring them to understand the underlying deployment tools or complex internal processes.
In Porter, a bundle is the unit of authoring and building. A bundle is defined by a porter.yaml manifest, which specifies the following components:
install, upgrade, or uninstall.