Export / generate node definition from foreman DB

Hello all,

I'm currently testing foreman, thinking of integrating it with our
current puppet setup and trying to think ahead: what if one day I
would like to migrate from foreman to another solution? or just
rollback to basic puppet setup, with the nodes defined in manifests/
site.pp.

Was wondering if there was any script already lying around somewhere
that could rebuild node definition in puppet code extracting data from
foreman db.

Searched the mailing list a bit but did not find any thread related to
this subject.

Any suggestions as to how to address this question is mostly
welcomed :slight_smile:

Ben

There aren't any tools to do this as far as I know, as there isn't any
demand. (Seems people migrate to Foreman and really like it.)
However, Foreman has a robust REST API, and writing such a script
should be trivial.

Cheers,
Brian

··· On Fri, Nov 16, 2012 at 2:05 PM, Ben wrote: > Hello all, > > I'm currently testing foreman, thinking of integrating it with our > current puppet setup and trying to think ahead: what if one day I > would like to migrate from foreman to another solution? or just > rollback to basic puppet setup, with the nodes defined in manifests/ > site.pp. > > Was wondering if there was any script already lying around somewhere > that could rebuild node definition in puppet code extracting data from > foreman db. > > Searched the mailing list a bit but did not find any thread related to > this subject. > > Any suggestions as to how to address this question is mostly > welcomed :) > > Ben > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > 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. >

Apropos REST API: Is the API complete, i mean can all relevant data be
exported and imported with it?

thx,
Peter

··· Am Freitag, 16. November 2012 20:07:27 UTC+1 schrieb Ben: > > Hello all, > > I'm currently testing foreman, thinking of integrating it with our > current puppet setup and trying to think ahead: what if one day I > would like to migrate from foreman to another solution? or just > rollback to basic puppet setup, with the nodes defined in manifests/ > site.pp. > > Was wondering if there was any script already lying around somewhere > that could rebuild node definition in puppet code extracting data from > foreman db. > > Searched the mailing list a bit but did not find any thread related to > this subject. > > Any suggestions as to how to address this question is mostly > welcomed :) > > Ben >

Thanks for the quick reply and confirming what I was suspecting.

Reformating the yaml produced by the REST API is indeed something I
had thought about.

One goal of this enquiry was also to ask if someone had already
designed such a script

Thanks!
Ben.

··· On Nov 16, 2:13 pm, Brian Gupta wrote: > There aren't any tools to do this as far as I know, as there isn't any > demand. (Seems people migrate to Foreman and really like it.) > However, Foreman has a robust REST API, and writing such a script > should be trivial. > > Cheers, > Brian > > > > > > > > On Fri, Nov 16, 2012 at 2:05 PM, Ben wrote: > > Hello all, > > > I'm currently testing foreman, thinking of integrating it with our > > current puppet setup and trying to think ahead: what if one day I > > would like to migrate from foreman to another solution? or just > > rollback to basic puppet setup, with the nodes defined in manifests/ > > site.pp. > > > Was wondering if there was any script already lying around somewhere > > that could rebuild node definition in puppet code extracting data from > > foreman db. > > > Searched the mailing list a bit but did not find any thread related to > > this subject. > > > Any suggestions as to how to address this question is mostly > > welcomed :) > > > Ben > > > -- > > You received this message because you are subscribed to the Google Groups "Foreman users" group. > > 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 athttp://groups.google.com/group/foreman-users?hl=en.

> Thanks for the quick reply and confirming what I was suspecting.
>
> Reformating the yaml produced by the REST API is indeed something I
> had thought about.
>
> One goal of this enquiry was also to ask if someone had already
> designed such a script
>
>
Since foreman provides data to puppet in a standardize format (ENC), its
trivial to take any ENC output (foreman other otherwise) and either convert
it to another ENC or to a nodes statement.

Foreman actually has the ability to import from another ENC (exactly in the
same way).

Writing such a script should not be a big deal, if you need help, let us
know and I'm sure we can scatch something up.

Ohad

··· On Fri, Nov 16, 2012 at 11:01 PM, Ben wrote:

Thanks!
Ben.

On Nov 16, 2:13 pm, Brian Gupta brian.gu...@brandorr.com wrote:

There aren’t any tools to do this as far as I know, as there isn’t any
demand. (Seems people migrate to Foreman and really like it.)
However, Foreman has a robust REST API, and writing such a script
should be trivial.

Cheers,
Brian

On Fri, Nov 16, 2012 at 2:05 PM, Ben b...@etincelle.org wrote:

Hello all,

I’m currently testing foreman, thinking of integrating it with our
current puppet setup and trying to think ahead: what if one day I
would like to migrate from foreman to another solution? or just
rollback to basic puppet setup, with the nodes defined in manifests/
site.pp.

Was wondering if there was any script already lying around somewhere
that could rebuild node definition in puppet code extracting data from
foreman db.

Searched the mailing list a bit but did not find any thread related to
this subject.

Any suggestions as to how to address this question is mostly
welcomed :slight_smile:

Ben


You received this message because you are subscribed to the Google
Groups “Foreman users” group.

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 athttp://
groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
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.

I am currently working on improving the API and adding documentation.
It should be merged this week.

Joseph Magen
Redhat

··· On Sat, Nov 17, 2012 at 6:45 PM, Peter Bauer wrote: > > Apropos REST API: Is the API complete, i mean can all relevant data be exported and imported with it? > > thx, > Peter > > Am Freitag, 16. November 2012 20:07:27 UTC+1 schrieb Ben: >> >> Hello all, >> >> I'm currently testing foreman, thinking of integrating it with our >> current puppet setup and trying to think ahead: what if one day I >> would like to migrate from foreman to another solution? or just >> rollback to basic puppet setup, with the nodes defined in manifests/ >> site.pp. >> >> Was wondering if there was any script already lying around somewhere >> that could rebuild node definition in puppet code extracting data from >> foreman db. >> >> Searched the mailing list a bit but did not find any thread related to >> this subject. >> >> Any suggestions as to how to address this question is mostly >> welcomed :) >> >> Ben > > -- > 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/-/Qs_Hm2r1aTcJ. > > 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.

Good news!
Does this mean the API will be complete with the auto-generated Ruby API
bindings available with Foreman 1.1?
That would be great for semi-automatic pre-configuration of Foreman and of
course backup/restore.

Peter

··· Am Samstag, 17. November 2012 23:44:13 UTC+1 schrieb Joseph Magen: > > I am currently working on improving the API and adding documentation. > It should be merged this week. > > Joseph Magen > Redhat > > > On Sat, Nov 17, 2012 at 6:45 PM, Peter Bauer <peter....@gmail.com> > wrote: > > > > Apropos REST API: Is the API complete, i mean can all relevant data be > exported and imported with it? > > > > thx, > > Peter > > > > Am Freitag, 16. November 2012 20:07:27 UTC+1 schrieb Ben: > >> > >> Hello all, > >> > >> I'm currently testing foreman, thinking of integrating it with our > >> current puppet setup and trying to think ahead: what if one day I > >> would like to migrate from foreman to another solution? or just > >> rollback to basic puppet setup, with the nodes defined in manifests/ > >> site.pp. > >> > >> Was wondering if there was any script already lying around somewhere > >> that could rebuild node definition in puppet code extracting data from > >> foreman db. > >> > >> Searched the mailing list a bit but did not find any thread related to > >> this subject. > >> > >> Any suggestions as to how to address this question is mostly > >> welcomed :) > >> > >> Ben > > > > -- > > 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/-/Qs_Hm2r1aTcJ. > > > > To post to this group, send email to forema...@googlegroups.com. > > > To unsubscribe from this group, send email to > foreman-user...@googlegroups.com . > > For more options, visit this group at > http://groups.google.com/group/foreman-users?hl=en. >

I think that the auto-generated API bindings will be a separate project or
gem. I assume the installer will include this in the 1.1 release, but
can't say for sure.

Joseph

