voxpupuli / puppet-pxe

Puppet module for deploying a PXE boot server
https://forge.puppet.com/puppet/pxe
51 stars 38 forks source link

Make test manifests useful and update README #15

Closed zachfi closed 10 years ago

zachfi commented 10 years ago

This work updates the README to use the correct classes, and ensures that the test cases represented in the README actually work.

Here we also remove the resource_permute function. This should have been removed long ago, since the module now depends on zleslie/permute. If you don't have it, please go and get it.

https://github.com/xaque208/puppet-permute

TheLQ commented 10 years ago

Sorry for the wait, I've been busy. This still fails with ruby 1.9.3, debian and centos config copied from https://github.com/xaque208/puppet-pxe/blob/yayattention/tests/bootserver.pp

lordquackstar@quackpxe:~⟫ sudo puppet agent --test
Warning: Local environment: "production" doesn't match server specified node environment "test", switching agent to "test".
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/php_version.rb
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `each' for "debian":String at /etc/puppet/environments/test/modules/permute/manifests/init.pp:15 on node quackpxe.quackluster.lan
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
1 lordquackstar@quackpxe:~⟫ ruby --version
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
lordquackstar@quackpxe:~⟫ puppet --version
3.4.3
zachfi commented 10 years ago

Ah, thats the permute module thats failing for you. I'll see if I can chase that up.

zachfi commented 10 years ago

What version of the permute module are you using please? I get complete compilation with the following manifest on FreeBSD. facter rubyversion yields 1.9.3 using Puppet 3.6.2.

class { 'pxe':
  tftp_root => '/usr/local/tftp'
}

permute { 'Debian Installers': 
  resource => 'pxe::installer',
  unique   => {
    arch => ['amd64'],
    ver  => ['wheezy','jessie'],
    os   => ['debian'],
  },
  common   => {
    file   => "os_<%= os %>",
    kernel => "images/<%= @os %>/<%= @ver %>/<%= @arch %>/linux",
    append => "initrd=images/<%= @os %>/<%= @ver %>/<%= @arch %>/initrd.gz text",
  }
}
zachfi commented 10 years ago

Also using 8c91153baadd8be23952c7daa26e7c5f9414622d of permute, and HEAD of this branch. How are you installing the modules?

TheLQ commented 10 years ago

Ah, you meant the git clone of the permute module, not the latest release. Got everything cloned correctly and it booted! Tweaked the debian permute and was able to successfully image a server.

Thank you so much, this is going to make things a lot easier!

zachfi commented 10 years ago

You might check out adrienthebo/r10k for better module deployments, also.