Skip to content

Commit

Permalink
add nydus image artifact
Browse files Browse the repository at this point in the history
Artifact manifest is a nice way to offer the ability of enhancing
registry as well as applying minimum modifications to client tools.

Nydus image is an alternative representation of container image,
providing benefits like making starting containers as fast as
possible.

We'd like to have nydus image persist as a new artifact like helm
charts.

Signed-off-by: Peng Tao <<tao.peng@linux.alibaba.com>>
Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
  • Loading branch information
liubogithub committed Jan 27, 2021
1 parent d3e24fb commit 019f029
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion artifact-manifest/artifact-manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ A CNAB may also be persisted with configuration information, along with a refere

![Wordpress CNAB](media/wordpress-cnab.svg)

### Nydus Image

A Nydus image is an alternative representation of container image, providing benefits like lazy-loading of images, etc. Since it can be stored independently or along with the OCI image, their references are loose references.

## Supported Scenarios

The main scenarios include:
Expand Down Expand Up @@ -381,6 +385,51 @@ As the `oci-reg copy` command is executed, the graph of references are expanded.
}
```

#### Nydus Image Reference

```
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.artifact.manifest.v1+json",
"artifactType": "application/vnd.cncf.nydus.v1",
"config": {
"mediaType": "application/vnd.oci.image.manifest.v1.config.json",
"digest": "sha256:9e988712154fcc2ceda5602eb1d98c1f28299ba6fbf0be49d3717c35a2d76674",
"size": 1102
},
"blobs": [
{
"mediaType": "application/vnd.cncf.nydus.bootstrap.v1.tar+gzip",
"digest":
"sha256:f6bb0822fe567c98959bb87aa316a565eb1ae059c46fa8bba65b573b4489b44d",
"size": 32654
},
{
"mediaType": "application/vnd.cncf.nydus.blob.v1",
"digest":
"sha256:f6bb0822fe567c98959bb87aa316a565eb1ae059c46fa8bba65b573b4489b44d",
"size": 72832
},
{
"mediaType": "application/vnd.cncf.nydus.blob.v1",
"digest":
"sha256:f6bb0822fe567c98959bb87aa316a565eb1ae059c46fa8bba65b573b4489b44d",
"size": 928324
}
],
"references": [
{
"artifact": "mysql:8",
"artifactType": "application/vnd.oci.image.manifest.v1.config.json",
"mediaType": "application/vnd.oci.image.manifest.v1.config.json",
"digest":
"sha256:3c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c6b",
"size": 16724
}
]
}
```

### Deletion

Distribution-spec APIs will provide standard delete operations, including options for deleting referenced artifacts, or blocking a delete as the artifact is referenced by other artifacts. The `oci.artifact.manifest` collection will provide the information, as defined by the artifact author` for how an artifact should be handled for delete operations. The registry, nor the `oci-reg` cli would need to know about specific artifact implementations.
Expand Down Expand Up @@ -499,4 +548,4 @@ This specification defines the following annotation keys, intended for but not l

## Open Questions

Should the references collection support additional types, like loose urls
Should the references collection support additional types, like loose urls
Binary file added artifact-manifest/media/nydus_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 019f029

Please sign in to comment.