[katello-devel] Another take on Component Outlines

Dominic Cleal dcleal at redhat.com
Thu Jan 17 10:24:43 UTC 2013


On 17/01/13 10:05, Lukas Zapletal wrote:
> On Wed, Jan 16, 2013 at 06:12:15PM +0000, Dmitri Dolguikh wrote:
>> There are a couple of issues around system subscriptions and puppet
>> classes: it's possible that selected puppet class is not covered
>> (completely or partially) by the subscriptions. How should such a
>> situation be handled? One possible approach is to provision the
>> system and alert the user about the problems with subscriptions.
>> Ideally we should warn the user during Component Outline creation,
>> this would require ability to execute provisioning in a dry-run
>> mode, and should be considered for subsequent iterations.
> 
> That is possible, but we will never know in advance. Puppet is a DSL
> language, but there are more ways how to install package (you could do
> it possible via "exec 'yum install xyz'"). The only reliable way to
> check the Puppet codebase is to run it.
> 
> What we could do is to extend Foreman which already parses AST Puppet
> tree to some level to retrieve all package statements from there. But
> again, we would cover only cases when a package is installed using the
> package statement (should be 99 per cent I believe).

I see what you're getting at, and it sounds like a neat feature.  It
seems unnecessarily complex to begin with though.

One step up from the AST is to generate the catalog for a given node
against Foreman's ENC, which means variable, class and conditional
resolution is all complete.  It's then quite simple to pull out all
packages that it'd be installing and compare against subscriptions.

>> Do we need to support parameters in Component Outlines (Foreman's
>> hostgroups have them)?
> 
> I am not sure for the user (I guess so), but we will definitely need to
> pass some internal parameters to Foreman, like activation_key or
> kickstart token.

I think these are necessary if the user is able to write their own
provisioning templates, since they'll need to use parameters in there
for some tasks.  As an example, the stock kickstart uses the parameter
"ntp-server" to sync time during the build, which you won't want to
specify on every single host.

-- 
Dominic Cleal
Red Hat Engineering




More information about the katello-devel mailing list