Merge lp://staging/~ltrager/maas-images/import into lp://staging/maas-images
Status: | Merged |
---|---|
Merged at revision: | 231 |
Proposed branch: | lp://staging/~ltrager/maas-images/import |
Merge into: | lp://staging/maas-images |
Diff against target: |
1261 lines (+1187/-1) 7 files modified
bin/maas-qcow2targz (+105/-0) conf/centos.yaml (+19/-0) curtin/centos6/curtin-hooks (+342/-0) curtin/centos6/finalize (+100/-0) curtin/centos7/curtin-hooks (+333/-0) curtin/centos7/finalize (+100/-0) meph2/commands/meph2_util.py (+188/-1) |
To merge this branch: | bzr merge lp://staging/~ltrager/maas-images/import |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
maintainers of maas images | Pending | ||
Review via email:
|
Description of the change
This is a different approach from the create patch(https:/
* The import command reads from a specified yaml file which defines the source of the images, the content_id of the stream, a template for the product_id, and the versions to be downloaded
* I found that CentOS provides generic cloud images which use the standard kernel and have cloud-init preinstalled in qcow2 format. Since they don't provide a simplestream containing these images but do provide a sha256sum.txt in a static location I use that as the source of my metadata.
* CentOS uses a date stamp as their version similar to how we use it so I just pull that string out as the simplestream version. Since CentOS published two versions of CentOS 7.0 we import two versions.
* To convert the qcow file into a root-tgz I use a shell script. I had to use a number of shell commands and it seemed easier to subprocess out to one script instead of multiple commands(also wanted to get the nice progress bar wget gives you when downloading the images).
* The script requires a kernel with the nbd module, mount-image-
* CentOS 7.0 has deprecated python-oauth in favor of python-oauth2. This is despite the fact that the version of cloud-init that they ship with uses python-oauth in /usr/lib/
* The curtin files were written by Blake which I pulled from http://
Example usage:
meph2-util import centos.yaml out
Example com.ubuntu.
http://
Example index.json:
http://
I also created the merge subcommand which allows you to merge two simplestreams with different content_ids into one index.json file. The existing insert subcommand requires them to be the same.
Example usage:
meph2-util merge /path/to/centos/ /path/to/daily
Example combined index.json:
http://
generally, your shell needs lots more quotes. and white spaces are mixed with tabs in bin/maas-qcow2targz .
- add '# vi: ts=4 expandtab' so that at least vi will do the right thing.
could you please run 'flake8' on the pythonn files and fix those errors?