Help with unattended installation with foreman

I watched this video on using foreman to provision a host


the problem is i got lost right from 8 min 50 secs where he mentioned he
had some other server for dhcp setup and the whole video became useless
from there

I will like to know how the physical server/hosts to be provisioned will
automatically boot and install? If i turn on the server…how does foreman
communicate with this host and it performs the installation? I would have
seen this is the video had not destroyed the hwole thing by using some
extra stuff not shown in the video guide.

Need help here. I have setup everything from mac address to the static ip
address to be used but no installation is performed on the physical host.
Please help.

Thanks

To expand on what Lukas commented, and to give you some feedback in our
deployment, we already had a DHCP server up and running and when we
installed foreman, we did not install the DHCP piece, but we did install
the TFTP server on the foreman machine.
Once the install was completed, we updated the configuration on our DHCP
server with the option 69 if I don't recall wrongly, with the IP of the
foreman/TFTP server.

When a new server is being deployed, it will require to be booted from the
network using PXE. When that happens, the server will request an IP to the
DHCP server and the DHCP server will reply with the IP as well as the
address of the Foreman/TFTP Server to query for the image to load.
When the server contacts the foreman/TFTP server, it will receive a menu
that will force the server to load from the image that the foreman/TFTP
server provides.

As Lukas commented, once the new server is build, foreman/TFTP server will
replace that image with a menu to boot from hard drive going forward. As a
result, if that server is ever restarted, it will still get the IP from the
DHCP server, will log back to the foreman/TFTP server for its configuration
and will end up booting up from its own hard drive.

Hope this helps,
IB

··· On Monday, May 26, 2014 8:50:19 PM UTC-4, Eff Ggl wrote: > > I watched this video on using foreman to provision a host > https://www.youtube.com/watch?v=eHjpZr3GB6s > the problem is i got lost right from 8 min 50 secs where he mentioned he > had some other server for dhcp setup and the whole video became useless > from there > > I will like to know how the physical server/hosts to be provisioned will > automatically boot and install? If i turn on the server...how does foreman > communicate with this host and it performs the installation? I would have > seen this is the video had not destroyed the hwole thing by using some > extra stuff not shown in the video guide. > > > Need help here. I have setup everything from mac address to the static ip > address to be used but no installation is performed on the physical host. > Please help. > > Thanks >

> I will like to know how the physical server/hosts to be provisioned will
> automatically boot and install? If i turn on the server…how does foreman
> communicate with this host and it performs the installation? I would have
> seen this is the video had not destroyed the hwole thing by using some
> extra stuff not shown in the video guide.

Hello,

we definitely need some content/video on that topic. Let me briefly
explain to you how this (bare metal provisioning) works.

When you create a host entry, you give it name, MAC address, domain,
subnet. Foreman does pre-reserve IP address in the subnet you selected
and also creates DNS entry for name.domain. Also, it deploys menu for
the particular MAC address on the TFTP server. This is what we call
"build mode".

Once you turn on your host you need to setup it to boot from network
over PXE protocol (google that how that works). In short, the host
acquires IP address (DHCP already knows the MAC and returns assigned
preallocated IP). The DHCP server also returns address of the TFTP
server (usually the same box). The host gets boot menu (something like
Grub, it's called PXELinux) for the particular MAC address (each server
can have a different menu, there is always one default menu). In that
menu, the default item for build mode is - you guessed it - Start
installation.

After that, Linux kernel and init ram disk are loaded from the TFTP
server (which was copied by Foreman/Smart Proxy there), installation
blueprint (kickstart/preseed/etc) which was generated from your template
is downloaded and there is enough information to continue with headless
installation of the OS.

At the end of the installation there is a small scriplet that notifies
Foreman (using curl/wget) that the host was built. Foreman puts the host
in "normal operation" mode and changes TFTP configuration, so the host
receives default menu, which is usually "Boot from local disk". Host
restarts (again from the network), it gets this menu and after 20
seconds (default value) it boots from local disk.

Then puppet usually takes over, but this is another story.

If you want to reprovision the host again, you can just click on Build
icon to put it back to the build mode and restart the server. It will be
reprovisioned right away with the same parameters (or you can change
them).

··· -- Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

Why does getting help sucks like this?
Am i asking for too much?

Here is the problem i think i am having

#1. Isn't the router or switch suppose to be the DHCP server for the
network?

