+++ This bug was initially created as a clone of Bug #817795 +++ On bug 817795 John suggested a command-line tool for debugging Beaker's kickstart generation. It would need to take a system FQDN, and perhaps a recipe ID and some other optional parameters, and use the code in bkr.server.kickstart to spit out the same kickstart that Beaker would generate during its provisioning process. The tool should also have some way of supplying an additional lookup directory for templates/snippets, to be inserted at the front of the Jinja ChoiceLoader. Admins can use this to test out modifications to templates/snippets outside of /etc/beaker first, and then copy them into /etc/beaker when the kickstarts are right.
So is the idea to generate a kickstart based (at least partially) on an existing recipe, or is it to see what a kickstart would look like with a recipe that had distro X, arch Y etc? I guess there's no reason why both options could not be implemented.
The simplest case is to generate a kickstart with no associated recipe (that's what happens you do a manual provision). Although you're right, the user would have to supply a distro tree in that case (by its id I suppose). Maybe it could take one or the other: beaker-test-kickstart --snippet-dir ./mysnippets \ --system example.com --distro-tree-id 1234 beaker-test-kickstart --snippet-dir ./mysnippets \ --system example.com --recipe-id 1234 The other improtant option is the user -- by default it could use 'admin', or the user could pass --user someusername. Since this is a server-side command it can't there will be no identity.current.user.
Oh, I didn't realise this was a server side command. So that makes a little bit more sense as to why we would use a distro tree id, and id is the simplest way to for us (developers) to implement it.
So lets say we have some Kickstart Metadata snippets. How to we add that to this? that's really what this to be able to handle.
By doing something like: beaker-test-kickstart --ks-meta skipx
http://gerrit.beaker-project.org/#/c/2690/
This change is included in the Beaker 0.15.3 maintenance release: http://beaker-project.org/docs/whats-new/release-0.15.html#beaker-0-15-3