Bug 986177

Summary: command-line tool to debug kickstart templates/snippets
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: schedulerAssignee: Raymond Mancy <rmancy>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 0.9CC: abourne, aigao, alemay, asaha, azelinka, bnater, bpeck, dcallagh, dkovalsk, ebaak, jingwang, llim, lockhart, qwan, rbiba, rmancy, xjia
Target Milestone: 0.15.3Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: UX
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 817795 Environment:
Last Closed: 2014-02-03 04:52:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 593663    

Description Dan Callaghan 2013-07-19 06:51:49 UTC
+++ 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.

Comment 1 Raymond Mancy 2013-12-17 04:54:31 UTC
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.

Comment 2 Dan Callaghan 2013-12-17 05:11:58 UTC
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.

Comment 3 Raymond Mancy 2013-12-17 05:27:49 UTC
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.

Comment 4 andrew 2013-12-20 17:27:41 UTC
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.

Comment 5 Raymond Mancy 2014-01-13 01:46:13 UTC
By doing something like: 

    beaker-test-kickstart --ks-meta skipx

Comment 6 Raymond Mancy 2014-01-16 02:57:50 UTC
http://gerrit.beaker-project.org/#/c/2690/

Comment 10 Nick Coghlan 2014-02-03 04:52:26 UTC
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