Originally Published: Thursday, 11 October 2001 Author: Rick Philbrick
Published to: enhance_articles_sysadmin/Sysadmin Page: 5/5 - [Printable]

SF-Foundries@Linux.com:: With Linux Clusters - Image is Everything!

SourceForge Foundries are a new feature of OSDN and serve as places for developers to network, mingle, give and even get advice, and, of course, help each other develop better software. Every so often Linux.com will run content in conjunction with SourceForge Foundries (and their esteemed authors). 'Spread the love' is our motto!

If you're interested in volunteering to help support or start a foundry, or have suggestions, ideas, or gripes please contact SourceForge Foundries


  << Page 5 of 5  

addclients

So at this point we have an ImageServer, a GoldenClient, and the image of the GoldenClient stored on the ImageServer. You can store many different images on your ImageServer, so our next step is to tell the ImageServer about the clients we want to autoinstall and which image they are to receive. This is done by running the addclients command. You don't have to give it any options. It will ask you all the things it needs to know in order to configure the ImageServer for you.

[root@imageserver]# addclients

Welcome to the SystemImager "addclients" utility  
---------------------------------------------------

This utility has 3 sections.  


"Section 1" will ask you for your hostname information.


"Section 2" will allow you to create softlinks from each
client hostname to your "master" script in the
"/tftpboot/systemimager/" directory.  

Example: www297.sh -> web_server_image_v1.master


"Section 3" will ask you for IP address information that will
be combined with the hostname information provided in Section 1
to create entries in "/etc/hosts" for each of these same clients.
New entries will be appended to the end of "/etc/hosts".  If you 
specify new hostnames for existing IP addresses, those entries 
will be re-written in place to reflect the new host names.


Continue? ([y]/n): 


addclients -- Section 1 (hostname information)
----------------------------------------------

The next series of questions will be used to create a range
of hostnames.  You will be asked for your domain name, the 
base host name, a beginning number, and an ending number.

For example, if you answer:
  domain name     = systemimager.org
  base host name  = www
  starting number = 7
  ending number   = 11

Then the result will be a series of hostnames that looks like this:
  www7.systemimager.org
  www8.systemimager.org
  www9.systemimager.org
  www10.systemimager.org
  www11.systemimager.org


What is your domain name? []: mydomain.com
What is the base host name that you want me to use? []: server
What number should I begin with? []: 1
What number should I end with? []: 99


I will work with hostnames:  server1 through server99
             in the domain:  mydomain.com

Are you satisfied? (y/[n]): y


addclients -- Section 2 (soft links to master script)
-----------------------------------------------------

Would you like me to create soft links to a "master" script so
that hosts:

  server1 through server99

can be autoinstalled with that image? ([y]/n): 

Here is a list of available images:

debian_ide_2.2 
debian_hwraid_ext2 
web_server_image_v1 

Which image would you like these hosts to receive? [web_server_image_v1]: 

Your soft links have been created.

Press <Enter> to continue...


addclients -- Section 3 (adding or modifying /etc/hosts entries)
----------------------------------------------------------------

It is necessary to have an entry for each client in "/etc/hosts".

I will ask you for your clients' IP addresses one subnet at a time.


Would you like me to make these entries for you? ([y]/n): 


addclients -- Section 3 (adding or modifying /etc/hosts entries -- continued...)
--------------------------------------------------------------------------------
subnet 1

The first host in subnet 1 will be: server1
What is the starting IP address for subnet 1? []: 192.168.1.1
What is the ending IP address? []: 192.168.1.99
I will work with IP addresses:  192.168.1.1 through 192.168.1.99

Are you satisfied? (y/[n]): y

These entries have been added to /etc/hosts.

Press <Enter> to continue...

Now we need to create the boot media for your autoinstall clients. You can choose between CD-ROM, diskette, network, or hard drive (to re-install an already running client). We'll go with the floppy option. Let's take a blank floppy and place it in the diskette drive on the ImageServer. Make sure it's unlocked so you can write to it. Now we're going to use a program called makeautoinstalldiskette, no joke, that is part of the SystemImager server software. Simply run the command on the ImageServer and it will produce a bootable floppy that can be used to perform an autoinstall. The autoinstall media is not machine specific, so it can be used on any of your client machines.

And now for the fun part! Boot one of your client machines from the floppy, and watch as the hard drives are partitioned and see the image fly over the network. In just minutes you'll have installed a new machine in the likeness of the GoldenClient, with its own unique IP address and hostname!

Unless you tell getimage otherwise, your machine will "beep incessantly" (the default) to let you know when it's finished installing. Just take out the diskette and reboot. Your newly minted server machine is ready to join the cluster.

For more information on SystemImager, please see:

http://systemimager.org/. There you can find the software, documentation, and email lists where you can ask questions of other users.

Acknowledgments:

Special thanks Brian Elliott Finley for writing SystemImager and to Greg Pratt who contributed the templates for the Listings.

Rick Philbrick (rickphilbrick@hotmail.com) is the Sr. Network Operations Engineer for Yozons Inc. and lives in Bellevue Washington. He has been working on Linux since 1996, being introduced to it while on the IT staff at E*Trade.





  << Page 5 of 5