Common infrastructure for pxe-bootmenus with syslinux?


#1

Hi all,

while preparing some new cookbooks for our needs (shameless plug: [1] &
[2]), I noticed a thing:

There are several cookbooks that set up tftp+syslinux to allow to boot
machines over network to install things or run certain systems.
But the current approach of “every cookbook defines the whole
bootmenu / pxeconfig” makes it impossible to use two of these recipes
together. So for me its not possible to have one pxe server configured
by chef provide a boot menu with entries for x2go thin clients and
ubuntu/debian installs at the same time.
So some recipe/lwrp to configure a common menu and allow plugging of
menus would be in order. Is anyone interested in such a thing?
I will probably start to write one soon, but if there is public
interest a) I can convince my boss that writing this on company time
is good and b) more input from others is always nice.

Have a nice day,

Arnold

[1] X2Go-thinclient-environment:


[2] Clonezilla-Live booting over network:


#2

I was just talking with someone about adding a boot menu to the
pxe_dust cookbook to let you choose which boot option you wanted.
pxe_dust already supports PXE booting different flavors of Debian and
Ubuntu at a time, adding more choices should be fairly
straightforward. I’d be happy to help sort it out for you if you’re
interested.

Thanks,
Matt Ray
Cloud Integrations Product Lead :: Opscode
512.731.2218 :: matt@opscode.com
mattray :: GitHub :: IRC :: Twitter

On Tue, Oct 8, 2013 at 4:10 PM, Arnold Krille arnold@arnoldarts.de wrote:

Hi all,

while preparing some new cookbooks for our needs (shameless plug: [1] &
[2]), I noticed a thing:

There are several cookbooks that set up tftp+syslinux to allow to boot
machines over network to install things or run certain systems.
But the current approach of “every cookbook defines the whole
bootmenu / pxeconfig” makes it impossible to use two of these recipes
together. So for me its not possible to have one pxe server configured
by chef provide a boot menu with entries for x2go thin clients and
ubuntu/debian installs at the same time.
So some recipe/lwrp to configure a common menu and allow plugging of
menus would be in order. Is anyone interested in such a thing?
I will probably start to write one soon, but if there is public
interest a) I can convince my boss that writing this on company time
is good and b) more input from others is always nice.

Have a nice day,

Arnold

[1] X2Go-thinclient-environment:
https://github.com/kampfschlaefer/x2go-cookbook
[2] Clonezilla-Live booting over network:
https://github.com/bcs-de/clonezillalive-cookbook


#3

I have an lwrp for doing this but it was pre-library cook era. I am happy to push up a bare bones lwrp and some example usage if people are interested.

On Oct 8, 2013, at 3:41 PM, Matt Ray matt@opscode.com wrote:

I was just talking with someone about adding a boot menu to the
pxe_dust cookbook to let you choose which boot option you wanted.
pxe_dust already supports PXE booting different flavors of Debian and
Ubuntu at a time, adding more choices should be fairly
straightforward. I’d be happy to help sort it out for you if you’re
interested.

Thanks,
Matt Ray
Cloud Integrations Product Lead :: Opscode
512.731.2218 :: matt@opscode.com
mattray :: GitHub :: IRC :: Twitter

On Tue, Oct 8, 2013 at 4:10 PM, Arnold Krille arnold@arnoldarts.de wrote:

Hi all,

while preparing some new cookbooks for our needs (shameless plug: [1] &
[2]), I noticed a thing:

There are several cookbooks that set up tftp+syslinux to allow to boot
machines over network to install things or run certain systems.
But the current approach of “every cookbook defines the whole
bootmenu / pxeconfig” makes it impossible to use two of these recipes
together. So for me its not possible to have one pxe server configured
by chef provide a boot menu with entries for x2go thin clients and
ubuntu/debian installs at the same time.
So some recipe/lwrp to configure a common menu and allow plugging of
menus would be in order. Is anyone interested in such a thing?
I will probably start to write one soon, but if there is public
interest a) I can convince my boss that writing this on company time
is good and b) more input from others is always nice.

Have a nice day,

Arnold

