Bug 986177 - command-line tool to debug kickstart templates/snippets
Summary: command-line tool to debug kickstart templates/snippets
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: scheduler
Version: 0.9
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: 0.15.3
Assignee: Raymond Mancy
QA Contact: tools-bugs
URL:
Whiteboard: UX
Depends On:
Blocks: 593663
TreeView+ depends on / blocked
 
Reported: 2013-07-19 06:51 UTC by Dan Callaghan
Modified: 2018-02-06 00:41 UTC (History)
17 users (show)

Fixed In Version:
Clone Of: 817795
Environment:
Last Closed: 2014-02-03 04:52:26 UTC
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.