How to use foreman to provision new servers

> hi all, is there a detailed tutorial to provision a new server with
> foreman? I found
> http://engineering.yakaz.com/managing-an-infrastructure-datacenter-with-foreman-and-puppet.htmlbut failed with the same issue as
> http://engineering.yakaz.com/managing-an-infrastructure-datacenter-with-foreman-and-puppet.html
> .
>
> I guessed I need to edit pxelinux.cfg/default manually after hitting
> "Build PXE Default", right? any material I can refer?
>
> thank you very much!

what exactly is the error? missing menu?

the installer adds the menu.c32 etc files, but afaik, pxelinux fallback
gracefully if menu is not enabled.

if your issue is that it says no tftp proxy found, its probably because you
didnt assign them to any subnet.

Ohad

··· On Fri, Sep 14, 2012 at 8:17 AM, gm wrote:


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

Hi Ohad,

Thank you for the prompt reply,

the error is missing menu:

TFTP prefix:

Trying to load: pxelinux.cfg/default
Could not find kernel iMage: Menu
boot:

the pxelinux.cfg/default content is:

DEFAULT menu
PROMPT 0
MENU TITLE PXE Menu
TIMEOUT 200
TOTALTIMEOUT 6000
ONTIMEOUT local

LABEL local
MENU LABEL (local)
MENU DEFAULT
LOCALBOOT 0

··· On Friday, September 14, 2012 1:45:01 PM UTC+8, ohad wrote: > > > > On Fri, Sep 14, 2012 at 8:17 AM, gm <sgm...@gmail.com >wrote: > >> hi all, is there a detailed tutorial to provision a new server with >> foreman? I found >> http://engineering.yakaz.com/managing-an-infrastructure-datacenter-with-foreman-and-puppet.htmlbut failed with the same issue as >> http://engineering.yakaz.com/managing-an-infrastructure-datacenter-with-foreman-and-puppet.html >> . >> >> I guessed I need to edit pxelinux.cfg/default manually after hitting >> "Build PXE Default", right? any material I can refer? >> >> thank you very much! > > > what exactly is the error? missing menu? > > the installer adds the menu.c32 etc files, but afaik, pxelinux fallback > gracefully if menu is not enabled. > > if your issue is that it says no tftp proxy found, its probably because > you didnt assign them to any subnet. > > Ohad > >> >> -- >> 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/-/lDTpCYc1FBQJ. >> 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. >> > >

>
> Hi Ohad,
>
> Thank you for the prompt reply,
>
> the error is missing menu:
Ok, I guess you didn't use the installer… you can either copy menu.c32 to
your tftproot or change the default pxe template not to include the menu
statements.

Its strange as I remembered pxelinux falling back to text mode if menu is
not installed

Ohad
>
> TFTP prefix:
>
> Trying to load: pxelinux.cfg/default
> Could not find kernel iMage: Menu
> boot:
>
> the pxelinux.cfg/default content is:
>
> DEFAULT menu
> PROMPT 0
> MENU TITLE PXE Menu
> TIMEOUT 200
> TOTALTIMEOUT 6000
> ONTIMEOUT local
>
> LABEL local
> MENU LABEL (local)
> MENU DEFAULT
> LOCALBOOT 0
>
>
>
>
>
>>
>>
>>
>>>
>>> hi all, is there a detailed tutorial to provision a new server with
foreman? I found


failed with the same issue as


.
>>>
>>> I guessed I need to edit pxelinux.cfg/default manually after hitting
"Build PXE Default", right? any material I can refer?
>>>
>>> thank you very much!
>>
>>
>> what exactly is the error? missing menu?
>>
>> the installer adds the menu.c32 etc files, but afaik, pxelinux fallback
gracefully if menu is not enabled.
>>
>> if your issue is that it says no tftp proxy found, its probably because
you didnt assign them to any subnet.
>>
>> Ohad
>>>
>>>
>>> –
>>> 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/-/lDTpCYc1FBQJ.
>>> 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.
>>
>>
> –
> 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/-/8lZYCU1fbfcJ.
>
> 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.
··· בתאריך 14 בספט 2012 09:33, מאת "gm" : > On Friday, September 14, 2012 1:45:01 PM UTC+8, ohad wrote: >> On Fri, Sep 14, 2012 at 8:17 AM, gm wrote:

Hi Ohad,

What is "installer" you mentioned? I used syslinux:

syslinux-common: /usr/lib/syslinux/menu.c32

after copied the menu.c32 to /var/lib/tftpboot, the client can load menu
but the PXE MENU is : (local)
Booting from local disk…
PXE-MOF: Exiting intel PXE ROM.
Operating System not found.

··· On Friday, September 14, 2012 3:09:42 PM UTC+8, ohad wrote: > > > בתאריך 14 בספט 2012 09:33, מאת "gm" <sgm...@gmail.com >: > > > > Hi Ohad, > > > > Thank you for the prompt reply, > > > > the error is missing menu: > Ok, I guess you didn't use the installer... you can either copy menu.c32 > to your tftproot or change the default pxe template not to include the menu > statements. > > Its strange as I remembered pxelinux falling back to text mode if menu is > not installed > > Ohad > > > > TFTP prefix: > > > > Trying to load: pxelinux.cfg/default > > Could not find kernel iMage: Menu > > boot: > > > > the pxelinux.cfg/default content is: > > > > DEFAULT menu > > PROMPT 0 > > MENU TITLE PXE Menu > > TIMEOUT 200 > > TOTALTIMEOUT 6000 > > ONTIMEOUT local > > > > LABEL local > > MENU LABEL (local) > > MENU DEFAULT > > LOCALBOOT 0 > > > > > > > > > > > > On Friday, September 14, 2012 1:45:01 PM UTC+8, ohad wrote: > >> > >> > >> > >> On Fri, Sep 14, 2012 at 8:17 AM, gm wrote: > >>> > >>> hi all, is there a detailed tutorial to provision a new server with > foreman? I found > http://engineering.yakaz.com/managing-an-infrastructure-datacenter-with-foreman-and-puppet.htmlbut failed with the same issue as > http://engineering.yakaz.com/managing-an-infrastructure-datacenter-with-foreman-and-puppet.html > . > >>> > >>> I guessed I need to edit pxelinux.cfg/default manually after hitting > "Build PXE Default", right? any material I can refer? > >>> > >>> thank you very much! > >> > >> > >> what exactly is the error? missing menu? > >> > >> the installer adds the menu.c32 etc files, but afaik, pxelinux fallback > gracefully if menu is not enabled. > >> > >> if your issue is that it says no tftp proxy found, its probably because > you didnt assign them to any subnet. > >> > >> Ohad > >>> > >>> > >>> -- > >>> 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/-/lDTpCYc1FBQJ. > >>> 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. > >> > >> > > -- > > 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/-/8lZYCU1fbfcJ. > > > > 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. >

bellow is the content of PXE Default File:

DEFAULT menu
PROMPT 0
TIMEOUT 200
TOTALTIMEOUT 6000
MENU TITLE PXE Menu
ONTIMEOUT local

LABEL local
MENU LABEL (local)
MENU DEFAULT
LOCALBOOT 0

<% for profile in @profiles -%>
LABEL <%= "#{profile[:template]} - #{profile[:hostgroup]}" %>
kernel <%=
profile[:hostgroup].operatingsystem.kernel(profile[:hostgroup].architecture)
%>
<% case profile[:hostgroup].operatingsystem.pxe_type -%>
<% when "kickstart" -%>
append initrd=<%=
profile[:hostgroup].operatingsystem.initrd(profile[:hostgroup].architecture)
%> ks=<%= default_template_url(profile[:template], profile[:hostgroup]) %>
ksdevice=bootif network kssendmac
<% when "preseed" -%>
append initrd=<%=
profile[:hostgroup].operatingsystem.initrd(profile[:hostgroup].architecture)
%> interface=auto url=<%= default_template_url(profile[:template],
profile[:hostgroup]) %> ramdisk_size=10800 root=/dev/rd/0 rw auto
hostname=unassigned-hostname locale=en_US console-setup/ask_detect=false
console-setup/layout=USA console-setup/variant=USA
<% end -%>

<% end -%>

··· On Friday, September 14, 2012 3:21:55 PM UTC+8, gm wrote: > > Hi Ohad, > > What is "installer" you mentioned? I used syslinux: > > syslinux-common: /usr/lib/syslinux/menu.c32 > > after copied the menu.c32 to /var/lib/tftpboot, the client can load menu > but the PXE MENU is : (local) > Booting from local disk........ > PXE-MOF: Exiting intel PXE ROM. > Operating System not found. > > On Friday, September 14, 2012 3:09:42 PM UTC+8, ohad wrote: >> >> >> בתאריך 14 בספט 2012 09:33, מאת "gm" : >> > >> > Hi Ohad, >> > >> > Thank you for the prompt reply, >> > >> > the error is missing menu: >> Ok, I guess you didn't use the installer... you can either copy menu.c32 >> to your tftproot or change the default pxe template not to include the menu >> statements. >> >> Its strange as I remembered pxelinux falling back to text mode if menu is >> not installed >> >> Ohad >> > >> > TFTP prefix: >> > >> > Trying to load: pxelinux.cfg/default >> > Could not find kernel iMage: Menu >> > boot: >> > >> > the pxelinux.cfg/default content is: >> > >> > DEFAULT menu >> > PROMPT 0 >> > MENU TITLE PXE Menu >> > TIMEOUT 200 >> > TOTALTIMEOUT 6000 >> > ONTIMEOUT local >> > >> > LABEL local >> > MENU LABEL (local) >> > MENU DEFAULT >> > LOCALBOOT 0 >> > >> > >> > >> > >> > >> > On Friday, September 14, 2012 1:45:01 PM UTC+8, ohad wrote: >> >> >> >> >> >> >> >> On Fri, Sep 14, 2012 at 8:17 AM, gm wrote: >> >>> >> >>> hi all, is there a detailed tutorial to provision a new server with >> foreman? I found >> http://engineering.yakaz.com/managing-an-infrastructure-datacenter-with-foreman-and-puppet.htmlbut failed with the same issue as >> http://engineering.yakaz.com/managing-an-infrastructure-datacenter-with-foreman-and-puppet.html >> . >> >>> >> >>> I guessed I need to edit pxelinux.cfg/default manually after hitting >> "Build PXE Default", right? any material I can refer? >> >>> >> >>> thank you very much! >> >> >> >> >> >> what exactly is the error? missing menu? >> >> >> >> the installer adds the menu.c32 etc files, but afaik, pxelinux >> fallback gracefully if menu is not enabled. >> >> >> >> if your issue is that it says no tftp proxy found, its probably >> because you didnt assign them to any subnet. >> >> >> >> Ohad >> >>> >> >>> >> >>> -- >> >>> 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/-/lDTpCYc1FBQJ. >> >>> 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. >> >> >> >> >> > -- >> > 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/-/8lZYCU1fbfcJ. >> > >> > 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. >> >

bellow is the content of PXE Default File:

DEFAULT menu
PROMPT 0
TIMEOUT 200
TOTALTIMEOUT 6000
MENU TITLE PXE Menu
ONTIMEOUT local

LABEL local
MENU LABEL (local)
MENU DEFAULT
LOCALBOOT 0

<% for profile in @profiles -%>
LABEL <%= "#{profile[:template]} - #{profile[:hostgroup]}" %>
kernel <%=
profile[:hostgroup].operatingsystem.kernel(profile[:hostgroup].architecture)
%>
<% case profile[:hostgroup].operatingsystem.pxe_type -%>
<% when "kickstart" -%>
append initrd=<%=
profile[:hostgroup].operatingsystem.initrd(profile[:hostgroup].architecture)
%> ks=<%= default_template_url(profile[:template], profile[:hostgroup]) %>
ksdevice=bootif network kssendmac
<% when "preseed" -%>
append initrd=<%=
profile[:hostgroup].operatingsystem.initrd(profile[:hostgroup].architecture)
%> interface=auto url=<%= default_template_url(profile[:template],
profile[:hostgroup]) %> ramdisk_size=10800 root=/dev/rd/0 rw auto
hostname=unassigned-hostname locale=en_US console-setup/ask_detect=false
console-setup/layout=USA console-setup/variant=USA
<% end -%>

<% end -%>

··· On Friday, September 14, 2012 3:21:55 PM UTC+8, gm wrote: > > Hi Ohad, > > What is "installer" you mentioned? I used syslinux: > > syslinux-common: /usr/lib/syslinux/menu.c32 > > after copied the menu.c32 to /var/lib/tftpboot, the client can load menu > but the PXE MENU is : (local) > Booting from local disk........ > PXE-MOF: Exiting intel PXE ROM. > Operating System not found. > > On Friday, September 14, 2012 3:09:42 PM UTC+8, ohad wrote: >> >> >> בתאריך 14 בספט 2012 09:33, מאת "gm" : >> > >> > Hi Ohad, >> > >> > Thank you for the prompt reply, >> > >> > the error is missing menu: >> Ok, I guess you didn't use the installer... you can either copy menu.c32 >> to your tftproot or change the default pxe template not to include the menu >> statements. >> >> Its strange as I remembered pxelinux falling back to text mode if menu is >> not installed >> >> Ohad >> > >> > TFTP prefix: >> > >> > Trying to load: pxelinux.cfg/default >> > Could not find kernel iMage: Menu >> > boot: >> > >> > the pxelinux.cfg/default content is: >> > >> > DEFAULT menu >> > PROMPT 0 >> > MENU TITLE PXE Menu >> > TIMEOUT 200 >> > TOTALTIMEOUT 6000 >> > ONTIMEOUT local >> > >> > LABEL local >> > MENU LABEL (local) >> > MENU DEFAULT >> > LOCALBOOT 0 >> > >> > >> > >> > >> > >> > On Friday, September 14, 2012 1:45:01 PM UTC+8, ohad wrote: >> >> >> >> >> >> >> >> On Fri, Sep 14, 2012 at 8:17 AM, gm wrote: >> >>> >> >>> hi all, is there a detailed tutorial to provision a new server with >> foreman? I found >> http://engineering.yakaz.com/managing-an-infrastructure-datacenter-with-foreman-and-puppet.htmlbut failed with the same issue as >> http://engineering.yakaz.com/managing-an-infrastructure-datacenter-with-foreman-and-puppet.html >> . >> >>> >> >>> I guessed I need to edit pxelinux.cfg/default manually after hitting >> "Build PXE Default", right? any material I can refer? >> >>> >> >>> thank you very much! >> >> >> >> >> >> what exactly is the error? missing menu? >> >> >> >> the installer adds the menu.c32 etc files, but afaik, pxelinux >> fallback gracefully if menu is not enabled. >> >> >> >> if your issue is that it says no tftp proxy found, its probably >> because you didnt assign them to any subnet. >> >> >> >> Ohad >> >>> >> >>> >> >>> -- >> >>> 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/-/lDTpCYc1FBQJ. >> >>> 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. >> >> >> >> >> > -- >> > 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/-/8lZYCU1fbfcJ. >> > >> > 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. >> >

The Foreman Installer that Ohad mentions is detailed here:
http://theforeman.org/projects/foreman/wiki/Using_Puppet_Module_ready_to_use

As for PXE, it looks like it's working so far - you're getting the
'default' PXE file, which does indeed simply exit and boot from disk.
So that seems to be working fine. The next stage is to see what
happens when you create a new host - it should create a file in your
pxelinux config directory based on the MAC of the new machine. You can
test that easily by either creating a new host, or pressing the Build
button for an existing managed host.

If that creates the MAC file, the host should be able to use it when
it boots up. If not, there's a problem in the TFTP subsystem
somewhere.

Hope that helps,
Greg

Hi Greg,
thanks for the update, there was no MAC files be created either using
creat new host or using Build butteon, what is supposed to be wrong
with my TFTP ? How to debug?
Thanks,

··· On Sep 14, 5:35 pm, Greg Sutcliffe wrote: > The Foreman Installer that Ohad mentions is detailed here:http://theforeman.org/projects/foreman/wiki/Using_Puppet_Module_ready... > > As for PXE, it looks like it's working so far - you're getting the > 'default' PXE file, which does indeed simply exit and boot from disk. > So that seems to be working fine. The next stage is to see what > happens when you create a new host - it *should* create a file in your > pxelinux config directory based on the MAC of the new machine. You can > test that easily by either creating a new host, or pressing the Build > button for an existing managed host. > > If that creates the MAC file, the host should be able to use it when > it boots up. If not, there's a problem in the TFTP subsystem > somewhere. > > Hope that helps, > Greg

Only the default file was created when I hit the Build button, no MAC*
related file were created.

··· On Sep 16, 10:04 am, gm wrote: > Hi Greg, > thanks for the update, there was no MAC files be created either using > creat new host or using Build butteon, what is supposed to be wrong > with my TFTP ? How to debug? > Thanks, > > On Sep 14, 5:35 pm, Greg Sutcliffe wrote: > > > > > The Foreman Installer that Ohad mentions is detailed here:http://theforeman.org/projects/foreman/wiki/Using_Puppet_Module_ready... > > > As for PXE, it looks like it's working so far - you're getting the > > 'default' PXE file, which does indeed simply exit and boot from disk. > > So that seems to be working fine. The next stage is to see what > > happens when you create a new host - it *should* create a file in your > > pxelinux config directory based on the MAC of the new machine. You can > > test that easily by either creating a new host, or pressing the Build > > button for an existing managed host. > > > If that creates the MAC file, the host should be able to use it when > > it boots up. If not, there's a problem in the TFTP subsystem > > somewhere. > > > Hope that helps, > > Greg- Hide quoted text - > > - Show quoted text -

I assume the Host you tested with was a Managed Host, and assigned to
the same network as the proxy? If so, I would look in the proxy logs
to see why it didn't write a TFTP file. You may need to change the
proxy settings.yaml and change the logging to :debug

··· On 16 September 2012 03:58, gm wrote: > Only the default file was created when I hit the Build button, no MAC* > related file were created.