Skip to main content

cloud-native app registry server

Project description

# cnr-server

[![build status](](
[![Coverage Status](](
[![Swagger API Reference](](Documentation/cnr-api-swagger.yaml)

CNR implements a registry for storing Kubernetes application manifests that attempts to reuse as much knowledge from the rest of the Linux container ecosystem as possible.

Differentiating features include:

- A protocol and data model that can more easily be implemented by pre-existing container registries
- This includes a common API for uploading, downloading, and searching for applications
- The reuse and integration with many elements from [OCI](
- Content addressable manifest scheme for security, signing, and non-trusted mirroring
- Reuse of common data structures such as Descriptors
- Unification of Manifest Lists as the means of content negoitation for both Images and Applications

## Getting started

1. git clone && cd cnr-server
2. pip install -e . && pip install gunicorn
3. Run the cnr-server on port 5000 `gunicorn cnr.api.wsgi:app -b :5000`
or "./run-server"
4. See the [curl-based examples](Documentation/

## Architecture at a glance

There are two top-level objects:

- Package: metadata describing an application
- Blob: a gzipped tarball of the package encoded in base64

Packages are primarily indexed by 3 notable fields:

- package-name: it follows container-image format: `namespace/name`.
- release: it's the version of the package, immutable it can be viewed as an alias to a digest
- mediaType: the format of the package formats (eg: docker-compose, dab, helm, kpm)

Data storage is specified by the `STORAGE` environment variable. The following are supported:

- `filesystem` (default)
- [`etcd`](
- [`redis`](

## Demo using using [Helm]( charts

### Publish a chart

Create and encode the chart tarball

~/charts/elasticsearch $
tar czvf ../elastichart.tar.gz Chart.yaml manifests
cat ../elastichart.tar.gz | base64 -w 0

POST the chart to CNR

curl -XPOST http://localhost:5000/api/v1/packages/myname/elasticsearch -d '
"blob": "H4sIAP3mAFgAA....",
"release": "2.2.1",
"media_type": "helm"

### Pull the chart

Find the digest from the package-name/release/media-type

curl -XGET http://localhost:5000/api/v1/packages/myname/elasticsearch/2.2.1/helm
"channels": [],
"content": {
"digest": "72ed15c9a65961ecd034cca098ec18eb99002cd402824aae8a674a8ae41bd0ef",
"mediaType": "application/vnd.cnr.package.helm.v1.tar+gzip",
"size": 583,
"urls": []
"created_at": "2016-11-16T17:13:07.806579",
"mediaType": "application/vnd.cnr.package-manifest.helm.v1.json",
"package": "myname/elasticsearch",
"release": "2.2.1"


Fetch the blob

curl -XGET \
http://localhost:5000/api/v1/packages/myname/elasticsearch/blobs/sha256/72ed15c9a65961ecd034cca098ec18eb99002cd402824aae8a674a8ae41bd0ef \
-o elasticsearch-chart.tar.gz

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cnr-server, version 0.2.7.post2
Filename, size File type Python version Upload date Hashes
Filename, size cnr_server-0.2.7.post2-py2.py3-none-any.whl (55.0 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size cnr-server-0.2.7.post2.tar.gz (44.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page