HackMD
  • Prime
    Prime  Full-text search on all paid plans
    Search anywhere and reach everything in a Workspace with Prime plan.
    Got it
      • Create new note
      • Create a note from template
    • Prime  Full-text search on all paid plans
      Prime  Full-text search on all paid plans
      Search anywhere and reach everything in a Workspace with Prime plan.
      Got it
      • Options
      • Versions and GitHub Sync
      • Transfer ownership
      • Delete this note
      • Template
      • Save as template
      • Insert from template
      • Export
      • Dropbox
      • Google Drive
      • Gist
      • Import
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
      • Download
      • Markdown
      • HTML
      • Raw HTML
      • Sharing Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • More (Comment, Invitee)
      • Publishing
        Everyone on the web can find and read all notes of this public team.
        After the note is published, everyone on the web can find and read this note.
        See all published notes on profile page.
      • Commenting Enable
        Disabled Forbidden Owners Signed-in users Everyone
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Invitee
      • No invitee
    Menu Sharing Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Versions and GitHub Sync Transfer ownership Delete this note
    Export
    Dropbox Google Drive Gist
    Import
    Dropbox Google Drive Gist Clipboard
    Download
    Markdown HTML Raw HTML
    Back
    Sharing
    Sharing Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Note Permission
    Read
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    Write
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    More (Comment, Invitee)
    Publishing
    Everyone on the web can find and read all notes of this public team.
    After the note is published, everyone on the web can find and read this note.
    See all published notes on profile page.
    More (Comment, Invitee)
    Commenting Enable
    Disabled Forbidden Owners Signed-in users Everyone
    Permission
    Owners
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Invitee
    No invitee
       owned this note    owned this note      
    Published Linked with GitHub
    Like BookmarkBookmarked
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Registries To Become Cloud Native Artifact Stores One of the many benefits Docker innovated in the VM to container paradigm shift was the integration of a registry. While VMs provided a means to run various virtual environments, there was no default solution for where VM images would be stored. With Docker, customers simply execute `docker run demo42.azurecr.io/marketing/webapp:1`. This single command facilitates a host to authenticate, find, pull and run a virtual environment. Where the image is sourced from is simplified to a registry URL. As a result, registries are core to the development and production environments. All major cloud vendors have implemented [docker/distribution](https://github.com/docker/distribution) to support the registry api, implementing their cloud specific storage and security semantics. With the volume of development and production activity, these registries are hardened, secured and highly scalable and available. ## New Cloud Native Artifact Types As the industries looks to build atop image artifacts, new artifact types are surfacing. - **Helm Charts are a common means to define a deployment in Kubernetes.** Several efforts have been made to support storing Helm Charts, such as Chart Museum. JFrog, [Codefresh](https://codefresh.io/docs/docs/new-helm/managed-helm-repository/) and Harbor implemented Chart Museum with reasonable success. [Quay](https://coreos.com/blog/quay-application-registry-for-kubernetes.html), and [Azure Container Registry](https://aka.ms/acr/helm-repos) leveraged the registry infrastructure to provide Helm Charts. - **[CNAB](https://cnab.io/) – Cloud Native Application Bundles** were introduced in December '18, facilitating the bundling, installing and managing of container-native apps — and their coupled services. Some existing and new artifact types are also looking for a place to be stored, with the assumption being to leverage a container registry: - [Terraform requested to as a supported artifact type in Harbor](https://github.com/goharbor/harbor/issues/6598) - Azure Resource Manager (ARM) and AWS Cloud Formation templates could also benefit from a place to be stored and referenced for deployment ## Leveraging Registry Investments Implementing new artifact services are expensive investments. As [containers are becoming the common unit of deployment](https://stevelasker.blog/2016/05/26/docker-containers-as-the-new-binaries-of-deployment/), it's logical to assume development and production environments are already being configured to utilize, secure and manage registries. While we're not suggesting existing NPM, NuGet or other package managers should switch, we believe leveraging existing registries can enable new package artifacts to innovate quickly. ## Representing Various Artifact Types If we assume registries can host various artifact types, which the [OCI Distribution spec](https://github.com/opencontainers/distribution-spec) already allows for, the next set of question may involve: - How does one reason over the various artifact types in a registry? - How would HTML and API registry listings represent the different artifact types? - If HTML registry listings wish to provide optimized action points, such as gestures to deploy a CNAB or Helm Chart, or deploying an image directly to a container service, how would the UI know which actions to surface on which artifact types? While a registry can simply provide generic storage, one could ask, what value does it provide above basic storage? The answer is multi-fold: - Registries abstract the storage and most of the cloud specfic security implementations. Whether the registry is baced by AWS S3 or Azure Storage is a detail the user, and the client CLI doesn't have to deal with - Registries handle multi-part artifacts, with manifests providing pointers to reused artifacts. ## CLIs Working Across Different Registries The `docker` CLI is a great example of being able to use the same CLI across different cloud vendors. Any [docker/distribution](https://github.com/docker/distribution) based registry can support `docker pull & push`, among other common registry experiences. To carry this experience further, there are proposals for enabling [HELM](https://github.com/helm/community/pull/55) and CNAB CLIs to have equal universal experiences across different OCI compliant registries. If we agree a registry must be able to reason across it's different artifact types, and clients must be able to push specific artifacts into different OCI compliant registries, we would need a set of well known artifact types. ## Well Known Artifact Types One could argue that package managers are specific as they have tailored experiences around them. Most registries provide experiences over the various artifacts they represent, however today this is limited to container images. If a registry is to host multiple artifact types, with the ability to reason over them uniquely, they will need to be well known. Today, there are a relatively low number of [docker/distribution](https://github.com/docker/distribution) implementations. As containers continue to expand their usage, that number will successfully grow to unwieldy numbers. At the same time, new artifact types will surface. If registries wish to provide tailored experiences, and different tooling solutions will need to understand how to interact with the different artifact types, consistently across different registries, one could suggest we need a clearing house for artifact type definitions. ## Yet Another Discovery Tool While previous attempts have been made to offer a yellow pages of discovery (WSDL), a number of things have changed, including: - GitHub for easy of submissions and approvals - The internet as an assumed resource The clearing house could be a github project, that takes PRs for new artifact types, and their validations ## Strawman Proposal A simple proof-of-concept has been made by the authors of [oras](https://github.com/deislabs/oras). In oras, only the minimal changes to the existing OCI-distribution specification are made. The mediatypes specified in a manifest have been changed to distinguish the new type of artifact from OCI images: ```json { "schemaVersion": 2, "mediaType": "application/vnd.cncf.helm.manifest.v1+json", "config": { "mediaType": "application/vnd.cncf.helm.chart.v1+json", "size": 7023, "digest": "sha256:b5b2b2c507a0944348e0303114d8d93aaaa081732b86451d9bce1f432a537bc7" }, "layers": [ { "mediaType": "application/vnd.cncf.helm.chart.tar.gzip", "size": 32654, "digest": "sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f" } ] } ``` This has the benefit of being handled by any OCI registry that relaxes their validation of mediatypes, but adds requirement that registries must assume any mediatypes that are not already explicitly supported are in the OCI format. To address this problem, a standard manifest mediatype could be introduced that defines the schema for the manifest, while reserving annotations for additional metadata and allowing custom mediatypes for the config and layers: ```json { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", "config": { "mediaType": "application/vnd.cncf.helm.chart.v1+json", "size": 7023, "digest": "sha256:b5b2b2c507a0944348e0303114d8d93aaaa081732b86451d9bce1f432a537bc7", "annotations": { "ANY MORE METADATA": "GOES HERE" } }, "layers": [ { "mediaType": "application/vnd.cncf.helm.chart.tar.gzip", "size": 32654, "digest": "sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f" } ] } ``` ## Common Search / Catalog APIs See: [Cloud Native Artifact Search Requirements](https://hackmd.io/mF80aTt8TC-GiGHOyPG-dw)

    Import from clipboard

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lost their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template is not available.


    Upgrade

    All
    • All
    • Team
    No template found.

    Create custom template


    Upgrade

    Delete template

    Do you really want to delete this template?

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in via Google

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Tutorials

    Book Mode Tutorial

    Slide Mode Tutorial

    YAML Metadata

    Contacts

    Facebook

    Twitter

    Feedback

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions

    Versions and GitHub Sync

    Sign in to link this note to GitHub Learn more
    This note is not linked with GitHub Learn more
     
    Add badge Pull Push GitHub Link Settings
    Upgrade now

    Version named by    

    More Less
    • Edit
    • Delete

    Note content is identical to the latest version.
    Compare with
      Choose a version
      No search result
      Version not found

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub

        Please sign in to GitHub and install the HackMD app on your GitHub repo. Learn more

         Sign in to GitHub

        HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Available push count

        Upgrade

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Upgrade

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully