Skip to content

Commit aa0bdb8

Browse files
liubogithubLiu Bo
authored andcommitted
add nydus image artifact
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. Note that we uses loose "reference" for the ociv1 image because our assumption is that a Nydus image can be stored and used without the ociv1 image's help. Signed-off-by: Peng Tao <<tao.peng@linux.alibaba.com>> Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
1 parent a56aaad commit aa0bdb8

2 files changed

Lines changed: 94 additions & 0 deletions

File tree

artifact-manifest/artifact-manifest.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ A CNAB may also be persisted with configuration information, along with a refere
114114

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

117+
### Nydus Image
118+
119+
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.
120+
117121
## Supported Scenarios
118122

119123
The main scenarios include:
@@ -474,6 +478,95 @@ As the `oci-reg copy` command is executed, the graph of references are expanded.
474478
]
475479
}
476480
```
481+
482+
#### Nydus Image Reference
483+
484+
> **OPTION A**
485+
486+
```json
487+
{
488+
"schemaVersion": 1,
489+
"mediaType": "application/vnd.oci.artifact.manifest.v1+json",
490+
"artifactType": "application/vnd.cncf.nydus.v1",
491+
"config": {
492+
"mediaType": "application/vnd.oci.image.manifest.config.v1+json",
493+
"digest": "sha256:9e988712154fcc2ceda5602eb1d98c1f28299ba6fbf0be49d3717c35a2d76674",
494+
"size": 1102
495+
},
496+
"blobs": [
497+
{
498+
"mediaType": "application/vnd.cncf.nydus.bootstrap.v1.tar+gzip",
499+
"digest": "sha256:f6bb0822fe567c98959bb87aa316a565eb1ae059c46fa8bba65b573b4489b44d",
500+
"size": 32654
501+
},
502+
{
503+
"mediaType": "application/vnd.cncf.nydus.blob.v1",
504+
"digest": "sha256:f6bb0822fe567c98959bb87aa316a565eb1ae059c46fa8bba65b573b4489b44d",
505+
"size": 72832
506+
},
507+
{
508+
"mediaType": "application/vnd.cncf.nydus.blob.v1",
509+
"digest": "sha256:f6bb0822fe567c98959bb87aa316a565eb1ae059c46fa8bba65b573b4489b44d",
510+
"size": 928324
511+
}
512+
],
513+
"manifests": [
514+
{
515+
"mediaType": "application/vnd.oci.image.manifest.config.v1+json",
516+
"digest": "sha256:3c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c6b",
517+
"size": 16724
518+
"annotations": {
519+
"oci.distribution.relationship": "references",
520+
"oci.distribution.artifact": "mysql:8"
521+
}
522+
}
523+
]
524+
}
525+
```
526+
527+
> **OPTION B**
528+
529+
```json
530+
{
531+
"schemaVersion": 1,
532+
"mediaType": "application/vnd.oci.artifact.manifest.v1+json",
533+
"artifactType": "application/vnd.cncf.nydus.v1",
534+
"config": {
535+
"mediaType": "application/vnd.oci.image.manifest.config.v1+json",
536+
"digest": "sha256:9e988712154fcc2ceda5602eb1d98c1f28299ba6fbf0be49d3717c35a2d76674",
537+
"size": 1102
538+
},
539+
"blobs": [
540+
{
541+
"mediaType": "application/vnd.cncf.nydus.bootstrap.v1.tar+gzip",
542+
"digest": "sha256:f6bb0822fe567c98959bb87aa316a565eb1ae059c46fa8bba65b573b4489b44d",
543+
"size": 32654
544+
},
545+
{
546+
"mediaType": "application/vnd.cncf.nydus.blob.v1",
547+
"digest": "sha256:f6bb0822fe567c98959bb87aa316a565eb1ae059c46fa8bba65b573b4489b44d",
548+
"size": 72832
549+
},
550+
{
551+
"mediaType": "application/vnd.cncf.nydus.blob.v1",
552+
"digest": "sha256:f6bb0822fe567c98959bb87aa316a565eb1ae059c46fa8bba65b573b4489b44d",
553+
"size": 928324
554+
}
555+
],
556+
"manifests": [],
557+
"references": [
558+
{
559+
"mediaType": "application/vnd.oci.image.manifest.config.v1+json",
560+
"digest": "sha256:3c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c6b",
561+
"size": 16724
562+
"annotations": {
563+
"oci.distribution.artifact": "mysql:8"
564+
}
565+
}
566+
]
567+
}
568+
```
569+
477570
### Deletion
478571

479572
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.
@@ -530,6 +623,7 @@ Examples include:
530623
- A helm chart referencing container images
531624
- A CNAB referencing Helm charts or other artifacts the CNAB may need to complete it's operation
532625
- A WASM that may reference other packages that may be stored in a registry.
626+
- A nydus image referencing the container image from which it can be converted.
533627

534628
References are collections of OCI Artifact Content Descriptors.
535629

651 KB
Loading

0 commit comments

Comments
 (0)