··· On Sunday, November 18, 2012 7:49:57 PM UTC+2, Peter Bauer wrote: > > Good news! > Does this mean the API will be complete with the auto-generated Ruby API > bindings available with Foreman 1.1? > That would be great for semi-automatic pre-configuration of Foreman and of > course backup/restore. > > Peter > > Am Samstag, 17. November 2012 23:44:13 UTC+1 schrieb Joseph Magen: >> >> I am currently working on improving the API and adding documentation. >> It should be merged this week. >> >> Joseph Magen >> Redhat >> >> >> On Sat, Nov 17, 2012 at 6:45 PM, Peter Bauer >> wrote: >> > >> > Apropos REST API: Is the API complete, i mean can all relevant data be >> exported and imported with it? >> > >> > thx, >> > Peter >> > >> > Am Freitag, 16. November 2012 20:07:27 UTC+1 schrieb Ben: >> >> >> >> Hello all, >> >> >> >> I'm currently testing foreman, thinking of integrating it with our >> >> current puppet setup and trying to think ahead: what if one day I >> >> would like to migrate from foreman to another solution? or just >> >> rollback to basic puppet setup, with the nodes defined in manifests/ >> >> site.pp. >> >> >> >> Was wondering if there was any script already lying around somewhere >> >> that could rebuild node definition in puppet code extracting data from >> >> foreman db. >> >> >> >> Searched the mailing list a bit but did not find any thread related to >> >> this subject. >> >> >> >> Any suggestions as to how to address this question is mostly >> >> welcomed :) >> >> >> >> Ben >> > >> > -- >> > 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/-/Qs_Hm2r1aTcJ. >> > >> > To post to this group, send email to forema...@googlegroups.com. >> > To unsubscribe from this group, send email to >> foreman-user...@googlegroups.com. >> > For more options, visit this group at >> http://groups.google.com/group/foreman-users?hl=en. >> >

> I think that the auto-generated API bindings will be a separate project or
> gem. I assume the installer will include this in the 1.1 release, but
> can't say for sure.
>
> they are a separate project - see https://rubygems.org/gems/foreman_api

Ohad

··· On Mon, Nov 19, 2012 at 9:37 AM, Joseph Magen wrote:

Joseph

On Sunday, November 18, 2012 7:49:57 PM UTC+2, Peter Bauer wrote:

Good news!
Does this mean the API will be complete with the auto-generated Ruby API
bindings available with Foreman 1.1?
That would be great for semi-automatic pre-configuration of Foreman and
of course backup/restore.

Peter

Am Samstag, 17. November 2012 23:44:13 UTC+1 schrieb Joseph Magen:

I am currently working on improving the API and adding documentation.
It should be merged this week.

Joseph Magen
Redhat

On Sat, Nov 17, 2012 at 6:45 PM, Peter Bauer peter....@gmail.com >>> wrote:

Apropos REST API: Is the API complete, i mean can all relevant data be
exported and imported with it?

thx,
Peter

Am Freitag, 16. November 2012 20:07:27 UTC+1 schrieb Ben:

Hello all,

I’m currently testing foreman, thinking of integrating it with our
current puppet setup and trying to think ahead: what if one day I
would like to migrate from foreman to another solution? or just
rollback to basic puppet setup, with the nodes defined in manifests/
site.pp.

Was wondering if there was any script already lying around somewhere
that could rebuild node definition in puppet code extracting data
from

foreman db.

Searched the mailing list a bit but did not find any thread related
to

this subject.

Any suggestions as to how to address this question is mostly
welcomed :slight_smile:

Ben


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/-/Qs_**Hm2r1aTcJhttps://groups.google.com/d/msg/foreman-users/-/Qs_Hm2r1aTcJ.

To post to this group, send email to forema...@googlegroups.com.
To unsubscribe from this group, send email to
foreman-user…@googlegroups.com.
For more options, visit this group at http://groups.google.com/

group/foreman-users?hl=enhttp://groups.google.com/group/foreman-users?hl=en.


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/-/MVXF1qgbTdwJ.

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.