Clarification on PXE boot with foreman_discovery

I would like to see if my understanding of how foreman_discovery pxe boot
works, matches reality:

New hardware

··· --- 1) Buy a machine preconfigured with PXE boot 2) Stick in rack, and power on 3) foreman_discovery finds it, installs tiny kernel, runs puppet facts, and stores results in foreman 4) Foreman uses facts to find what is the desired os 5) Foreman sets machine to PXE boot, again 6) Foreman reboots machine 7) Foreman hands final OS to machine, and it installs 8) Foreman sets boot to disk 9) Foreman runs puppet

Repurpose existing hardware

  1. Foreman? sets machine to PXE boot on next restart
  2. Foreman reboots machine
    3-8) same as above

Is this how it all works? I’ve looked at the foreman_discovery code and I’m
not seeing any code to enable “Repurpose existing hardware”. Does Foreman
actually do step 8? I didn’t see the code for that either.

Hello,

> 1) Buy a machine preconfigured with PXE boot
> 2) Stick in rack, and power on
> 3) foreman_discovery finds it, installs tiny kernel, runs puppet facts, and
> stores results in foreman
> 4) Foreman uses facts to find what is the desired os

Not yet, you currently need to manually click on Provision button and
assign things like OS yourself. Using Host Group this is just two
clicks.

We would like to automate this in long-term but the feature is not there
yet.

> 5) Foreman sets machine to PXE boot, again
> 6) Foreman reboots machine
> 7) Foreman hands final OS to machine, and it installs
> 8) Foreman sets boot to disk

Just to clarify - the BIOS/UEFI is still configured to boot from the
network, but Foreman configures TFTP to boot from local drive. Until you
want to rebuild it - then it switches it to boot into installer again.

> 9) Foreman runs puppet

Other that that - this is exactly what Foreman Discovery does.

> Repurpose existing hardware
> —
> 1) Foreman? sets machine to PXE boot on next restart
> 2) Foreman reboots machine
> 3-8) same as above

Yeah, we call this Build mode. You click on Build button and after
confirmation (this destroys the server!) you can reboot (manually or via
IPMI/hypervisor from Foreman).

> Is this how it all works? I've looked at the foreman_discovery code and I'm
> not seeing any code to enable "Repurpose existing hardware". Does Foreman
> actually do step 8? I didn't see the code for that either.

This code resides in the Foreman core, if you visit your host detail,
you will see the mentioned Build button and if you configure IPMI you
should see Start/Stop/Restart buttons as well.

What is your use case? Share with us your environment you are building.

Have a nice weekend. Good luck with the Foreman!

··· -- Later, Lukas #lzap Zapletal

I was wondering about that. I have BMC enabled and added a BMC interface
to it.

But where is the reboot button or action?

Kind regards,

Jorick Astrego
Netbulae

··· On 08/15/2014 10:37 AM, Lukas Zapletal wrote: > >> Repurpose existing hardware >> --- >> 1) Foreman? sets machine to PXE boot on next restart >> 2) Foreman reboots machine >> 3-8) same as above > Yeah, we call this Build mode. You click on Build button and after > confirmation (this destroys the server!) you can reboot (manually or via > IPMI/hypervisor from Foreman). >

I've never tried this yet,

but if you configure IPMI on your smart proxy, then you should see the
Reboot button right on the hosts page.

More details in our manual.

Someone to confirm please.

LZ

··· On Fri, Aug 15, 2014 at 02:00:14PM +0200, Jorick Astrego wrote: > > On 08/15/2014 10:37 AM, Lukas Zapletal wrote: > > > >>Repurpose existing hardware > >>--- > >>1) Foreman? sets machine to PXE boot on next restart > >>2) Foreman reboots machine > >>3-8) same as above > >Yeah, we call this Build mode. You click on Build button and after > >confirmation (this destroys the server!) you can reboot (manually or via > >IPMI/hypervisor from Foreman). > > > I was wondering about that. I have BMC enabled and added a BMC interface to > it. > > But where is the reboot button or action? > > Kind regards, > > Jorick Astrego > Netbulae > > -- > 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 foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.


Later,
Lukas #lzap Zapletal

Ok, then it's a bug as it's not there. The things in the manual I
already read and it's not that complex :wink:

Jorick

··· On 08/18/2014 03:59 PM, Lukas Zapletal wrote: > I've never tried this yet, > > but if you configure IPMI on your smart proxy, then you should see the > Reboot button right on the hosts page. > > More details in our manual. > > Someone to confirm please. > > LZ > > On Fri, Aug 15, 2014 at 02:00:14PM +0200, Jorick Astrego wrote: >> On 08/15/2014 10:37 AM, Lukas Zapletal wrote: >>>> Repurpose existing hardware >>>> --- >>>> 1) Foreman? sets machine to PXE boot on next restart >>>> 2) Foreman reboots machine >>>> 3-8) same as above >>> Yeah, we call this Build mode. You click on Build button and after >>> confirmation (this destroys the server!) you can reboot (manually or via >>> IPMI/hypervisor from Foreman). >>> >> I was wondering about that. I have BMC enabled and added a BMC interface to >> it. >> >> But where is the reboot button or action? >> >> Kind regards, >> >> Jorick Astrego >> Netbulae >> >> -- >> 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 foreman-users+unsubscribe@googlegroups.com. >> To post to this group, send email to foreman-users@googlegroups.com. >> Visit this group at http://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/d/optout.