Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

Documentation: commands: add image extract/render/show #649

Closed
wants to merge 1 commit into from

Conversation

philips
Copy link
Contributor

@philips philips commented Mar 20, 2015

Some initial thoughts to close out #633 and #645.

@philips
Copy link
Contributor Author

philips commented Mar 20, 2015

cc @jonboulle @bcwaldon thoughts?

@philips philips force-pushed the rocket-extract-doc branch 2 times, most recently from 9e7eea5 to dd4fa3e Compare March 20, 2015 20:44
### rkt image cat-file

For debugging or inspection you may want to extract an ACI manifest to stdout or any other file.
If you want a file other than the manifest provide it after the image argument.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this default behavior is really useful. I'd actually like to see a rkt image cat-file which has no default argument and pulls from the rootfs alongside a rkt image cat-manifest

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hrm, I made a typo in this but the idea was rkt image cat-file coreos.com/etcd rootfs/README.md and rkt image cat-file coreos.com/etcd manifest

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed as much. I still like the idea of two commands so you don't have to worry about remembering rootfs/. Maybe that's not an issue, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I don't know if it is an issue or not. As long as things are consistent.

@eyakubovich
Copy link
Contributor

This is not really rkt specific -- it's just ACI manipulation. Should it be in actool instead? If we want it to work with rkt cas, it would need to be in rkt, of course.

@philips
Copy link
Contributor Author

philips commented Mar 20, 2015

@eyakubovich It is exporting stuff out of the CAS, it shouldn't fetch I don't think.

@jonboulle
Copy link
Contributor

@eyakubovich see previous discussion in #633, this should only be Rocket-specific stuff

@philips
Copy link
Contributor Author

philips commented Mar 24, 2015

How is everyone feeling on this proposal turning into code at this point? @eyakubovich @jonboulle @bcwaldon ?

@eyakubovich
Copy link
Contributor

Seems reasonable. Another useful sub-command would be to list contents. When working with tarballs, rpms, debs, I often just want to list the filenames in the package.

@philips philips added this to the v0.6.0 milestone Mar 26, 2015
@philips
Copy link
Contributor Author

philips commented Mar 26, 2015

cc @robszumski We need to think through the various subcommands in rkt a bit. Any thoughts on adding this sort of stuff?

@robszumski
Copy link
Contributor

Subcommands aren't as discoverable but at some point you have so many commands that there isn't really a choice. A lot of tools pick tricky naming like foo list-images but you can easily remember it as foo image-list and it gets frustrating quickly. It might make sense to create a new issue that lists out all the current and planned commands to see how they work work as regular commands vs with subcommands.

@sgotti
Copy link
Contributor

sgotti commented Mar 26, 2015

As the cas can contain multiple images with the same name the user should be able to choose them in a more precise way.

I propose to also standardize the URL like app name format. Ex. coreos.com/etcd:v2.0.5,os=linux,arch=amd64

So on the implementation side cas.GetACI can be directly used to find the best image.

Additionally the cas can also contain images with completely identical name and labels. They can be distinguished by 2 criteria:

  • ImageID
  • UrlLike image and import time (assuming no images are imported at the same time)

While the first is obviously just ready to get rendered the second will need a new function to find it.

I think that the doc and future implementation should also handle these options.

@jonboulle
Copy link
Contributor

@sgotti it sounds like you want to formalise something like this? appc/spec#4

@sgotti
Copy link
Contributor

sgotti commented Apr 1, 2015

@jonboulle Yeah as it's probably going to be used by various commands.

@kelseyhightower
Copy link
Contributor

Do we expect users to type coreos.com/etcd:v2.0.5,os=linux,arch=amd64? It seems that coreos.com/etcd:v2.0.5 should be enough to get the right image for the current os and arch.

@kelseyhightower
Copy link
Contributor

I agree with @robszumski that it would be nice to consider the number of subcommands we have and how they fit together.

@kelseyhightower
Copy link
Contributor

@philips Does this solve the docker images experience as well? Over time I will fetch many ACIs and it would be nice to be able to run something like rkt images to get a list of those ACIs.

@jonboulle
Copy link
Contributor

Do we expect users to type coreos.com/etcd:v2.0.5,os=linux,arch=amd64? It seems that coreos.com/etcd:v2.0.5 should be enough to get the right image for the current os and arch.

@kelseyhightower os/arch would continue to be substituted in with defaults as they are today

@philips
Copy link
Contributor Author

philips commented Apr 14, 2015

On Sun, Apr 12, 2015 at 6:32 PM, Kelsey Hightower
notifications@github.com wrote:

@philips Does this solve the docker images experience as well? Over time I will fetch many ACIs and it would be nice to be able to run something like rkt images to get a list of those ACIs.

I think so. I don't know exactly what problem you are thinking of
here. Can you be more specific @kelseyhightower.

@sgotti
Copy link
Contributor

sgotti commented Apr 15, 2015

Does this solve the docker images experience as well? Over time I will fetch many ACIs and it would be nice to be able to run something like rkt images to get a list of those ACIs.

@kelseyhightower For image listing I opened #587. By now it's an images command but it should become something like image list.

In #603 there's image removal and in comment #603 (comment) @philips proposed to call it image remove.

yifan-gu referenced this pull request in yifan-gu/kubernetes May 6, 2015
Replace getImageID() with getImageByName(), this can remove the
dependency on rkt.store.
@yifan-gu
Copy link
Contributor

yifan-gu commented May 8, 2015

I am going to give rkt image cat-file a try because I will need to use it to get image manifest for rkt in k8s. Anything more you guys want to talk about this?

@jonboulle
Copy link
Contributor

I had the same concern as bcwaldon about the semantic, how about cat-manifest and cat-file (which does not require rootfs/ prefix) ?

@yifan-gu
Copy link
Contributor

yifan-gu commented May 9, 2015

@jonboulle SGTM. Actually in the implementation, the manifest can be read from the store without rendering the ACI. And I think the manifest will be cat'd more frequently than some binary files in rootfs ...

@iaguis
Copy link
Member

iaguis commented Jul 8, 2015

We'll handle this in #1098

@iaguis iaguis closed this Jul 8, 2015
@jonboulle
Copy link
Contributor

woot woot!

On Wed, Jul 8, 2015 at 3:07 AM, Iago López Galeiras <
notifications@github.com> wrote:

Closed #649 #649.


Reply to this email directly or view it on GitHub
#649 (comment).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants