DB recomendations

So I've been using foreman since around mid 0.3. Following a lot of the
information on the site I went the route of integrating the foreman DB into
our puppet storeconfigs DB.

Now puppetDB is coming and I want to take a look at that. I think
I'm seeing that foreman doesn't integrate with that. I think I've also
noticed that perhaps its recommended even when using storeconfigs to not to
have them share a DB as best practice now?

So given either of the above statements are true I'm left wondering what I
need to do to move forward. Like I said, I'd like to try out puppetDB. So
it seems that I need to have foreman start using its own database.
Questions I have about this are:

  1. Should I have foreman continue to use the 'puppet storeconfigs db' I
    have now and just have puppet stop using it once I go to puppetDB or should
    I create a new fresh DB for foreman?
  2. I'm thinking that creating a new fresh DB for foreman would be best, but
    how would I go about migrating data to the new DB?
  3. I think the big reason I went the integrated route to begin with was
    from reading
    Puppet Facts - Foreman.
    If I am going to be separating them then how are facts/values now made
    available to foreman? Do I need to do one of the imports detailed on the
    page I referenced or are there newer/better methods that are not yet
    documented? Does any of the methods continue to work with puppetDB?
  4. Anything else you think I should be aware of?? :slight_smile:

Thanks!
Jake

> So I've been using foreman since around mid 0.3. Following a lot of the
> information on the site I went the route of integrating the foreman DB into
> our puppet storeconfigs DB.
>
> Now puppetDB is coming and I want to take a look at that. I think
> I'm seeing that foreman doesn't integrate with that. I think I've also
> noticed that perhaps its recommended even when using storeconfigs to not to
> have them share a DB as best practice now?
>

I hope be happy to look into using PuppetDB, however at the moment its

  1. not main stream
  2. doesnt work with older versions of puppet
    since we care a lot about our existing users, we don't want to drop just
    yet the support for traditional puppet setups.

> So given either of the above statements are true I'm left wondering what I
> need to do to move forward. Like I said, I'd like to try out puppetDB. So
> it seems that I need to have foreman start using its own database.
> Questions I have about this are:
>
> 1) Should I have foreman continue to use the 'puppet storeconfigs db' I
> have now and just have puppet stop using it once I go to puppetDB or should
> I create a new fresh DB for foreman?
>

as far as it goes to storeconfigs / foreman on the same db, we've worked
really hard to make them compatible, and they are, they only exception is
with this upcoming 1.0 release (nearly ready, any day now;) is with the
uuid for certname support, which we did not find a way to overcome, so if
you don't use that feature, you can keep on using them on the same db until
it would be more clear whats planned / possible with puppetdb.

> 2) I'm thinking that creating a new fresh DB for foreman would be best,
> but how would I go about migrating data to the new DB?
>

dbdump > new db? && sed 's/storeconfig/foreman_db/' config/database.yml

> 3) I think the big reason I went the integrated route to begin with was
> from reading
> Puppet Facts - Foreman.
> If I am going to be separating them then how are facts/values now made
> available to foreman? Do I need to do one of the imports detailed on the
> page I referenced or are there newer/better methods that are not yet
> documented? Does any of the methods continue to work with puppetDB?
>

simply use the enc script from foreman installer, this uploads the facts
prior to asking the enc output, imho, this is the best way to upload facts,
as they are avail in foreman before foreman gives back the enc result (so
dynamic stuff like smart vars can use the facts for decisions too).

> 4) Anything else you think I should be aware of?? :slight_smile:
>

Good luck :slight_smile:

Ohad

··· On Wed, Jun 20, 2012 at 4:49 PM, jmccann wrote:

Thanks!
Jake


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/foreman-users/-/4e9U0gATlcgJ.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Thanks for the response ohad!

>
>> 2) I'm thinking that creating a new fresh DB for foreman would be best,
>> but how would I go about migrating data to the new DB?
>>
>
> dbdump > new db? && sed 's/storeconfig/foreman_db/' config/database.yml
>
>

Yes, this will work … and it pretty much the same as if I just kept using
the old storeconfigs DB as the foreman DB after making a switch to
puppetDB. I didn't know if would be better/necessary to try and clean up
elements from storeconfigs DB that are not needed by foreman by moving just
the needed data to a new DB. I guess its OK to just leave it there. :slight_smile:

I'll have to check the latest ENC script. I'm using the one provided from
long ago, and probably some updates have been made since then. :slight_smile:

Thanks so much,
Jake