Kickstart Default Locations

Hello,

Please be aware that I am quite new to Foreman/Puppet and I recently built
it to provision Linux servers. I am able to build a host with a MAC Address
and it works flawlessly with both CentOS and Ubuntu.
However I edited the /var/lib/tftpboot/pxelinux.cgf to have the option to
build servers via some kind of option to install CentOS or Ubuntu etc…

<https://lh3.googleusercontent.com/-qh8XhDY3sbc/VrEC6RO178I/AAAAAAAAPdQ/waKUJ0aaBxI/s1600/foreman.jpg>

And that works well but the problem is that I cannot seem to point to the
Kickstart files that Foreman has available via the GUI like these:

<https://lh3.googleusercontent.com/-XHdfLyetM30/VrEDZQC3mJI/AAAAAAAAPdY/3X7jSRymKF8/s1600/foreman2.jpg>

The problem is when I setup my Ubuntu Server/CentOS Server with Kickstart
File like such:

LABEL Ubuntu Server with Kickstart File
MENU LABEL Ubuntu Server with Kickstart File
KERNEL boot/Ubuntu/Ubuntu-14.04-x86_64-linux
APPEND initrd=boot/Ubuntu/Ubuntu-14.04-x86_64-initrd.gz
ks=http://puppet.domain.com/templates/provisioning_templates/Preseed_default
ramdisk_size=100000 ksdevice=eth0 ip=dhcp

The ks=http://puppet.doman.com/templates/ etc… does not seem to download
the template and I am not even sure if these templates are stored in the
server or if it goes and pulls some from another location. Basically I want
to be able to install a CentOS/Ubuntu Server from the options and have them
use the kickstart templates as right now it doesn't work. At the moment if
I add the MAC Address in Foreman Web Console for Build then it picks up the
kickstart file but since I don't know all the MAC Addresses of all the
servers I have to rebuild I want to make it available via the PXE Boot Menu
and have it use the Kickstart Templates available in Foreman.

Again, everything works perfectly fine but I am stuck on the kickstart
option "ks=" or maybe my syntax is wrong
the APPEND initrd=boot/Ubuntu or boot/CentOS is in /var/lib/tftpboot folder
and that's where my images are and that works very well but when I try to
use the kickstart file it ignores it and then I am forced to do the
installation manually by choosing language, time zone etc…

Any help with this would be really appreciated

Thanks

Joey

> Hello,
>
> Please be aware that I am quite new to Foreman/Puppet and I recently
> built it to provision Linux servers. I am able to build a host with a
> MAC Address and it works flawlessly with both CentOS and Ubuntu.
> However I edited the /var/lib/tftpboot/pxelinux.cgf to have the option
> to build servers via some kind of option to install CentOS or Ubuntu etc…

You would do well to try and decide the OS you want to use when you
create the host in the Foreman UI. Foreman generally doesn't work well
for the provisioning style you're suggesting.

Normally you'd add the host under New Host, it'll create a new
pxelinux.cfg file for the host by MAC address and boot straight into the
OS you chose in the UI.

> And that works well but the problem is that I cannot seem to point to
> the Kickstart files that Foreman has available via the GUI like these:
>

>
> The problem is when I setup my Ubuntu Server/CentOS Server with
> Kickstart File like such:
>
> LABEL Ubuntu Server with Kickstart File
> MENU LABEL Ubuntu Server with Kickstart File
> KERNEL boot/Ubuntu/Ubuntu-14.04-x86_64-linux
> APPEND initrd=boot/Ubuntu/Ubuntu-14.04-x86_64-initrd.gz
> ks=http://puppet.domain.com/templates/provisioning_templates/Preseed_default
> ramdisk_size=100000 ksdevice=eth0 ip=dhcp
>
> The ks=http://puppet.doman.com/templates/ etc… does not seem to
> download the template and I am not even sure if these templates are
> stored in the server or if it goes and pulls some from another location.

Yes, that isn't a valid URL.

It's possible to associate templates to a host group and then use it
like this, see
http://projects.theforeman.org/projects/foreman/wiki/TemplateWriting#Hostgroup-based-rendering
for the details. Generally it means you lose a lot of the extra
features like DNS integration. I wouldn't recommend using it if you can.

You could also look at the Discovery plugin
(Foreman :: Plugin Manuals) which
lets you create a pool of available hosts and then provision them after.

··· On 02/02/16 20:35, Joey Jojo wrote:


Dominic Cleal
dominic@cleal.org

Hey Dominic Cleal

Thanks for being the only person to get back to me :slight_smile: I appreciate it quite
a lot.
I went with the Discovery Plugin and it worked like a charm. It was quite
easy to install and configure so I wanted to say THANK YOU!

Greetings from Canada

Joey

··· On Wednesday, February 3, 2016 at 12:11:38 AM UTC-8, Dominic Cleal wrote: > > On 02/02/16 20:35, Joey Jojo wrote: > > Hello, > > > > Please be aware that I am quite new to Foreman/Puppet and I recently > > built it to provision Linux servers. I am able to build a host with a > > MAC Address and it works flawlessly with both CentOS and Ubuntu. > > However I edited the /var/lib/tftpboot/pxelinux.cgf to have the option > > to build servers via some kind of option to install CentOS or Ubuntu > etc.. > > You would do well to try and decide the OS you want to use when you > create the host in the Foreman UI. Foreman generally doesn't work well > for the provisioning style you're suggesting. > > Normally you'd add the host under New Host, it'll create a new > pxelinux.cfg file for the host by MAC address and boot straight into the > OS you chose in the UI. > > > And that works well but the problem is that I cannot seem to point to > > the Kickstart files that Foreman has available via the GUI like these: > > > ... > > > > The problem is when I setup my Ubuntu Server/CentOS Server with > > Kickstart File like such: > > > > LABEL Ubuntu Server with Kickstart File > > MENU LABEL Ubuntu Server with Kickstart File > > KERNEL boot/Ubuntu/Ubuntu-14.04-x86_64-linux > > APPEND initrd=boot/Ubuntu/Ubuntu-14.04-x86_64-initrd.gz > > ks= > http://puppet.domain.com/templates/provisioning_templates/Preseed_default > > ramdisk_size=100000 ksdevice=eth0 ip=dhcp > > > > The ks=http://puppet.doman.com/templates/ etc... does not seem to > > download the template and I am not even sure if these templates are > > stored in the server or if it goes and pulls some from another location. > > Yes, that isn't a valid URL. > > It's possible to associate templates to a host group and then use it > like this, see > > http://projects.theforeman.org/projects/foreman/wiki/TemplateWriting#Hostgroup-based-rendering > for the details. Generally it means you lose a lot of the extra > features like DNS integration. I wouldn't recommend using it if you can. > > You could also look at the Discovery plugin > (http://theforeman.org/plugins/foreman_discovery/4.1/index.html) which > lets you create a pool of available hosts and then provision them after. > > -- > Dominic Cleal > dom...@cleal.org >