[1] X2Go-thinclient-environment:
https://github.com/kampfschlaefer/x2go-cookbook
[2] Clonezilla-Live booting over network:
https://github.com/bcs-de/clonezillalive-cookbook


#4

I moved the integrated / recipe bits to the examples directory and pushed this code up. This cook has been running in production for some time. Feel free to build on it, and if someone wants to take it over I am happy to give it to ya.

  • Jesse

On Oct 8, 2013, at 7:10 PM, Jesse Nelson spheromak@gmail.com wrote:

I have an lwrp for doing this but it was pre-library cook era. I am happy to push up a bare bones lwrp and some example usage if people are interested.

On Oct 8, 2013, at 3:41 PM, Matt Ray matt@opscode.com wrote:

I was just talking with someone about adding a boot menu to the
pxe_dust cookbook to let you choose which boot option you wanted.
pxe_dust already supports PXE booting different flavors of Debian and
Ubuntu at a time, adding more choices should be fairly
straightforward. I’d be happy to help sort it out for you if you’re
interested.

Thanks,
Matt Ray
Cloud Integrations Product Lead :: Opscode
512.731.2218 :: matt@opscode.com
mattray :: GitHub :: IRC :: Twitter

On Tue, Oct 8, 2013 at 4:10 PM, Arnold Krille arnold@arnoldarts.de wrote:

Hi all,

while preparing some new cookbooks for our needs (shameless plug: [1] &
[2]), I noticed a thing:

There are several cookbooks that set up tftp+syslinux to allow to boot
machines over network to install things or run certain systems.
But the current approach of “every cookbook defines the whole
bootmenu / pxeconfig” makes it impossible to use two of these recipes
together. So for me its not possible to have one pxe server configured
by chef provide a boot menu with entries for x2go thin clients and
ubuntu/debian installs at the same time.
So some recipe/lwrp to configure a common menu and allow plugging of
menus would be in order. Is anyone interested in such a thing?
I will probably start to write one soon, but if there is public
interest a) I can convince my boss that writing this on company time
is good and b) more input from others is always nice.

Have a nice day,

Arnold

[1] X2Go-thinclient-environment:
https://github.com/kampfschlaefer/x2go-cookbook
[2] Clonezilla-Live booting over network:
https://github.com/bcs-de/clonezillalive-cookbook


#5

Hi,

Am Tue, 8 Oct 2013 17:41:30 -0500 schrieb Matt Ray matt@opscode.com:

I was just talking with someone about adding a boot menu to the
pxe_dust cookbook to let you choose which boot option you wanted.
pxe_dust already supports PXE booting different flavors of Debian and
Ubuntu at a time, adding more choices should be fairly
straightforward. I’d be happy to help sort it out for you if you’re
interested.

I actually use (and like) the pxe_dust cookbook. One of the first
modifications I made was to disable creation of the
pxeconfig.cfg/default file. But more is needed to make that recipe
compatible with other pxe-providing recipes…

I think a recipe doing the basic pxe+syslinux set up would be the first
step. Then the actual menu could be defined either by several calls to
a menu-lwrp or by generating the menu from the nodes attributes, which
would be set/extended by the recipes like my x2go or the pxe_dust…

Actually looking at Jesse Nelsons pxe-cookbook it looks as if this is
what I think is needed. I think I have to test that…
If that proves as usable, it would be nice if opscode took care of it
and also used it in pxe_dust.

Have fun,

Arnold


#6

Hi,

Am Tue, 8 Oct 2013 19:23:03 -0700 schrieb Jesse Nelson
spheromak@gmail.com:

I moved the integrated / recipe bits to the examples directory and
pushed this code up. This cook has been running in production for
some time. Feel free to build on it, and if someone wants to take it
over I am happy to give it to ya.

https://github.com/spheromak/pxe-cookbook

I like that! Thanks!

There are a few nitpicking things:

  • current tftp cookbook has the tftp-directory in
    node[:tftp][:directory] instead of node[:tftp][:dir]
  • It should be configurable what the global default on timeout is and
    if there is a timeout at all.

Do you want pull-request for your repository or should I wait until
Matt Ray picks it up?

