-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate Invocation Image from Artifacts #175
Comments
Responding to: cnabio/duffle#749 (comment) The issue isn't just about having to rebuild the invocation image each time. It's a collection of the 4 bullets at the end of the issue. Each individual artifact can be signed. The CNAB that references artifacts can be signed. |
I like the flexibility the idea brings, of course. Without taking my time about it, however, I fail to see the immediate need to add the flexibility. The spec currently works well. At the moment, I see that CNAB heading toward RC and then 1.0 by rebuilding the bundles, which are OCI images and we can ensure guarantees the specification makes. This issue would radically alter the spec, resulting in a few improved scenarios as stated, but also resulting in a ton of thought-work in advance before we end up doing a bunch of coding across all the tools. That alone would mean that 1.0 of a spec a lot of people have worked quite a bit on would be yet further off, so at this point only on those grounds I'm not in support, though it looks like the perfect issue to turn around and tackle after 1.0... That's my take at the moment, but I'll read and think this through as well because the features are good, although I am not at all convinced that the added flexibility doesn't bring a reduction in some other area of functionality and/or requires all tools to do work for benefits that they do not see. It'll take some time to decide on that. My two cents for now.... |
I may be wrong, but I interpreted as the door was open to more than just OCI/Docker images in the image map, it just happens that the only imageType used right now has been docker and OCI Should be explicitly draw OCI/Docker as the supported imageType in 1.0? With the addition of 'relocation' as a concept (Distribute and update bundle.json) a CNAB runtime would avoid the burden of knowing what or how to treat these differently. Typically the invocationImage will be reading the "image": value. Artifacts (images) could be embedded in the invocationImage, but best practice would be to externalize the artifact and gain the benefits of the registry ecosystem. Somewhat related, #95 uncovered a lot of these assumptions |
I like the idea of generic invocation images, and I think we can leverage the "component" images to store artifacts such as compose files etc. without evolving the spec. I would love to see an experiment of that in docker-app as we already do a |
@GreenCee - I'm not sure we need to necessarily restrict the image type to OCI / Docker - and I'll let @SteveLasker comment on this more, but technically Another question I have is how would a I think I like the idea, but as @squillace mentioned, it feels rather late in the process for v1.0 of CNAB Core - although it might be a perfect item to seriously start discussing what we want from v2.0 of CNAB Core (and a great talking point for the registry specification). |
It seems the biggest confusion is around being able to store different things, and differentiate what they are within OCI Artifact Registries. Singularity is one of the best examples of this. Sylabs was stuffing their SIF formats into the docker/OCI image format, but had to convert it after pulling. Which ironically meant a high performance computing optimization, had to first be converted. By defining a different mediaType, they have the freedom to choose their own optimized layout of the layers. |
The current spec includes all artifacts used to deploy a bundle within the invocation image. This means that any change to a helm chart, a compose file, an OPA Bundle will require the invocation image to be rebuilt. It also avoids the ability to have common invocation images shared across different bundles, or have the common invocation image signed by an external entity.
The proposal is to separate invocation images to be just the binaries, and possibly mix-ins required to do a deployment, from any other artifact used for that deployment.
Scenario: Azure, AWS, Google make a invocation images available for deploying to their respective clouds. The cloud specific invocation images have mix-ins packaged within the invocation image. The invocation images are signed by the respective clouds, so they know what is capable.
A developer wishes to deploy an app that includes Kubernetes, storage, IP addresses, and a Redis Cache instance.
They reference the cloud providers invocation image.
The Helm chart and ARM template are also referenced in the bundle.
When the bundle is "built", the Helm chart is pushed to the registry as an individual OCI artifact type. The ARM template can be pushed as an OCI artifact type, or it could be pushed as a
cnab.artifact
, meaning CNAB provides for generic artifacts that don't yet have an OCI CLI.An OCI Index is created that references these artifacts, with a reference to an invocation image, and the images used to run the app in AKS.
Any CNAB configuration information is placed in the invocation images config. Alternatively, the specific CNAB config for this bundle could be a separate artifact as well.
By separating these elements out, we get:
The text was updated successfully, but these errors were encountered: