[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Logging multiple builds

On 9 July 2014 19:50, Tomasz Rybak <tomasz.rybak@post.pl> wrote:
Dnia 2014-07-09, śro o godzinie 09:15 +0200, Anders Ingemann pisze:
[ cut ]

> Rewriting the main module to be more composable has been on my todo
> list for a while.
> Especially because I would like to start writing some integration
> tests that test the entire bootstrapping process.
> I'll take a look at it in the coming days.

OK, thanks for the info.
Can you look at it to allow for better usage in the scripts?
I personally care about ability to build some AMIs
(or maybe images for other clouds), and to get their identifiers
to be able to run them and later delete them.

Best regards.

Tomasz Rybak  GPG/PGP key ID: 2AD5 9860
Fingerprint A481 824E 7DD3 9C0E C40A  488E C654 FB33 2AD5 9860

I just pushed to the dev branch, try giving it a go. I haven't had the time to create scripts myself yet, but there are some major improvements.
* Manifest now takes a dict as an option, so you don't have to have the manifests lying around on disk (e.g. you can create them dynamically)
* logging is now set up through a separate function
* run() takes the actual manifest as an argument
* main() is much smaller (meaning you can quite easily replicate what it does)

To run the bootstrapping process multiple times through python you basically just need to:
* set up logging once (you can use setup_loggers for that)
* create the manifest (Manifest(data="">)
* call run() (it no longer takes the verbatim docopt dict btw)


Reply to: