Skip to content

Instantly share code, notes, and snippets.

@annelo-msft
Last active February 9, 2021 17:51
Show Gist options
  • Save annelo-msft/4ac907517f98c67dff3420b465e43c0d to your computer and use it in GitHub Desktop.
Save annelo-msft/4ac907517f98c67dff3420b465e43c0d to your computer and use it in GitHub Desktop.

ACR Track 2 SDK Functional Needs

Types of Applications using REST API/SDK

We will want to support building these types of applications using the SDK.

TODO: Can we identify external customer application types as well?

Command Line Tools

  • Azure ACR CLI
  • Docker CLI (uses Docker /v2 endpoints)
  • Azure PowerShell for ACR

UI for registry management

  • Azure Portal ACR Repositories blade
  • VSCode Docker plugin

Application Orchestrators

  • AKS
  • ACI
  • Azure App Services

Public registries

  • MCR uses ACR endpoints from their ingestion pipeline

Security Solutions

  • Azure Security Center

DevOps solutions

  • TODO: Customer?

End user solutions (e.g. ML scenarios)

  • TODO: Customer?

Azure services moving to containers

  • ADO
  • Data Bricks
  • AML

Common functional scenarios

We will want to support implementation of each of these scenarios in the SDK. These are the flows that customers will use to build the above-listed types of applications. We will classify these scenarios as common/advanced so we can design the simplest APIs for the most common scenarios.

Registry Management

Push image/artifact

Use /v2 endpoints to upload layers (blobs) and manifest

See: https://github.com/sajayantony/acr-cli/blob/main/Services/ContentStore.cs#L127

Pull image/artifact

Use /v2 endpoints to download layers (blobs) and manifest

See: https://github.com/sajayantony/acr-cli/blob/main/Services/ContentStore.cs#L31

Deserializing Manifest from File

See: https://github.com/sajayantony/acr-cli/blob/main/Services/ContentStore.cs#L85

Mount

Mount a blob from another repository

TODO: Is this only for layers, or would we support it for manifests or other blobs as well?

Querying

  • Page through repositories
  • Page through tags, potentially ordering by last update time

Metadata

Create, get, update, delete on metadata for repository, manifest, tags.

Locking images/artifacts

Set read/write permissions on images

Authentication

  • AAD authentication within the context of the SDK.
  • TODO: Will customers need an access token outside the SDK and want that from the SDK?
  • Note: We will not support Basic Auth as described here in the Track 2 library

Non-image artifacts

  1. OCI-compliant artifacts
  2. Helm charts
  3. TODO: Other?

Data Plane Tasks

-TODO: What functionality does the service support here? What apps would be built on it? -TODO: Data plane task endpoints will need to be added to the Swagger file.

Note: this functionality is internal-only and won't be exposed in Track 2 client.

Asks we'll need to look into

  • TODO: Go client library?
  • TODO: Support for DockerHub? (not just ACR registries)
  • TODO: Other functionality the service supports that is not currently described in the service's Swagger file?
  • TODO: Will we need to support application/vnd.docker.distribution.manifest.v1+json manifests, or can we leave this functionality out entirely and throw exceptions if we see this media type?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment