On 22/05/17 14:38, Peter Bittner wrote:
> Dominic,
>  
> 
>     > looks like Foreman expects that you create Puppet classes on the
>     Foreman
>     > UI, but you have to install modules from the command line,
>     directly on
>     > the server
> 
>     You don't "have" to do this, you should probably deploy the Puppet
>     environment and modules from source control using r10k or
>     librarian-puppet. Installing modules by hand is fine for an example
>     (e.g. in documentation), but you should have a better way to do it in
>     practice.
> 
> 
> Thanks for pointing this out. Solves one problem. So, I can add
> dependencies in |Modulefile| or |metadata.json|, and let our CI server
> deploy the changes to the Foreman host.

Yes, Modulefile usually.

>     Changes to hosts and their assigned Puppet classes made through the
>     Foreman UI should have audit entries created under Monitor > Audits,
>     but
>     there's no rollback mechanism.
> 
> 
> A question aside: Where is the Puppet configuration that was (is) used
> by `foreman-install`? I suspected it to live under
> `/etc/puppetlabs/code/environments/production/`, but no it's not. I need
> the configuration of the Foreman host be under version control right
> after completing the installation. Only this will allow me to apply
> changes to the host in a controlled manner. Is it thrown away after the
> installation was completed?

The modules are in /usr/share/foreman-installer/modules, and the
parameters used are in
/etc/foreman-installer/scenarios.d/foreman-answers.yaml. You can add the
modules to your modulepath (via an environment.conf), or fetch them from
Puppet Forge etc.

>     If you want to version control host/node classification, then you'd be
>     much better off doing that inside your Puppet manifests and data files,
>     then deploying it alongside the modules in your Puppet environment from
>     source control. Foreman would just be used for reporting and
>     provisioning.
> 
> 
> That sounds like what I want.
> 
>     If you want to use Foreman's web UI to manage hosts rather than source
>     control, then do so, and you can still deploy modules in the Puppet
>     environment from source control.
> 
> 
> I don't get that, sorry. What do you intend with "manage host rather
> than source control" (through Foreman's UI)?

Editing hosts via the web UI (or API) to assign classes, assign groups,
modify class parameters etc.

> I want the configuration changes to happen through source control only.
> Forman only for transparency, i.e. reporting, sounds perfect.

Then I'd suggest putting everything into the Puppet environment, forget
Foreman's Puppet class and parameter handling and use Puppet's data
lookup and Hiera to assign classes and parameters to hosts.

-- 
Dominic Cleal
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to