Have fun,

Arnold


#7

I’ll merge pr’s and perform basic maintenance just wanted to get the stuff I had out there for others to use. If you want to run with it or Matt wants to that’s great.

There lwrp itself might benefit from some love as it’s pre chef 11 and I was using an experiment in nested resource notification.

-Jesse

On Oct 9, 2013, at 1:51 AM, Arnold Krille arnold@arnoldarts.de wrote:

Hi,

Am Tue, 8 Oct 2013 19:23:03 -0700 schrieb Jesse Nelson
spheromak@gmail.com:

I moved the integrated / recipe bits to the examples directory and
pushed this code up. This cook has been running in production for
some time. Feel free to build on it, and if someone wants to take it
over I am happy to give it to ya.

https://github.com/spheromak/pxe-cookbook

I like that! Thanks!

There are a few nitpicking things:

  • current tftp cookbook has the tftp-directory in
    node[:tftp][:directory] instead of node[:tftp][:dir]
  • It should be configurable what the global default on timeout is and
    if there is a timeout at all.

Do you want pull-request for your repository or should I wait until
Matt Ray picks it up?

Have fun,

Arnold


#8

I’ll definitely take a look at it. I’ve got a 2.0 branch of pxe_dust
that replaces tftp with dnsmasq and adds a handful of other small
features. I was talking about adding a boot menu to allow you to
select PXE OS installation or to boot the hard drive (the default),
this would tie in well. Not sure when I’ll have time for it, but I’d
take the patches.

Thanks,
Matt Ray
Cloud Integrations Product Lead :: Opscode
512.731.2218 :: matt@opscode.com
mattray :: GitHub :: IRC :: Twitter

On Wed, Oct 9, 2013 at 1:38 PM, Jesse Nelson spheromak@gmail.com wrote:

I’ll merge pr’s and perform basic maintenance just wanted to get the stuff I had out there for others to use. If you want to run with it or Matt wants to that’s great.

There lwrp itself might benefit from some love as it’s pre chef 11 and I was using an experiment in nested resource notification.

-Jesse

On Oct 9, 2013, at 1:51 AM, Arnold Krille arnold@arnoldarts.de wrote:

Hi,

Am Tue, 8 Oct 2013 19:23:03 -0700 schrieb Jesse Nelson
spheromak@gmail.com:

I moved the integrated / recipe bits to the examples directory and
pushed this code up. This cook has been running in production for
some time. Feel free to build on it, and if someone wants to take it
over I am happy to give it to ya.

https://github.com/spheromak/pxe-cookbook

I like that! Thanks!

There are a few nitpicking things:

  • current tftp cookbook has the tftp-directory in
    node[:tftp][:directory] instead of node[:tftp][:dir]
  • It should be configurable what the global default on timeout is and
    if there is a timeout at all.

Do you want pull-request for your repository or should I wait until
Matt Ray picks it up?

Have fun,

Arnold


#9

Maybe the best thing would be for the pxe cook I pushed yesterday to end up as a pure library cook and a release on community as pxe_menu. Then people can use whatever they want for handling clients and Matt can use it in pxe_dust. Instead of tftp_dir and a dep on tftp cook I can use a pxe or syslinux attribute namespace for where to generate menu entries.

Matt if u look at the precise.rb examples in the cook I uploaded it is setup to generate entries for hosts from dhcp bags. I wrote all of his almost 2 years ago, and I was integrating pxe with my dhcp and bind cooks. What I uploaded yesterday was a quick hack to make it as much a library cook as I could. I think that’s the right way for this moving forward (vs directly dropping the LWRP in pxe_dust )

All of this started out as pxe_dust. But I needed xenserver and rhel support. This is what I ended up with.

  • Jesse

On Oct 9, 2013, at 12:47 PM, Matt Ray matt@opscode.com wrote:

I’ll definitely take a look at it. I’ve got a 2.0 branch of pxe_dust
that replaces tftp with dnsmasq and adds a handful of other small
features. I was talking about adding a boot menu to allow you to
select PXE OS installation or to boot the hard drive (the default),
this would tie in well. Not sure when I’ll have time for it, but I’d
take the patches.
https://github.com/mattray/pxe_dust-cookbook/tree/2.0

