Merge lp://qastaging/~gabriel-samfira/curtin/curtin-disk-image into lp://qastaging/~curtin-dev/curtin/trunk

Proposed by Gabriel Samfira
Status: Merged
Merged at revision: 134
Proposed branch: lp://qastaging/~gabriel-samfira/curtin/curtin-disk-image
Merge into: lp://qastaging/~curtin-dev/curtin/trunk
Diff against target: 369 lines (+205/-17)
11 files modified
curtin/block/__init__.py (+35/-0)
curtin/commands/block_meta.py (+27/-0)
curtin/commands/curthooks.py (+5/-0)
curtin/commands/extract.py (+16/-9)
curtin/commands/hook.py (+1/-5)
curtin/commands/in_target.py (+1/-1)
curtin/commands/install.py (+9/-1)
curtin/commands/net_meta.py (+6/-0)
curtin/util.py (+48/-0)
examples/basic.yaml (+3/-1)
examples/finalize.windows (+54/-0)
To merge this branch: bzr merge lp://qastaging/~gabriel-samfira/curtin/curtin-disk-image
Reviewer Review Type Date Requested Status
curtin developers Pending
Review via email: mp+222956@code.qastaging.launchpad.net

Description of the change

This branch adds the possibility to use disk images with curtin.

* added the possibility to specify image type in command line in the form of tgz:http://example.com/img or dd:http://example.com/img.
* added config option for sources to be able to specify the type of the image:

sources:
 05_primary:
  uri: "http://cloud-images.ubuntu.com/releases/precise/release/ubuntu-12.04-server-cloudimg-amd64-root.tar.gz"
  type: "tgz"

* old config and command line variants still work, and default to tgz
* curt-hooks, net-meta will now look for os.path.join(target, 'opt/curtin', hook_name) before executing the buitin. If a hook is present, then the builtin will not be executed
  * curthooks --> curtin-hooks
  * net-meta --> network-config
* in-target will simply exit on windows systems
* extract will ignore all dd images

To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

This looks really good.
I have a couple little things:
 a.) I think generally, don't gate 'in-target' on curtin's heuristics on whether or not it will work. if someone said to run in-target, then run in target and fail.
 b.) we can remove for now the "get_target_os" stuff. I'm not opposed to having curtin helpers for that, but I dont think they're necessary
 c.) to aid in finding the root device, lets change our path for looking for curtin info from /opt/curtin to just /curtin. The OS will then need to have 'curtin' directory on the root filesystem.

And then, even though we *shouldnt* be fixing ubuntu, we still need to for legacy.
if the image does not have /curtin, then curtin should fix ubuntu. I think it does, just make sure.

Thanks.!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches