Please help to shift paradigm from puppet masterles setup to Foreman ENC

Hello.

We currently have puppet masterless setup. All modules stored in one dir,
like this:

> ├── smi_assets
> ├── smi_common
> ├── smi_site_smi
> ├── smi_site_smi_aws
> ├── smi_site_smsilicon
> ├── smi_site_smware
> ├── smi_sudo
> ├── smi_zabbix
> └── stdlib
>
This directory mounted to every server via nfs.
We have 4 different sites, and 4 entry point, that specified params for
puppet classes, and run "common" module.
On every server we have cron job, that run puppet.
In "common" class we have all classes running in exact order, like this:

> class{'smi_common::resolver': } ->
> class{'smi_common::devnode::sudo': } ->
> class{'smi_common::ntp': } ->
> class{'smi_common::devnode::user_ssh_configs': } ->
> class{'smi_common::devnode::profile_local': } ->
> class{'smi_common::puppet': } ->
> class{'smi_common::pkg_managers': } ->
> class{'smi_common::devnode::pkg_essentials': } ->
>

I have already set up "The Foreman" for provisioning, and it works very
good.
When I started to move classes to foreman puppet server, add them to
foreman group, u have forced with problem, that there is no mechanism for
order classes applying.

  1. How define order of classes applying ?

  2. Can I define class parametrs for all hosts in a single file, and not
    override in with foreman web interface? How to point foreman to that file?

  3. How to debug puppet changes before executing on all hosts? With
    masterless setup I could test chnges on one server, and than commit to
    share directory. But how to debug with clent-server?

BR,
Alex

> 1) How define order of classes applying ?

As part of the ENC specification from Puppet, ENCs (including Foreman)
have no control over the order in which classes are applied. You need
to ensure that each class defined in the ENC contains sufficient
ordering statements to correctly compile.

> 2) Can I define class parametrs for all hosts in a single file, and not
> override in with foreman web interface? How to point foreman to that file?

No, there's no way to do this from Foreman. You could potentially use
Hiera and Puppet 3's databindings to fill in missing class parameters,
but that's beyond the scope of this discussion, I think.

> 3) How to debug puppet changes before executing on all hosts? With
> masterless setup I could test chnges on one server, and than commit to share
> directory. But how to debug with clent-server?

Generally people use multiple Puppet environments, and make test
changes in a "dev" environment before pushing the changes to the
"prod" environment.

Greg

··· On 18 March 2014 17:46, Alex B wrote: