Story #5027

Updated by over 2 years ago

h1. Motivation

There are currently two upload workflows for Pulp 3 users. Most plugins are encouraged to provide support for the latter.

h3. Basic Upload

1. Create a repository named 'foo'
2. Upload an artifact
3. Create content unit
4. Create a new repository version of 'foo' from the content unit

h3. Smart Upload

1. Create a repository name 'foo'
2. Upload content unit and create a repository version

The Smart Upload for the Docker plugin needs to support creating repository versions using a docker client.

h1. Smart Upload for Docker

1. Create a repository named 'foo'
2. docker tag docker tag 0e5574283393 <pulp-hostname>:24817/foo
3. docker push <pulp-hostname>:24817/foo

Step 3 above creates a new repository version of 'foo' that contains a manifest '0e5574283393', a tag 'latest' pointing to the manifest, and all other manifests and blobs associated with manifest '0e5574283393'. The latest repository version of 'foo' can be consumed using docker client

4. docker pull <pulp-hostname>:24817/foo

h1. Required REST APIs

h3. /v2/ - GET

h3. /v2/<repository-name>/blobs/<digest> - HEAD, GET

h3. /v2/<repository-name>/blobs/<digest>/uploads - POST

h3. /v2/<repository-name>/blobs/<digest>/uploads/<uuid> - HEAD, GET, PUT, PATCH

h3. /v2/<repository-name>/manifests/<digest or tag> - HEAD, GET, PUT

etherpad for reference for the endpoints