how to pxe boot and preseed puppet-agent install in ubuntu from puppetlabs repo

553 views
Skip to first unread message

Peter K

unread,
Mar 22, 2017, 4:06:29 PM3/22/17
to Puppet Users
In my googling I did not find a simple recipe for how to install and run puppet for the first time (for a pxe / tftpboot / ubuntu / preseed / puppetlabs-repo scenario).

Here's what I tagged onto the bottom on my preseed.cfg script:

d-i preseed/late_command string in-target wget -O /home/<username>/puppetlabs-release-pc1-xenial.deb http://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb;\
        in-target /usr/bin/dpkg -i /home/<username>/puppetlabs-release-pc1-xenial.deb;\
        in-target /usr/bin/apt-get update;\
        in-target /usr/bin/apt-get install -y --allow-unauthenticated puppet-agent;
        #in-target /opt/puppetlabs/puppet/bin/puppet resource service puppet ensure=running enable=true; # this line wan't necessary because puppet joined the server and ran for the first time on first boot with no other configuration...if you have autosigning set up.

# This script assumes you have autosigning turned on by putting a single asterisk in this file on the puppet server: /etc/puppetlabs/puppet/autosign.conf

Here's my pxelinux.cfg/default snipit (how the preseed.cfg is called):

 LABEL ubuntu-16.04.2 server LTS with preseed
 MENU LABEL ubuntu-16.04.2 server LTS with preseed
 KERNEL images/ubuntu-16.04.2-server-amd64.iso/linux
 APPEND initrd=images/ubuntu-16.04.2-server-amd64.iso/initrd.gz inst.repo=ftp://<ip address>/pub/ubuntu-16.04.2-server-amd64.iso auto=true priority=critical debian-installer/locale=en_US keyboard-configuration/layoutcode=us ubiquity/reboot=true languagechooser/language-name=English countrychooser/shortlist=US localechooser/supported-locales=en_US.UTF-8 boot=casper automatic-ubiquity quiet splash noprompt noshell preseed/url=ftp://<ip address>/pub/kickstarter/preseed.cfg ---

# and ftp://<ip address>/pub/ubuntu-16.04.2-server-amd64.iso is a mountpoint to the file of the same name.
# Make sure and change the <username> and <ip address> fields with your own.

Thomas Hager

unread,
Mar 23, 2017, 5:08:42 PM3/23/17
to puppet...@googlegroups.com
Hi Peter,

ever thought about trying Cobbler?

In our environment, we PXE boot servers with Cobbler, install Xenial
with a recent Puppet agent and automatically sign the certificate on
the master for freshly deployed servers. Everything out of the box :)

Hth,
Tom.
> -- 
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/7a874867-5ed5-4928-890d-
> e9dbaec15b31%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
Thomas "Duke" Hager du...@sigsegv.at
GPG: 2048R/791C5EB1 http://www.sigsegv.at/gpg/duke.gpg
=================================================================
"Never Underestimate the Power of Stupid People in Large Groups."
signature.asc

Peter K

unread,
Mar 30, 2017, 12:38:59 PM3/30/17
to Puppet Users
Thanks for the suggestion, Tom.
I was working with a pre-existing environment but setting up cobbler is something I'll try next.
-peter
Reply all
Reply to author
Forward
0 new messages