FAQ
Hello,

I want to generate my infrastructure's dhcp/pxe config from puppet, but
to go through the node definitions? Btw. we only use explicit
definitions, no regexp. So everything is explicit.

I thought about using Puppet::Parser...something ... any hints?


Thanks for you help!
Christian

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Luke Bigum at Apr 18, 2012 at 8:23 am
    If you wanted to do this all in Puppet, you could take the same approach
    that people do with Nagios an use exported resources. Have each of your
    nodes export some kind of resource that describes what it's DHCP
    configuration would be based on it's IP and MAC address Facts, then
    collect those resources on your DHCP server and write out your config
    file(s).

    http://docs.puppetlabs.com/guides/exported_resources.html

    If you wanted to do this outside of Puppet then you could parse all of
    your node's Facts cache (/var/lib/puppet/yaml/facts on my machine) but
    that assumes all the information you need is in Facter.
    On 18/04/12 08:22, Christian Requena wrote:
    Hello,

    I want to generate my infrastructure's dhcp/pxe config from puppet,
    but to go through the node definitions? Btw. we only use explicit
    definitions, no regexp. So everything is explicit.

    I thought about using Puppet::Parser...something ... any hints?


    Thanks for you help!
    Christian
    --
    You received this message because you are subscribed to the Google
    Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to
    puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/puppet-users?hl=en.

    --
    Luke Bigum

    Information Systems
    Ph: +44 (0) 20 3192 2520
    luke.bigum@lmax.com | http://www.lmax.com
    LMAX, Yellow Building, 1A Nicholas Road, London W11 4AN



    FX and CFDs are leveraged products that can result in losses exceeding
    your deposit. They are not suitable for everyone so please ensure you
    fully understand the risks involved. The information in this email is not
    directed at residents of the United States of America or any other
    jurisdiction where trading in CFDs and/or FX is restricted or prohibited
    by local laws or regulations.

    The information in this email and any attachment is confidential and is
    intended only for the named recipient(s). The email may not be disclosed
    or used by any person other than the addressee, nor may it be copied in
    any way. If you are not the intended recipient please notify the sender
    immediately and delete any copies of this message. Any unauthorised
    copying, disclosure or distribution of the material in this e-mail is
    strictly forbidden.

    LMAX operates a multilateral trading facility. Authorised and regulated
    by the Financial Services Authority (firm registration number 509778) and
    is registered in England and Wales (number 06505809).
    Our registered address is Yellow Building, 1A Nicholas Road, London, W11
    4AN.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Christian Requena at Apr 20, 2012 at 1:57 pm
    Hi,

    I set the whole thing up and got not the expected results. The thing
    is, that:

    "It’s important to mention here that you will only get exported
    resources from hosts whose configurations have been compiled. If hostB
    exports a resource but hostB has never connected to the server, then
    no host will get that exported resource."

    That means that the nodes must be already installed in order to use
    the information. I need this information mainly from the nodes that
    are not existant yet. I want to boot them using PXE and run the whole
    installation procedure afterwards.

    I want to describe the nodes in a nodes.pp and from there setup DHCP
    and PXE for them.

    Any other hints?

    Cheers,
    Christian
    On Apr 18, 10:22 am, Luke Bigum wrote:
    If you wanted to do this all in Puppet, you could take the same approach
    that people do with Nagios an use exported resources. Have each of your
    nodes export some kind of resource that describes what it's DHCP
    configuration would be based on it's IP and MAC address Facts, then
    collect those resources on your DHCP server and write out your config
    file(s).

    http://docs.puppetlabs.com/guides/exported_resources.html

    If you wanted to do this outside of Puppet then you could parse all of
    your node's Facts cache (/var/lib/puppet/yaml/facts on my machine) but
    that assumes all the information you need is in Facter.

    On 18/04/12 08:22, Christian Requena wrote:








    Hello,
    I want to generate my infrastructure's dhcp/pxe config from puppet,
    but to go through the node definitions?   Btw. we only use explicit
    definitions, no regexp. So everything is explicit.
    I thought about using Puppet::Parser...something ... any hints?
    Thanks for you help!
    Christian
    --
    You received this message because you are subscribed to the Google
    Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to
    puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/puppet-users?hl=en.
    --
    Luke Bigum

    Information Systems
    Ph: +44 (0) 20 3192 2520
    luke.bi...@lmax.com |http://www.lmax.com
    LMAX, Yellow Building, 1A Nicholas Road, London W11 4AN

    FX and CFDs are leveraged products that can result in losses exceeding
    your deposit.  They are not suitable for everyone so please ensure you
    fully understand the risks involved.  The information in this email is not
    directed at residents of the United States of America or any other
    jurisdiction where trading in CFDs and/or FX is restricted or prohibited
    by local laws or regulations.

    The information in this email and any attachment is confidential and is
    intended only for the named recipient(s). The email may not be disclosed
    or used by any person other than the addressee, nor may it be copied in
    any way. If you are not the intended recipient please notify the sender
    immediately and delete any copies of this message. Any unauthorised
    copying, disclosure or distribution of the material in this e-mail is
    strictly forbidden.

    LMAX operates a multilateral trading facility.  Authorised and regulated
    by the Financial Services Authority (firm registration number 509778) and
    is registered in England and Wales (number 06505809).
    Our registered address is Yellow Building, 1A Nicholas Road, London, W11
    4AN.
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Luke Bigum at Apr 20, 2012 at 2:15 pm
    Ahh, I see, I was running under the assumption that you already had
    Puppet Agents checking in.

    How do you imagine this would work perfectly for you? Would you write
    node definitions in nodes.pp, then a Puppet Agent would do the DHCP/PXE
    on a specific server?

    If so it sounds like you have nodes.pp as your "source of truth" for all
    your servers, and you want to feed DHCP and PXE with all your node
    information as a whole. That's pretty difficult to solve in Puppet
    because no node knows about another node, defined or otherwise (unless
    you somehow advertise it's there with exported resources).

    Maybe you could write something that transferred your nodes.pp file to
    your DHCP server, then Puppet runs scripts to parse nodes.pp into the
    right DNS/DHCP config. It would probably be faster to write this (Perl),
    but I consider it a bit hacky - for every new server you're putting
    information into Puppet manifests only to pull it back out again.

    If you've got the time I'd suggest you pull your source of truth out of
    Puppet and into another source like an external node classifier (some
    people use LDAP) or an external data source like Hiera. It would be a
    bit more work but might be easier to work with in the long run, as then
    you have a simpler problem to solve when you want to add your nodes into
    Software X in a few months.

    Hope that helps,

    -Luke
    On 20/04/12 14:57, Christian Requena wrote:
    Hi,

    I set the whole thing up and got not the expected results. The thing
    is, that:

    "It’s important to mention here that you will only get exported
    resources from hosts whose configurations have been compiled. If hostB
    exports a resource but hostB has never connected to the server, then
    no host will get that exported resource."

    That means that the nodes must be already installed in order to use
    the information. I need this information mainly from the nodes that
    are not existant yet. I want to boot them using PXE and run the whole
    installation procedure afterwards.

    I want to describe the nodes in a nodes.pp and from there setup DHCP
    and PXE for them.

    Any other hints?

    Cheers,
    Christian

    On Apr 18, 10:22 am, Luke Bigumwrote:
    If you wanted to do this all in Puppet, you could take the same approach
    that people do with Nagios an use exported resources. Have each of your
    nodes export some kind of resource that describes what it's DHCP
    configuration would be based on it's IP and MAC address Facts, then
    collect those resources on your DHCP server and write out your config
    file(s).

    http://docs.puppetlabs.com/guides/exported_resources.html

    If you wanted to do this outside of Puppet then you could parse all of
    your node's Facts cache (/var/lib/puppet/yaml/facts on my machine) but
    that assumes all the information you need is in Facter.

    On 18/04/12 08:22, Christian Requena wrote:








    Hello,
    I want to generate my infrastructure's dhcp/pxe config from puppet,
    but to go through the node definitions? Btw. we only use explicit
    definitions, no regexp. So everything is explicit.
    I thought about using Puppet::Parser...something ... any hints?
    Thanks for you help!
    Christian
    --
    You received this message because you are subscribed to the Google
    Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to
    puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/puppet-users?hl=en.
    --
    Luke Bigum

    Information Systems
    Ph: +44 (0) 20 3192 2520
    luke.bi...@lmax.com |http://www.lmax.com
    LMAX, Yellow Building, 1A Nicholas Road, London W11 4AN

    FX and CFDs are leveraged products that can result in losses exceeding
    your deposit. They are not suitable for everyone so please ensure you
    fully understand the risks involved. The information in this email is not
    directed at residents of the United States of America or any other
    jurisdiction where trading in CFDs and/or FX is restricted or prohibited
    by local laws or regulations.

    The information in this email and any attachment is confidential and is
    intended only for the named recipient(s). The email may not be disclosed
    or used by any person other than the addressee, nor may it be copied in
    any way. If you are not the intended recipient please notify the sender
    immediately and delete any copies of this message. Any unauthorised
    copying, disclosure or distribution of the material in this e-mail is
    strictly forbidden.

    LMAX operates a multilateral trading facility. Authorised and regulated
    by the Financial Services Authority (firm registration number 509778) and
    is registered in England and Wales (number 06505809).
    Our registered address is Yellow Building, 1A Nicholas Road, London, W11
    4AN.

    --
    Luke Bigum

    Information Systems
    Ph: +44 (0) 20 3192 2520
    luke.bigum@lmax.com | http://www.lmax.com
    LMAX, Yellow Building, 1A Nicholas Road, London W11 4AN


    FX and CFDs are leveraged products that can result in losses exceeding
    your deposit. They are not suitable for everyone so please ensure you
    fully understand the risks involved. The information in this email is not
    directed at residents of the United States of America or any other
    jurisdiction where trading in CFDs and/or FX is restricted or prohibited
    by local laws or regulations.

    The information in this email and any attachment is confidential and is
    intended only for the named recipient(s). The email may not be disclosed
    or used by any person other than the addressee, nor may it be copied in
    any way. If you are not the intended recipient please notify the sender
    immediately and delete any copies of this message. Any unauthorised
    copying, disclosure or distribution of the material in this e-mail is
    strictly forbidden.

    LMAX operates a multilateral trading facility. Authorised and regulated
    by the Financial Services Authority (firm registration number 509778) and
    is registered in England and Wales (number 06505809).
    Our registered address is Yellow Building, 1A Nicholas Road, London, W11
    4AN.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Jason Slagle at Apr 20, 2012 at 2:18 pm
    Christian,

    I believe that The Foreman is basically something that solves this issue?

    http://theforeman.org/

    It can act as a ENC, as well as supporting provisioning.

    Might be worth a look
    On 04/20/2012 10:15 AM, Luke Bigum wrote:
    Ahh, I see, I was running under the assumption that you already had
    Puppet Agents checking in.

    How do you imagine this would work perfectly for you? Would you write
    node definitions in nodes.pp, then a Puppet Agent would do the
    DHCP/PXE on a specific server?

    If so it sounds like you have nodes.pp as your "source of truth" for
    all your servers, and you want to feed DHCP and PXE with all your node
    information as a whole. That's pretty difficult to solve in Puppet
    because no node knows about another node, defined or otherwise (unless
    you somehow advertise it's there with exported resources).

    Maybe you could write something that transferred your nodes.pp file to
    your DHCP server, then Puppet runs scripts to parse nodes.pp into the
    right DNS/DHCP config. It would probably be faster to write this
    (Perl), but I consider it a bit hacky - for every new server you're
    putting information into Puppet manifests only to pull it back out again.

    If you've got the time I'd suggest you pull your source of truth out
    of Puppet and into another source like an external node classifier
    (some people use LDAP) or an external data source like Hiera. It would
    be a bit more work but might be easier to work with in the long run,
    as then you have a simpler problem to solve when you want to add your
    nodes into Software X in a few months.

    Hope that helps,

    -Luke
    On 20/04/12 14:57, Christian Requena wrote:
    Hi,

    I set the whole thing up and got not the expected results. The thing
    is, that:

    "It’s important to mention here that you will only get exported
    resources from hosts whose configurations have been compiled. If hostB
    exports a resource but hostB has never connected to the server, then
    no host will get that exported resource."

    That means that the nodes must be already installed in order to use
    the information. I need this information mainly from the nodes that
    are not existant yet. I want to boot them using PXE and run the whole
    installation procedure afterwards.

    I want to describe the nodes in a nodes.pp and from there setup DHCP
    and PXE for them.

    Any other hints?
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Dan White at Apr 20, 2012 at 2:34 pm
    Cobbler ?

    https://github.com/cobbler/cobbler/wiki

    It does DHCP and PXE and plugs into Puppet very nicely.

    “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
    Bill Waterson (Calvin & Hobbes)

    ----- Christian Requena wrote:
    Hi,

    I set the whole thing up and got not the expected results. The thing
    is, that:

    "It’s important to mention here that you will only get exported
    resources from hosts whose configurations have been compiled. If hostB
    exports a resource but hostB has never connected to the server, then
    no host will get that exported resource."

    That means that the nodes must be already installed in order to use
    the information. I need this information mainly from the nodes that
    are not existant yet. I want to boot them using PXE and run the whole
    installation procedure afterwards.

    I want to describe the nodes in a nodes.pp and from there setup DHCP
    and PXE for them.

    Any other hints?

    Cheers,
    Christian
    On Apr 18, 10:22 am, Luke Bigum wrote:
    If you wanted to do this all in Puppet, you could take the same approach
    that people do with Nagios an use exported resources. Have each of your
    nodes export some kind of resource that describes what it's DHCP
    configuration would be based on it's IP and MAC address Facts, then
    collect those resources on your DHCP server and write out your config
    file(s).

    http://docs.puppetlabs.com/guides/exported_resources.html

    If you wanted to do this outside of Puppet then you could parse all of
    your node's Facts cache (/var/lib/puppet/yaml/facts on my machine) but
    that assumes all the information you need is in Facter.

    On 18/04/12 08:22, Christian Requena wrote:








    Hello,
    I want to generate my infrastructure's dhcp/pxe config from puppet,
    but to go through the node definitions?   Btw. we only use explicit
    definitions, no regexp. So everything is explicit.
    I thought about using Puppet::Parser...something ... any hints?
    Thanks for you help!
    Christian
    --
    You received this message because you are subscribed to the Google
    Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to
    puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/puppet-users?hl=en.
    --
    Luke Bigum

    Information Systems
    Ph: +44 (0) 20 3192 2520
    luke.bi...@lmax.com |http://www.lmax.com
    LMAX, Yellow Building, 1A Nicholas Road, London W11 4AN

    FX and CFDs are leveraged products that can result in losses exceeding
    your deposit.  They are not suitable for everyone so please ensure you
    fully understand the risks involved.  The information in this email is not
    directed at residents of the United States of America or any other
    jurisdiction where trading in CFDs and/or FX is restricted or prohibited
    by local laws or regulations.

    The information in this email and any attachment is confidential and is
    intended only for the named recipient(s). The email may not be disclosed
    or used by any person other than the addressee, nor may it be copied in
    any way. If you are not the intended recipient please notify the sender
    immediately and delete any copies of this message. Any unauthorised
    copying, disclosure or distribution of the material in this e-mail is
    strictly forbidden.

    LMAX operates a multilateral trading facility.  Authorised and regulated
    by the Financial Services Authority (firm registration number 509778) and
    is registered in England and Wales (number 06505809).
    Our registered address is Yellow Building, 1A Nicholas Road, London, W11
    4AN.
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Zach Leslie at Apr 20, 2012 at 6:18 pm
    https://github.com/xaque208/puppet-pxe
    https://github.com/xaque208/puppet-dhcp

    These two modules may help you out.  We are using them in production
    currently and are working quite well. The pxe module basically just
    grabs all the images from public sources, downloads pxelinux, sets up
    a tftp server and builds out a basic menuing system so you can choose
    what to boot. It can do ESXi (with ISO synced) and will support
    FreeBSD booting shortly as well. I am also working on splitting the
    function included in the PXE module into its own resource type for
    simplicity, and also have started working on a preseed module for
    templating preseed configurations. We've talked about making a
    kickstart module for RPM based distros, which will happen eventually,
    but its not our priority. iPXE soon as well.

    The DHCP module has Dynamic DNS support, when coupled with ISC Bind,
    runs on FreeBSD, Linux, and Darwin. It supports running two DHCP
    servers using ISC failover mechanism, multiple subnets, etc. Next on
    the roadmap for that module is adding IPv6 support.

    The readme and tests should get you going with both modules. If you
    run into any issues, let me know. I am zleslie on freenode.

    Zach
    On Apr 18, 12:22 am, Christian Requena wrote:
    Hello,

    I want to generate my infrastructure's dhcp/pxe config from puppet, but
    to go through the node definitions?   Btw. we only use explicit
    definitions, no regexp. So everything is explicit.

    I thought about using Puppet::Parser...something ... any hints?

    Thanks for you help!
    Christian
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedApr 18, '12 at 7:22a
activeApr 20, '12 at 6:18p
posts7
users5
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase