sdake / heat-jeos

The Heat JEOS tools
Apache License 2.0
6 stars 13 forks source link

heat-jeos image should print out the location of the generated image #3

Closed asalkeld closed 12 years ago

asalkeld commented 12 years ago

unless you know the location of the images you don't know the location of it.

Also what is the point of register? Isn't using glance just as easy?

How about:

sudo -E heat-jeos image F16 x86_64 cfntools ./heat_jeos/jeos/F16-x86_64-cfntools-jeos.tdl
...
Generated image: /var/lib/libvirt/images/F16-x86_64-cfntools-jeos.qcow2

Now register with glance using:
glance add name=F16-x86_64-cfntools is_public=true disk_format=qcow2 container_format=ovf < /var/lib/libvirt/images/F16-x86_64-cfntools-jeos.qcow2
asalkeld commented 12 years ago

It is really confusion to split the image creation into "heat-jeos tdl" and "heat-jeos image"

I didn't realize that I needed to do the first one until my image didn't work and found that the cfn-tools were all of size 0

How about the following:

$ heat-jeos list
Name  Description
--------   ----------------
[lists available tdl, description from within the tdl]

$ heat-jeos create [name of tdl] <- nice and simple
- we make the image name based on the basename of the tdl (no arch, distro, bla bla)
- It does the same as the original "heat jeos create" BUT no glance registration.
- Print out the command needed to register with glance (it is only one command - no point in wrapping it)
- really simple, flexible and not confusing.

$ heat-jeos delete [name of tdl]
tomassedovic commented 12 years ago

I'm in favour of all of these suggestions except for this: I think we should still support a command that does the registration.

Right now when you want to set up heat, you have to do a lot of steps and one of them is:

sudo -E heat-jeos -y create F16 x86_64 cfntools

and it does everything. Now you'd need to have two commands:

sudo -E heat-jeos -y create F16-x86_64-cfntools
glance add name=F16-x86_64-cfntools is_public=true disk_format=qcow2 container_format=ovf < /var/lib/libvirt/images/F16-x86_64-cfntools-jeos.qcow2

It would complicate the getting started guide (the glance command depends on the output of heat-jeos which people could miss) and it would probably be less scriptable.

What if we added a --register-with-glance option to heat-jeos create? We would still print out the resulting image path, the glance command to run, etc. But we'd still have a single command that does it all.

Is there a reason we should tear out glance registration completely?

sdake commented 12 years ago

At the moment I believe we need glance registration as a feature. If Richard Jones does something with registration of images (see http://fedoraproject.org/wiki/Features/OpenStack_using_Oz_for_image_building) it may make more sense to integrate with that upstream longer term.

The suggested flag --register-with-glance makes good sense

Regards -steve

asalkeld commented 12 years ago

OK, sounds good to me. Main point is to make it more obvious to use.

sdake commented 12 years ago

My latest suggestion on mailing list based upon Angus's original thoughts:

heat-jeos list

id distro name distro version arch

F16-x86_64 Fedora 16 x86_64 U10.04.4-amd64 Ubuntu 10.04 amd64 F17-i386 Fedora 16 i386

distro name/version/arc would be parsed from the tdl files

heat-jeos create U10.04.4-amd64 --register-with-glance