Distributed computing
-
Hi all,
I am new to fog (experienced in linux, not in pxe/nfs boot)
I would like to use the fog system to boot clients with linux and run a program for distributed computing. At the end I only need runing linux system with needed programs installed and running ssh servers.Is there a howto for this? Where should I begin?
I am thinking of how can I add new programs to the existing one, how to set the default boot entry and so on. Or this is a bad idea for some reason I don’t know.
Please point me to the right directon.
Thanks -
Well first of all, you should probably grab a fresh soda because I feel this is going to be a wall of text.
Let be start out by saying, for what you want to do FOG is an overkill (too much). FOG is great because it is built on other opensource technologies which are assembled to work together. Everything you need is in one FOG Project distribution. With that said for what you need, you don’t need FOG. You may be able to hack bits off for your purpose.
For PXE booting you need 4 things.
- DHCP server to set the netboot options of option 66 and option 67
- A tftp server to download the boot-file (boot loader) from.
- The boot loader. FOG uses the iPXE boot loader to extend the capabilities not found in the network card’s built in PXE Rom. (for your project I would “borrow” the FOG Project’s iPXE boot loaders because they have a boot script built in. More on that in a moment)
- Boot OS.
Understand at this point you can use Linux or MS Windows because these services are available on both platforms.
Now for a boot OS, that is where things get a little tricky. If your boot OS is a linux distribution then your boot server will probably need to be Linux to use NFS to store and share your OS files. You can add NFS support to MS Windows but its a bit of a pain to setup compare to linux.
Now lets talk about your boot OS. Since you seem to have a dedicated purpose, lets consider you don’t need the weight of a full OS. You could build your own Linux distribution using
buildroot
.So a little back story here. The FOG Project has a dedicated linux OS that runs on the target computer. That OS name is FOS (Fog Operating System) Linux. As you know with linux distributions to startup a linux OS you need a boot kernel and an inital file system (initramfs). The FOS Linux is comprised of bzImage (kernel) and init.xz (file system or initramfs). During the PXE boot process the nic card’s PXE rom downloads iPXE from the FOG server, and then iPXE then chains (indirectly) to download bzImage and init.xz to boot the FOS linux on the target computer. The two components together are less than 300MB in size. Its very small, quick to transfer, and boots really fast < 10 seconds. FOS Linux is built using
buildroot
.For your project I would again “borrow” bzImage from the FOG Project and then focus on building your initfs with buildroot. You will spend the most time here with buildroot. Again I would “borrow” bits from the FOG Project to help with the buildroot process. The FOG Github site has all of the configurations needed to build FOS Linux using buildroot.
If you have in mind to build some kind of elastic computing stack, I would really consider going down the buildroot route because you have the options to only include the linux applications needed for your project. Keeping both the kernel and the initfs lite, conservative on resources, and fast.
-
Thank you very much for the explanation!
I didn’t know the buildroot tool.
I just installed FOG for imaging computers, and ran a couple of test and I am very satisfied with it. And I just wonder whether can I use this system for distributed computing as well and it seems I can. Just tried the virus scan today and turned out, that it doesn’t work just out of the box, so I am sure your explanation how things works will help me a lot in the future. (as I see calmscan also need some buildroot prep, however I am not interested in viruscanning, I am sure there will be other things I will use buildroot for)Is the init.xz static or FOG rebuilds it in some cases? So do I have buildroot already somewhere or I have to install it?
I think all the pxe editing tutorial I found (even the fog wiki) is outdated, could you please give me an up to date link for that?Thank you!
-
@Gabor said in Distributed computing:
just installed FOG for imaging computers
Ok I was under the impression that you installed FOG for netbooting. So then if you have FOG installed for imaging then you can continue to use it for both imaging and netbooting since everything you need is included with FOG for imaging as well as netbooting.
If you want to run off the shelf OS by netbooting I have a tutorial on that and how to integrate with FOG here: https://forums.fogproject.org/topic/10944/using-fog-to-pxe-boot-into-your-favorite-installer-images
The buildroot approach is a bit more complicated but you an end up with a really fast and tight system. To build a custom linux OS using buildroot you will need to use a linux computer and to download the buildroot dev environment from here: https://buildroot.org/ I suggest that you watch a few youtube videos on buildroot to see if its right for you.
If you want to start by building FOS Linux init.xz image you can start with the data on the github site: https://github.com/FOGProject/fos/tree/master/Buildroot The github repo won’t mean anything to you unless you understand a little bit about buildroot. But with the
board/FOG/FOS
file path, those files will be copied to the target disk image without changes. The files in that path are placed in the init.xz initfs. Really the files in this path make the image FOS. The packages directory is for custom applications you want complied and installed in the target init.xz file. Again watch a few youtube videos to understand what buildroot is and what it does to decide if you want to go down this path.