Project

Profile

Help

Story #1050

As a user, I can "docker pull" using the v2 API

Added by mhrivnak over 5 years ago. Updated over 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Target Release - Crane:
2.0.0
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Pulp 2
Sprint:
Quarter:

Description

Crane must implement the "docker pull" v2 API. This includes:

GET /v2/

must return 200 and the custom "Docker-Distribution-API-Version" header with value "registry/2.0".

GET /v2/<name>/<path>

must redirect to the corresponding base URL defined for the <name> joined with the relative <path>.

The "redirect files" that crane uses to load data about repositories has been updated for docker V2. The schema for this data file has been bumped to "2", with details here: https://github.com/pulp/pulp_docker/blob/docker_v2_api/docs/tech-reference/distributor.rst#v2-redirect-file

It may be easiest to store these in a new in-memory data structure. So when loading data files, if it is a V1 file keep the current behavior, and if it's a V2 file add the data to a new but similar structure. Then they can be accessed separately by request handlers for /v1 and /v2. In theory, one repo could have content both under /v1 and /v2.

To facilitate easier organization of v1 vs. v2 data files, it is important that crane be able to load them from anywhere within its configured data_dir. So it should look for all json blobs within that directory and any subdirectories, and load them as data files.

Reference: https://github.com/docker/distribution/blob/master/docs/spec/api.md


Checklist


Related issues

Related to Crane - Story #1049: Add v2 concepts to data file schemaCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocks Docker Support - Task #1048: Tracker for Docker v2 API and Manifest workCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 138a4469 View on GitHub
Added by rbarlow over 4 years ago

Add release notes for Crane 2.0.

Also update the docs to note that the data_dir can contain folders now.

https://pulp.plan.io/issues/1050

fixes #1050

History

#1 Updated by mhrivnak over 5 years ago

  • Blocked by Task #1048: Tracker for Docker v2 API and Manifest work added

#2 Updated by mhrivnak over 5 years ago

  • Blocked by deleted (Task #1048: Tracker for Docker v2 API and Manifest work)

#3 Updated by mhrivnak over 5 years ago

  • Blocks Task #1048: Tracker for Docker v2 API and Manifest work added

#4 Updated by mhrivnak over 5 years ago

  • Related to Story #1049: Add v2 concepts to data file schema added

#5 Updated by mhrivnak about 5 years ago

  • Checklist item changed from to [ ] user can "docker pull" using the v2 API, [ ] new data file schema is used to get data about manifests, [ ] add release notes, [ ] add documentation
  • Description updated (diff)
  • Groomed changed from No to Yes

#6 Updated by mhrivnak about 5 years ago

  • Checklist item changed from [ ] user can "docker pull" using the v2 API, [ ] new data file schema is used to get data about manifests, [ ] add release notes, [ ] add documentation to [ ] user can "docker pull" using the v2 API, [ ] new data file schema is used to get data about manifests, [ ] add release notes, [ ] add documentation, [ ] crane walks the whole FS tree within its configured data_dir looking for data files to load
  • Description updated (diff)

#7 Updated by jortel@redhat.com over 4 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to rbarlow

#8 Updated by rbarlow over 4 years ago

  • Checklist item user can "docker pull" using the v2 API set to Done
  • Checklist item new data file schema is used to get data about manifests set to Done
  • Checklist item crane walks the whole FS tree within its configured data_dir looking for data files to load set to Done

#9 Updated by rbarlow over 4 years ago

  • % Done changed from 0 to 80

Documentation is still needed.

#10 Updated by rbarlow over 4 years ago

  • Checklist item add release notes set to Done
  • Checklist item add documentation set to Done
  • Status changed from ASSIGNED to POST
  • % Done changed from 80 to 90
  • Target Release - Crane set to 2.0.0

#11 Updated by rbarlow over 4 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 90 to 100

#12 Updated by rbarlow over 4 years ago

  • Status changed from MODIFIED to 5

#13 Updated by dkliban@redhat.com over 4 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#14 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF