Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

duffle relocate for thick bundles #705

Closed
glyn opened this issue Apr 10, 2019 · 5 comments · Fixed by #782
Closed

duffle relocate for thick bundles #705

glyn opened this issue Apr 10, 2019 · 5 comments · Fixed by #782
Assignees
Labels

Comments

@glyn
Copy link
Contributor

glyn commented Apr 10, 2019

The scope of this issue is to extend duffle relocate to relocate oci and docker images from a thick bundle.

Example usage:

duffle relocate thickbundle.tgz path/to/relocated.json --input-bundle-is-file --output-bundle-is-file --repository-prefix=example.com/user 

Note that the output is a thin bundle: the images will reside in repositories and do not need to be kept in the output bundle.

glyn added a commit to glyn/duffle that referenced this issue Apr 25, 2019
@GreenCee
Copy link

One thing I'd like to do is figure out if we would need to separate out the command with a switch namespace or something else that'll indicate this is for OCI images and the associated registry.
I see parallel implementations for VM images and functions or other artifacts

So to fully relocate a fancy thick bundle with all 3 like below it would be

duffle relocate thickbundle.tgz path/to/relocated.json --input-bundle-is-file --output-bundle-is-file --repository-prefix=example.com/user
'duffle relocate thickbundle.tgz path/to/relocated.json --input-bundle-is-file --output-bundle-is-file --
vm-blob-container=mydisks'
'duffle relocate thickbundle.tgz path/to/relocated.json --input-bundle-is-file --output-bundle-is-file --lambda-s3-bucket=lambda/functions'

OR

'duffle relocate thickbundle.tgz path/to/relocated.json --input-bundle-is-file --output-bundle-is-file --lambda-s3-bucket=lambda/functions --vm-blob-container=mydisks --repository --prefix=example.com/user'

Does that sound like a reasonable approach? I don't want to explode complexity in branching if it's better to just have
'duffle relocate oci ...' and 'duffle relocate vm ...'

@glyn
Copy link
Contributor Author

glyn commented Apr 29, 2019

@GreenCee I agree that needs figuring out in due course. Maybe the minimal support required for this issue is to fail the command when an image type other than oci or docker is encountered.

Then when we figure out the way we want to support other image types, probably for a whole set of commands such as import, export, push, pull, relocate, etc., we can implement a backwards compatible change to duffle relocate by making the command succeed when it encounters those other image types.

Does that seem reasonable?

glyn added a commit to glyn/duffle that referenced this issue Apr 29, 2019
@glyn glyn self-assigned this Apr 30, 2019
glyn added a commit to glyn/duffle that referenced this issue Apr 30, 2019
glyn added a commit to glyn/duffle that referenced this issue May 7, 2019
glyn added a commit to glyn/duffle that referenced this issue May 9, 2019
@glyn glyn changed the title duffle relocate for thick bundles based on OCI image layouts duffle relocate for thick bundles May 9, 2019
@glyn
Copy link
Contributor Author

glyn commented May 9, 2019

Does that seem reasonable?

I assumed it was.

@glyn
Copy link
Contributor Author

glyn commented May 9, 2019

Broadened the scope of this issue to thick bundles containing just oci and docker images in either tar files or an OCI image layout.

@ghost ghost added the review label May 9, 2019
glyn added a commit to glyn/duffle that referenced this issue May 9, 2019
glyn added a commit to glyn/duffle that referenced this issue May 10, 2019
glyn added a commit to glyn/duffle that referenced this issue May 10, 2019
glyn added a commit to glyn/duffle that referenced this issue May 10, 2019
TODO: See FIXME(glyn in PR741)

Fixes cnabio#705
glyn added a commit to glyn/duffle that referenced this issue May 10, 2019
TODO: See FIXME(glyn in PR741)

Fixes cnabio#705
glyn added a commit to glyn/duffle that referenced this issue May 10, 2019
TODO: See FIXME(glyn in PR741)

Fixes cnabio#705
glyn added a commit to glyn/duffle that referenced this issue May 10, 2019
TODO: See FIXME(glyn in PR741)

Fixes cnabio#705
glyn added a commit to glyn/duffle that referenced this issue May 10, 2019
TODO: See FIXME(glyn in PR741)

Fixes cnabio#705
glyn added a commit to glyn/duffle that referenced this issue May 10, 2019
glyn added a commit to glyn/duffle that referenced this issue May 10, 2019
glyn added a commit to glyn/duffle that referenced this issue May 10, 2019
glyn added a commit to glyn/duffle that referenced this issue May 13, 2019
glyn added a commit to glyn/duffle that referenced this issue May 20, 2019
glyn added a commit to glyn/duffle that referenced this issue May 23, 2019
glyn added a commit to glyn/duffle that referenced this issue Jun 12, 2019
@glyn
Copy link
Contributor Author

glyn commented Jun 19, 2019

Now that thick bundles store images in OCI image layouts only, we no longer need to support storage of images in tar files. Also, we should support relocation mapping files (see cnabio/cnab-spec#195 and #778).

glyn added a commit to glyn/duffle that referenced this issue Jun 19, 2019
Rough first cut - currently fails some unit tests.

Fixes cnabio#705
glyn added a commit to glyn/duffle that referenced this issue Jun 19, 2019
Rough first cut - currently fails some unit tests.

Fixes cnabio#705
glyn added a commit to glyn/duffle that referenced this issue Jun 20, 2019
glyn added a commit to glyn/duffle that referenced this issue Jun 20, 2019
glyn added a commit to glyn/duffle that referenced this issue Jul 9, 2019
glyn added a commit to glyn/duffle that referenced this issue Jul 10, 2019
glyn added a commit to glyn/duffle that referenced this issue Jul 15, 2019
glyn added a commit to glyn/duffle that referenced this issue Jul 18, 2019
glyn added a commit to glyn/duffle that referenced this issue Jul 18, 2019
glyn added a commit to glyn/duffle that referenced this issue Jul 23, 2019
@glyn glyn closed this as completed in #782 Jul 23, 2019
glyn added a commit that referenced this issue Jul 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
2 participants