Repository navigation
Replies: 2 comments 1 reply
|
I don't think I'd be interested in maintaining it. What we need is the ability to have plugins define their own backends which we currently lack. |
1 reply
|
It appears meanwhile this was published to
and remains reasonably up to date. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I work in an air gapped environment which restricts all communication to the internet. The only way to bring in artifacts/tools/binaries is via a registry like nexus, artifactory, etc. We have solved this by creating OCI artifacts which contain binaries of different tools. These can then be proxied or mirrored by private registries.
The first step is to create a json file that describes the contents of the artifacts. This file is heavily inspired by dotslash. These files can be created by hand or automatically generated.
For example, to publish crossplane:1.17.6 for linux-x86_64 and macos-aarch64 we use a file like:
{ "name": "crossplane", "version": "1.17.6", "title": "Crossplane v1.17.6", "description": "Prebuilt Crossplane CLI v1.17.6 for Linux amd64", "authors": "Crossplane Maintainers <https://github.com/crossplane/crossplane>", "license": "Apache-2.0", "source": "https://github.com/crossplane/crossplane/releases/tag/v1.17.6", "documentation": "https://docs.crossplane.io/", "url": "https://crossplane.io/", "vendor": "Crossplane", "platforms": { "linux-x86_64": { "size": 77723358, "hash": "blake3", "digest": "89d208046e12faae1f633268c646d199edc5309358c1e8fcbd8ad4e0e1ae1aa8", "format": "elf", "path": ".", "providers": [ { "url": "https://releases.crossplane.io/stable/v1.17.6/bin/linux_amd64/crossplane" } ] }, "macos-aarch64": { "size": 76532098, "hash": "blake3", "digest": "79b1d95f0745e62d402a9ffd7450316b553844355335e252a84ac49fb8e9b7a4", "format": "elf", "path": ".", "providers": [ { "url": "https://releases.crossplane.io/stable/v1.17.6/bin/darwin_arm64/crossplane" } ] } } }This file is then used to publish the OCI artifacts that represent these binaries.
The OCI index manifest looks like:
{ "schemaVersion": 2, "mediaType": "application/vnd.oci.image.index.v1+json", "manifests": [ { "mediaType": "application/vnd.oci.image.manifest.v1+json", "digest": "sha256:b01f1b3f420edb9d68598a0b32d75321aea9eef28c4f0d947967486f16d76289", "size": 1368, "platform": { "os": "linux", "architecture": "amd64" } }, { "mediaType": "application/vnd.oci.image.manifest.v1+json", "digest": "sha256:69a29d59aaad67c669b9667dc78b58b69e4920c027236fd43040d9453606ebce", "size": 1371, "platform": { "os": "darwin", "architecture": "arm64" } } ], "annotations": { "org.opencontainers.image.created": "2025-04-23T07:25:58Z", "org.opencontainers.image.title": "Crossplane v1.17.6", "org.opencontainers.image.description": "Prebuilt Crossplane CLI v1.17.6 for Linux amd64", "org.opencontainers.image.version": "1.17.6", "org.opencontainers.image.authors": "Crossplane Maintainers <https://github.com/crossplane/crossplane>", "org.opencontainers.image.licenses": "Apache-2.0", "org.opencontainers.image.source": "https://github.com/crossplane/crossplane/releases/tag/v1.17.6", "org.opencontainers.image.documentation": "https://docs.crossplane.io/", "org.opencontainers.image.url": "https://crossplane.io/", "org.opencontainers.image.vendor": "Crossplane", "org.opencontainers.image.ref.name": "1.17.6" } }The actual platform specific binary manifest looks like:
{ "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", "config": { "mediaType": "application/vnd.oci.image.config.v1+json", "digest": "sha256:2fe86164621d0117eecb85dd7d77baa278aa5eba1156d5b6329e17d0ef0f6c0b", "size": 38 }, "layers": [ { "mediaType": "application/octet-stream", "digest": "sha256:3bbc825b84e42e345ec9d7f476b690d64c0b9f7122558dd4f2eb8106531231dd", "size": 77723358, "annotations": { "org.opencontainers.image.title": "crossplane" } } ], "annotations": { "crossplane:org.opencontainers.image.title": "crossplane", "org.opencontainers.image.authors": "Crossplane Maintainers <https://github.com/crossplane/crossplane>", "org.opencontainers.image.created": "2025-04-23T07:25:58Z", "org.opencontainers.image.description": "Prebuilt Crossplane CLI v1.17.6 for Linux amd64 for linux/amd64", "org.opencontainers.image.documentation": "https://docs.crossplane.io/", "org.opencontainers.image.download": "https://releases.crossplane.io/stable/v1.17.6/bin/linux_amd64/crossplane", "org.opencontainers.image.licenses": "Apache-2.0", "org.opencontainers.image.ref.name": "1.17.6", "org.opencontainers.image.source": "https://github.com/crossplane/crossplane/releases/tag/v1.17.6", "org.opencontainers.image.url": "https://releases.crossplane.io/stable/v1.17.6/bin/linux_amd64/crossplane", "org.opencontainers.image.vendor": "Crossplane", "org.opencontainers.image.version": "1.17.6" } }This solution works in a similar way to how Helm OCI works.
We have written custom asdf plugins to download and verify (hash and signature) of the binaries. This solution allows us to semi securely (it’s still bash) bring in binaries and tools using a well known and supported artifact format (OCI) in air gapped environments. With a little improvement we could also include an sbom.
We would like to opensource this publishing process and also create a mise backend to avoid having to write ASDF plugins and provide a more secure, faster and easier DX.
Does this sound interesting to the mise community?
All reactions