CNAB is a standard packaging format for multi-component distributed applications
–
Easily create bundles with Duffle
Containerized install script
Must accept parameters install|uninstall|upgrade|downgrade|status
Directory layout:
.
├── bundle.json
├── cnab
│ ├── app
│ │ └── run
│ └── Dockerfile
└── duffle.json
–
Basic example:
Clone examples:
git clone https://github.com/deislabs/duffle
Build bundle:
duffle build ./examples/helloworld/
List existing bundles:
duffle bundle list
–
Install bundle:
duffle install helloworld-demo helloworld:0.1.1
List installed bundles:
duffle list
Uninstall bundle:
duffle uninstall helloworld-demo
Many example bundles are available
Start a new bundle:
duffle create foo
–
Interface with Helm, Terraform etc. using Porter
Containerized installer
Executes commands defined in porter.yaml
Mixins provide templates for common tasks
Publish to OCI registry
Use CNAB compliant tool to install from registry
–
Play with a new package
Create and build package:
porter create
Check porter.yaml:
vim porter.yaml
Build package:
porter build
–
Uses OCI registries as storage
cnab-to-oci
manages bundles in registries
Convert a CNAB bundle for upload:
# Clone examples
git clone https://github.com/docker/cnab-to-oci
# Push and pull
cnab-to-oci push cnab-to-oci/examples/helloworld-cnab/bundle.json --target myhubusername/repo
cnab-to-oci pull myhubusername/repo@sha256:6cabd752cb01d2efb9485225baf7fc26f4322c1f45f537f76c5eeb67ba8d83e0
Better experience with duffle
, porter
and docker-app