Thanks,
Matt Ray
Cloud Integrations Product Lead :: Opscode
512.731.2218 :: matt@opscode.com
mattray :: GitHub :: IRC :: Twitter

On Wed, Oct 9, 2013 at 1:38 PM, Jesse Nelson spheromak@gmail.com wrote:
I’ll merge pr’s and perform basic maintenance just wanted to get the stuff I had out there for others to use. If you want to run with it or Matt wants to that’s great.

There lwrp itself might benefit from some love as it’s pre chef 11 and I was using an experiment in nested resource notification.

-Jesse

On Oct 9, 2013, at 1:51 AM, Arnold Krille arnold@arnoldarts.de wrote:

Hi,

Am Tue, 8 Oct 2013 19:23:03 -0700 schrieb Jesse Nelson
spheromak@gmail.com:

I moved the integrated / recipe bits to the examples directory and
pushed this code up. This cook has been running in production for
some time. Feel free to build on it, and if someone wants to take it
over I am happy to give it to ya.

https://github.com/spheromak/pxe-cookbook

I like that! Thanks!

There are a few nitpicking things:

  • current tftp cookbook has the tftp-directory in
    node[:tftp][:directory] instead of node[:tftp][:dir]
  • It should be configurable what the global default on timeout is and
    if there is a timeout at all.

Do you want pull-request for your repository or should I wait until
Matt Ray picks it up?

Have fun,

Arnold


#10

Yeah, a pure library cookbook would be good. I’m not eager for
pxe_dust to continue to grow, so using more external cookbooks and
spinning off some functionality into separate cookbooks, like the
chef-client download mirroring, would be a good thing.

Thanks,
Matt Ray
Cloud Integrations Product Lead :: Opscode
512.731.2218 :: matt@opscode.com
mattray :: GitHub :: IRC :: Twitter

On Wed, Oct 9, 2013 at 3:33 PM, Jesse Nelson spheromak@gmail.com wrote:

Maybe the best thing would be for the pxe cook I pushed yesterday to end up as a pure library cook and a release on community as pxe_menu. Then people can use whatever they want for handling clients and Matt can use it in pxe_dust. Instead of tftp_dir and a dep on tftp cook I can use a pxe or syslinux attribute namespace for where to generate menu entries.

Matt if u look at the precise.rb examples in the cook I uploaded it is setup to generate entries for hosts from dhcp bags. I wrote all of his almost 2 years ago, and I was integrating pxe with my dhcp and bind cooks. What I uploaded yesterday was a quick hack to make it as much a library cook as I could. I think that’s the right way for this moving forward (vs directly dropping the LWRP in pxe_dust )

All of this started out as pxe_dust. But I needed xenserver and rhel support. This is what I ended up with.

  • Jesse

On Oct 9, 2013, at 12:47 PM, Matt Ray matt@opscode.com wrote:

I’ll definitely take a look at it. I’ve got a 2.0 branch of pxe_dust
that replaces tftp with dnsmasq and adds a handful of other small
features. I was talking about adding a boot menu to allow you to
select PXE OS installation or to boot the hard drive (the default),
this would tie in well. Not sure when I’ll have time for it, but I’d
take the patches.
https://github.com/mattray/pxe_dust-cookbook/tree/2.0

Thanks,
Matt Ray
Cloud Integrations Product Lead :: Opscode
512.731.2218 :: matt@opscode.com
mattray :: GitHub :: IRC :: Twitter

On Wed, Oct 9, 2013 at 1:38 PM, Jesse Nelson spheromak@gmail.com wrote:
I’ll merge pr’s and perform basic maintenance just wanted to get the stuff I had out there for others to use. If you want to run with it or Matt wants to that’s great.

There lwrp itself might benefit from some love as it’s pre chef 11 and I was using an experiment in nested resource notification.

-Jesse

On Oct 9, 2013, at 1:51 AM, Arnold Krille arnold@arnoldarts.de wrote:

Hi,

Am Tue, 8 Oct 2013 19:23:03 -0700 schrieb Jesse Nelson
spheromak@gmail.com:

I moved the integrated / recipe bits to the examples directory and
pushed this code up. This cook has been running in production for
some time. Feel free to build on it, and if someone wants to take it
over I am happy to give it to ya.

https://github.com/spheromak/pxe-cookbook

I like that! Thanks!

There are a few nitpicking things:

  • current tftp cookbook has the tftp-directory in
    node[:tftp][:directory] instead of node[:tftp][:dir]
  • It should be configurable what the global default on timeout is and
    if there is a timeout at all.

Do you want pull-request for your repository or should I wait until
Matt Ray picks it up?

Have fun,

Arnold


#11

Maybe the pxe/pxe_menu could have an empty default recipe and
specialized recipes for tftp and dnsmasq?

Or maybe name it “syslinux” and use it to configure syslinux-menus
regardless where they are placed (the path would be a default-attribute
and maybe an optional parameter to the lwrp).
And have one special recipe to copy the pxe-related files into the tftp-root?
Then one can also use the syslinux-cookbook to built things like
boot-sticks or boot-cds with chef(-solo)… just overengineering a
bit…

  • Arnold

On Wed, 9 Oct 2013 13:33:37 -0700 Jesse Nelson spheromak@gmail.com wrote:

Maybe the best thing would be for the pxe cook I pushed yesterday to
end up as a pure library cook and a release on community as pxe_menu.
Then people can use whatever they want for handling clients and Matt
can use it in pxe_dust. Instead of tftp_dir and a dep on tftp cook I
can use a pxe or syslinux attribute namespace for where to generate
menu entries.

Matt if u look at the precise.rb examples in the cook I uploaded it
is setup to generate entries for hosts from dhcp bags. I wrote all
of his almost 2 years ago, and I was integrating pxe with my dhcp and
bind cooks. What I uploaded yesterday was a quick hack to make it as
much a library cook as I could. I think that’s the right way for
this moving forward (vs directly dropping the LWRP in pxe_dust )

All of this started out as pxe_dust. But I needed xenserver and rhel
support. This is what I ended up with.

  • Jesse

On Oct 9, 2013, at 12:47 PM, Matt Ray matt@opscode.com wrote:

I’ll definitely take a look at it. I’ve got a 2.0 branch of pxe_dust
that replaces tftp with dnsmasq and adds a handful of other small
features. I was talking about adding a boot menu to allow you to
select PXE OS installation or to boot the hard drive (the default),
this would tie in well. Not sure when I’ll have time for it, but I’d
take the patches.
https://github.com/mattray/pxe_dust-cookbook/tree/2.0

Thanks,
Matt Ray
Cloud Integrations Product Lead :: Opscode
512.731.2218 :: matt@opscode.com
mattray :: GitHub :: IRC :: Twitter

On Wed, Oct 9, 2013 at 1:38 PM, Jesse Nelson spheromak@gmail.com
wrote: I’ll merge pr’s and perform basic maintenance just wanted
to get the stuff I had out there for others to use. If you want to
run with it or Matt wants to that’s great.

There lwrp itself might benefit from some love as it’s pre chef 11
and I was using an experiment in nested resource notification.

-Jesse

On Oct 9, 2013, at 1:51 AM, Arnold Krille arnold@arnoldarts.de
wrote:

Hi,

Am Tue, 8 Oct 2013 19:23:03 -0700 schrieb Jesse Nelson
spheromak@gmail.com:

I moved the integrated / recipe bits to the examples directory
and pushed this code up. This cook has been running in
production for some time. Feel free to build on it, and if
someone wants to take it over I am happy to give it to ya.

https://github.com/spheromak/pxe-cookbook

I like that! Thanks!

There are a few nitpicking things:

  • current tftp cookbook has the tftp-directory in
    node[:tftp][:directory] instead of node[:tftp][:dir]
  • It should be configurable what the global default on timeout is
    and if there is a timeout at all.

Do you want pull-request for your repository or should I wait
until Matt Ray picks it up?

Have fun,

Arnold