wiki:SaliUsage

Usage

First make sure that your SALI installation works. We now give a brief tutorial howto clone a node and make a simple installation script.

For cloning a node and generation of configurations files SALI is still dependend on:

SALI uses the same concepts as systemimager. To get familiar with terms and concepts you can read the system imager manual:

Server

SARA has written a replacement for systemimager server tools. This software is in use at the SARA site since early 2011. It supports the rsync and bittorent installation protocol:

An other alternative is to install the systemimager server tools:

  • systemimager-server

Starting/Stopping/Restarting the SALI server

Just issue one of the following commands:

/etc/init.d/sali start
/etc/init.d/sali stop
/etc/init.d/sali restart

Client

SALI

Included in the SALI server suite is the command sali. The command is used for:

  • fetching an image
    sali getimage
    
  • generating a new rsyncd configuration file
    sali rsync
    

Cloning

A rsync daemon must be started on your golden client. You can use the shell script sali_prepare. sali_prepare will create a rsyncd configuration and starts the daemon on your golden client node:

  • sali_prepare <sali_server>

On the SALI installation server you can clone the golden client. Without arguments it will ask for

  1. the hostname of the golden client
  2. the image that must be updated/created
    sali getimage
    

It's also possible to exclude files/directorues of your golden client to be transfered to your installation server. You have to create a rsync exclude file (rsync man page), eg:

  • /tmp/rsync.exclude
    /var/tmp/*
    /tmp/*
    /scratch/*
    /usr/src/*
    /var/log/*.gz
    /var/log/ntpstats/*.gz
    /var/log/atsar/*
    /var/log/ksymoops/*
    /home/*
    

An example on how to use the rsync.exclude file:

  • sali getimage -h <golden-client> -i <imagename> -e "/tmp/rsync.exclude"

Systemimager

On the client node the following packages are required:

  • systemimager-client
  • systemconfigurator

The software is required to clone a node and for generation of configuration files (SALI post-install scripts).

Cloning

Login on the node you want to clone and use si_prepareclient, eg:

ssh gb-r6n1

gb-r6n1.irc.sara.nl:/root 
root#  si_prepareclient -y -server install -no-uyok
Using "parted" to gather information about disk:
    /dev/sda

Use of uninitialized value $v1 in split at /usr/lib/systemimager/perl/SystemImager/Common.pm line 199.
Use of uninitialized value $v1 in split at /usr/lib/systemimager/perl/SystemImager/Common.pm line 199.
Use of uninitialized value $v1 in split at /usr/lib/systemimager/perl/SystemImager/Common.pm line 199.
Use of uninitialized value $v1 in split at /usr/lib/systemimager/perl/SystemImager/Common.pm line 199.
Use of uninitialized value $v1 in split at /usr/lib/systemimager/perl/SystemImager/Common.pm line 199.
Use of uninitialized value $v1 in split at /usr/lib/systemimager/perl/SystemImager/Common.pm line 199.
Use of uninitialized value $v1 in split at /usr/lib/systemimager/perl/SystemImager/Common.pm line 199.
Use of uninitialized value $v1 in split at /usr/lib/systemimager/perl/SystemImager/Common.pm line 199.
Use of uninitialized value $v1 in split at /usr/lib/systemimager/perl/SystemImager/Common.pm line 199.
Use of uninitialized value $v1 in split at /usr/lib/systemimager/perl/SystemImager/Common.pm line 199.
Use of uninitialized value $v1 in split at /usr/lib/systemimager/perl/SystemImager/Common.pm line 199.
WARNING: cannot find the version of LVM or LVM version is not supported!
Starting or re-starting rsync as a daemon.....
done!

This client is ready to have its image retrieved.  You must now run 
the "si_getimage" command on your imageserver.

Automatically create configuration file for systemconfigurator:
  >> /etc/systemconfig/systemconfig.conf

Login on your SALI installation server and run:

si_getimage -golden-client gb-r6n1 -image test_image

Client Installation

Installation from PXE environment

See documentation at https://oss.trac.surfsara.nl/pxeconfig

Creating a bootable CD/DVD/usb

During these steps we assume you have unpacked the sali-x86_64-1.5.7.tar.gz in /tmp. So we have all SALI files under /tmp/sali-1.5.7.

The following commands must be present on your Linux machine before you can use the sali_create_bootdisk shell script:

  • genisoimage - On most Linux distributions available in the package genisoimage
  • isohybrid - On most Linux distributions available in the syslinux package

Generate the iso hybrid file

cd /tmp/sali-1.5.7
./bootdisk/sali_create_bootdisk
CREATING A SALI ISO IMAGE

I: -input-charset not specified, using iso-8859-1 (detected in locale settings)
Using ISOLI000.SVN;1 for  /tmp/sali-1.5.7/bootdisk/isolinux/.svn/text-base/isolinux.cfg.svn-base (isolinux.bin.svn-base)
Size of boot image is 4 sectors -> No emulation
 34.11% done, estimate finish Fri Feb  1 16:13:42 2013
 68.09% done, estimate finish Fri Feb  1 16:13:42 2013
Total translation table size: 2048
Total rockridge attributes bytes: 0
Total directory bytes: 22528
Path table size(bytes): 170
Max brk space used 1a000
14689 extents written (28 MB)


CONVERTING IMAGE TO HYBRID IMAGE done

ISO IMAGE HAS BEEN STORED TO
	/tmp/sali-1.5.7/sali-x86_64--hybrid.iso

Burning to cd/dvd

Just use the iso with your favortie burning program

Copy to an USB drive

Make sure your USB drive is unmounted, then use the dd command to copy the iso to the USB drive.

dd if=/tmp/sali-1.5.7/sali-x86_64--hybrid.iso of=/tmp/sdb bs=8192k

Assuming your USB disk is device /dev/sdb on your Linux distribution

Add custom boot entries to the bootable cd/dvd/usb

Adjust the file isolinux/isolinux.cfg to your needs to start installation via rsync or bittorrent. Some examples herebelow to generate a custom bootable SALI cd/dvd/usb. If you open the isolinux/isolinux.cfg you can add your custom entries between the comment lines 'BEGIN HERE' and 'END HERE'

As an example we choose for the image amd64_squeeze_lisa

Installation via rsync:

label install_lisa_squeeze
  menu label Install LISA squeeze via rsync
  kernel /kernel/kernel
  append /images/initrd.img PROTOCOL=rsync GRUB2=yes SCRIPTNAME=amd64_squeeze_lisa VERBOSE_LEVEL=2 rw

Installation via bittorrent

label install_lisa_squeeze_torrent
  menu label Install LISA squeeze via bittorrent
  kernel /kernel/kernel
  append /images/initrd.img PROTOCOL=bittorrent GRUB2=yes SCRIPTNAME=amd64_squeeze_lisa VERBOSE_LEVEL=2 rw
NOTE 1
If you dont have your dhcp configured with sali-imageserver option, you must add IMAGESERVER=<ip of your image server> on the append line.
NOTE 2
If the name of the image is different from the scriptname add variable IMAGENAME=<name of your image> to the append line

Finally run the command sali_create_bootdisk from the bootdisk directory.

Must be rewritten

Last modified 6 years ago Last modified on 02/01/13 16:54:15