#2 How do i make Foreman the DHCP server? And if i do this, does this mean
router will no longer be able to act as DHCP server any longer?
Also lets say Foreman is on a VLAn allocated by the Router, what will be a
great setup for a production environment?

#3. I think my problem is i do not have a DHCP server setup well with
foreman…for example i mostly access the foreman host my ip address…i
cannot with the FQDN because i work on my windows 7 PC so not sure how i
will setup dns or something? I think this is where my issue lies?
So what happens is when i start the host…nio way to interact with foreman
because one foreman is using FQDN and i have no DNS or anything that
translates the ip to FQDN

So here is where i need help.

What do i do to get things setup the right way from here?

Thanks!

I think what you're asking is outside the scope of this mailing list.

To try and answer your 3 questions above:

  1. No, the router or switch doesn't have to be the DHCP network, but it can
    if you want.

  2. foreman-installer will install a dhcp server for you if you tell it to,
    or you can install a foreman-proxy on a server and configure it to talk to
    an existing DNS server.

  3. You need to create an entry for your foreman server in whatever DNS
    server your Windows 7 machine is pointed at if you want to use the FQDN to
    get to it.

Matt

··· On Fri, May 30, 2014 at 9:12 AM, Eff Ggl wrote:

Why does getting help sucks like this?
Am i asking for too much?


You received this message because you are subscribed to the Google Groups
“Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Can anyone please help?

Thanks

> #1. Isn't the router or switch suppose to be the DHCP server for the
> network?

I am unable to answer that. Router can serve as DHCP, or not. Make your
choice.

What you really need is a DHCP server under Foremans control. You can
have multiple DHCP servers with forwarding set up on your network as
well.

> #2 How do i make Foreman the DHCP server? And if i do this, does this mean
> router will no longer be able to act as DHCP server any longer?
> Also lets say Foreman is on a VLAn allocated by the Router, what will be a
> great setup for a production environment?

You installer automatically set ups ISC DHCP server and integrate it
with Foreman via Foreman Proxy component. This is automatic, you just
need to provide valid parameters. Everything is documented here:

http://theforeman.org/manuals/1.5/#3.2ForemanInstaller

> #3. I think my problem is i do not have a DHCP server setup well with
> foreman…for example i mostly access the foreman host my ip address…i
> cannot with the FQDN because i work on my windows 7 PC so not sure how i
> will setup dns or something? I think this is where my issue lies?
> So what happens is when i start the host…nio way to interact with foreman
> because one foreman is using FQDN and i have no DNS or anything that
> translates the ip to FQDN

If you don't have DHCP/DNS under your control and you cannot even
negotiate forwarding with your IT, you can use foreman_bootdisk to
manually boot your instances from USB disk.

··· -- Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

Help?

Ok what do i do so that instead of using ip address i can actually go the
foreman server with FQDN on my windows box?

That is what i am talking about. My foreman is on CentOS 6.5 on a different
server and i use Windows 7. How do i access foreman FQDN and also when i
need to perform unattended installation of a host, how does the FQDN of
that new host gets recognized?

That is all i was explaining in my previous post, but you didn't
specifically touch that.

Thanks a lot for your help.

Can anyone please help?

I know if i can fix the FQDN resolving, then i will move steps forward

Why does getting help sucks like this?
> Am i asking for too much?

You are asking for very generic help, it's hard to understand what your
situation is and what your needs actually are.
And asking repeatedly every X hours doesn't help making you appear nice to
the community, by the way.
To me it appears like you really need to sit down, don't be impatient, and
read some docs and follow some basic tutorials to better understand how it
all works and how it can fit your needs.
Foreman is not a plug&play toy, it can be hard to set up.

Ok what do i do so that instead of using ip address i can actually go the
> foreman server with FQDN on my windows box?
>

You can for example install a DNS on your Foreman machine, make it
responsible/authoritative for a custom domain you will use in your LAN
(while it will forward all other requests to the outside DNS of your
internet provider), and then make all new hosts use the Foreman server as
their DNS.
If you create new hosts in your custom domain, the Foreman server will take
care of resolving their names, too, because its own DNS will contain the
hosts database.

Configuring this can be difficult if you have no experience.

I'd suggest you play a bit with Foreman and host provisioning by installing
it inside a virtual machine and having all hosts as different virtual
machines inside a specific virtual subnet, so you can install anything you
want.

Marco

··· Il giorno giovedì 29 maggio 2014 01:36:44 UTC+2, Eff Ggl ha scritto: