Coder Social home page Coder Social logo

puppet-pxe's Introduction

Puppet Powered PXE Provisioning

Build Status Code Coverage Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores

Super awesome Puppet powered PXE menu and image management for network based installations. Seriously. Its awesome.

Features

  • Automatic image fetching
  • Menu management for easy selection at boot time
  • Host specific menu management
  • Supported OSs
    • Debian
    • Ubuntu
    • CentOS
    • RetHat (with baseurl)
    • Fedora
    • Scientific
    • CoreOS

Dependencies

You will need a running TFTP configured. The module now depends on the puppetlabs/tftp module.

Sample Usage

Basic setup

class { 'tftp': }
class { 'pxe': }

This will setup a tftp server and directory and install pxelinux into it with a base configuration.

Images

Here is a sample of how one might stage the network installation images and build menus for selection at boot time.

First, we start by dragging in the pre-reqs for the whole process.

include pxe

Next, lets loop over some data and create a few pxe::installer resources using the new Puppet language methods.

$debian_architectures = ['amd64', 'i386']
$debian_versions = ['squeeze', 'wheezy', 'jessie']

$debian_versions.each |$ver| {
  $os = 'debian'

  $debian_architectures.each |$arch| {

    pxe::installer { "${os}_${ver}_${arch}":
      arch   => $arch,
      ver    => $ver,
      os     => $os,
      file   => "os_${os}",
      kernel => "images/${os}/${ver}/${arch}/linux",
      append => "initrd=images/${os}/${ver}/${arch}/initrd.gz text",
    }
  }
}

This structure could be extended considerably, but it paints a picture for how to build a bunch of resources using the puppet iteration. This module used to recommend use of the resource_permute() function, but that was long before the new Puppet4 language constructs replaced the need for this function. As such, its recommended that you use the pxe::installer resources directly.

Syslinux

By default this module will install the latest version of syslinux, downloaded from kernel.org (You can see the latest version in the manifests/params.pp) file. To install the version that ships with your OS, or to specify a version, pass the syslinux variable to pxe.

For Example:

class { 'pxe': syslinux_version => 'system', }

Menus

include pxe

pxe::menu { 'Main Menu':
  file     => 'default',
  template => 'pxe/menu_default.erb';
}

pxe::menu::entry { 'Installations':
  file    => 'default',
  append  => 'pxelinux.cfg/menu_install',
}

pxe::menu { "Operating System (${arch})":
  file => 'menu_install',
}

pxe::menu { 'Debian':
  file => 'os_debian',
}

Host Configs

pxe::menu::entry { "server1.dyrden.net":
  file    => "01-aa-bb-cc-dd-ee-ff",
  kernel  => "images/debian/i386/squeeze/squeeze",
  append  => "vga=791 initrd=images/debian/i386/squeeze/squeeze.gz",
}

puppet-pxe's People

Contributors

zachfi avatar bastelfreak avatar mikerenfro avatar dhoppe avatar whatsaranjit avatar zalegrala avatar cruwe avatar pascalbourdier avatar gehel avatar blkperl avatar trlinkin avatar smortex avatar pjfoley avatar mikkergimenez avatar oasys avatar ghoneycutt avatar fvoges avatar ekohl avatar alex123321-wq avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.