Hi Kashif,
you can use Foreman only for provisioning and keep your Puppet server completely
separate. This also means your duplicating some of your work because you want to
define hostgroups (profiles) in Foreman for provisioning purposes and then you
have to do the same in Puppet/Hiera. Am I correct in assuming you're using
something like 'node n { p = hiera('profile'); create_resources(class, p) }' ?
Foreman manages dhcp entries using a smart proxy which runs on an isc dhcp
server and adds permanent leases to the dhcp server via the server's omapi
interface. How you set up the dhcp server is up to you as long as long as the
smart proxy can access the omapi interface. If you have an external dhcp server
which is outside of your control then your next-server solution is your best
choice. Currently, I only have one dhcp server in my Foreman testbed. I still
need to test a redundancy set up with a second server (similar to what we have
now). I intent to let Foreman add leases to all dhcp servers, but this won't
stop me from adding manual entries if I want to because the dhcp server is
configured by a Puppet module that I choose.
Cheers,
Robert
On 24/11/15 11:15, Kashif Mohammad wrote:
> Hi Robert
>
>> I'm still looking into using foreman for our provisioning. We don't use it in
>> production yet. Take anything I'm going to say with a grain of salt.
>>
>> I haven't encountered any problems with Foreman's Puppet integration. You
>> can get all the classes which are defined on the Puppet master and assign
>> them to nodes. You also have access to the facts and can use them in
>> templates, the catch is that Puppet needs to have run at least once on the
>> node for the facts to be available in Foreman.
>> As for Hiera, there doesn't seem to be any direct integration of Hiera in
>> Foreman, you can't modify your Hiera configuration from within Foreman.
>> Instead they use smart variables which are being passed as class parameters
>> via the ENC.
>> This should only work for parameterized classes, it shouldn't work with
>> classes that contain direct Hiera calls. It works similar to Hiera, you can define
>> or override parameters on each level of your node definition hierarchy
>> (global, host groups, host).
>> I haven't tried smart variables myself with Puppet, because I have no
>> intention of using them. We will keep writing our profile manifests and only
>> use Foreman to assign profiles or classes to hosts and keep writing the Hiera
>> configuration files ourselves. It would be nice if the backend of the smart
>> variables could be configured to write Hiera configuration files rather than
>> using the ENC.
>
> Not able to use direct Hiera call was one of the reasons that I didn't stick with foreman last time. I am actually mainly looking for provisioning part and assigning nodes to profile through hiera. I haven't installed dhcp with foreman and want to use external dhcp server and point to foreman server as Next Server from there. Are you using same kind of setup ?
>
> Thanks
>
> Kashif
>> Cheers,
>> Robert
>>
>> On 24/11/15 09:08, Kashif Mohammad wrote:
>>> Hi All
>>>
>>> Is anyone using foreman for provisioning with puppet and Hiera for config
>> management? I tried it long time back and at that time integration with
>> puppet was quite buggy. I am looking to replace our local IT setup and
>> foreman is one of the options. I installed foreman 1.9 and seems lot of things
>> have changed in new release.
>>>
>>> Cheers
>>>
>>> Kashif
>>>
>>>
>>>
>>>
>>>
|