Satellite 6 - Scripted/automated import of Puppet classes

Latest response

I am looking for suggestions on automating the Puppet class importation process on the Satellite server in Satellite 6, specifically:

Configure -> Puppet Classes -> Import from satserver.network.local -> [Select all] -> Update

The reason I want to automate this process is that I have setup Puppet modules/manifests to checkout to the Satellite server using a git post commit hook, and I would like to include the 'import/update' process in Satellite in the same hook (to catch any newly created or modified classes).

Responses

Found the solution under the proxy subcommand, not under puppet_classes where I was originally looking.

The ID is the ID of the Satellite Proxy (not clear in hammer CLI help)

hammer --server satserver.network.local --username admin --password password proxy import-classes --id=1

Are you using content views? If so, you could use hammer to import the modules into the custom products that you have created.

Hi Bryan,

Not currently using Content Views as the initial goal was to get existing Puppet infrastructure into Satellite.

I have implemented the role/profile design pattern previously and plan to use Content Views to represent 'roles' in Satellite 6 with profiles defined as top level Puppet classes (does this approach align with their intended purpose?).
http://www.craigdunn.org/2012/05/239/

Once I have 'split up' the Puppet configuration into Content Views I will look at the alternate hammer methods, thanks for the suggestion.

Bryan,

Just following up on your question regarding content views, it appears you can only add Puppet modules to Content Views, not individual Puppet classes imported through 'Configure -> Puppet Classes' , is this correct?

I have used Puppet Config Groups / Host Groups to assign classes. I was surprised to see that you can't specify class parameters at the Config Group level when creating/managing Config Groups. I am now working through moving the workflow to the "pulp-puppet-module-builder" method of importing modules from git.

I am also interested in what the Red Hat suggested method of assigning Puppet classes/modules to hosts on registration is? is it custom product + content views?

Lastly, is using hiera in Satellite 6 a supported configuration? or is it expected that this configuration content will be moved into smart variables? Hiera doesn't appear to be mentioned in the Satellite 6.1 Puppet Guide.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.