Systemimager
De Enciclopedia Colaborativa de la Comunidad Canaima
Tabla de contenidos |
. ¿Qué es SystemImager?
Este software automatiza las instalaciones, distribución de programas y el proceso de desarrollo; además de generar copias (clones) de equipos, distribución de configuraciones, cambios en el sistema, al grado de poder cambiar las versiones de Linux a través de la red.
El proceso se centra en tomar una imagen de un sistema principal y replicarlo al resto de los equipos, guardando las copias en su disco duro. Esto nos implica que el equipo que realice estas actividades debe contar con suficientes recursos para evitar cuellos de botella.
SystemImager está disponible vía APT-GET para Debian Linux, además de versiones en RPM y en TARBALL, lo que facilita su instalación en la mayoría de las distribuciones, siendo su único requisito en este aspecto tener el kernel 2.0 o superior. Una recomendación muy importante es que la configuración de los equipos sea lo más similar posible, para evitar conflictos por carga de módulos no compatibles con los componentes.
. Licencia
Es distribuido bajo licencia GPL.
.Requerimientos mínimos de hardware y software
Software:
Hardware:
Computador tipo PC con procesador Pentuim
Disco Duro 1GB de espacio en disco
. Instalación
Instalación de Systeimager via apt-get ó aptitude
# aptitude install systemimager-boot-i386-standard systemimager-boot-ia64-standard # aptitude install systemimager-client systemimager-common systemimager-server systemimager-server-flamethrowe
Descarga de los paquetes necesarios para la instalación
$ mkdir systemimager $ cd systemimager $ wget http://download.systemimager.org/pub/sis-install/install $ chmod u+x install $ ./install -v --download-only --tag stable --directory . systemconfigurator \ > systemimager-client systemimager-common \ > systemimager-i386boot-standard systemimager-i386initrd_template \ > systemimager-server \ > systemimager-bittorrent systemimager-flamethrower
Instalamos paquetes necesarios para el funcionamiento del systemimager
# apt-get install cramfsprogs e2fslibs-dev ncurses-dev libreadline5-dev rsync python-dev libtool \ gettext zlib1g-dev libssl-dev libxml-simple-perl perl-tk uuid-dev flex bzip2 g++ libappconfig-perl \ autoconf libdevmapper-dev docbook-utils docbook-to-man syslinux dpkg-dev pxe tftpd-hpa
Creamos el Golden Client en el servidor de imagenes
Preparamos el cliente
# si_prepareclient --server direccion_ip_del_servidor Welcome to the SystemImager si_prepareclient command. This command may modify the following files to prepare your golden client for having it's image retrieved by the imageserver. It will also create the /etc/systemimager directory and fill it with information about your golden client. All modified files will be backed up with the .before_systemimager-3.6.3 extension. /etc/services: This file defines the port numbers used by certain software on your system. Entries for rsync will be added if necessary. /tmp/rsyncd.conf.13805: This is a temporary configuration file that rsync needs on your golden client in order to make your filesystem available to your SystemImager server. inetd configuration: SystemImager needs to run rsync as a standalone daemon on your golden client until it's image is retrieved by your SystemImager server. If rsyncd is configured to run as a service started by inetd, it will be temporarily disabled, and any running rsync daemons or commands will be stopped. Then, an rsync daemon will be started using the temporary configuration file mentioned above. See "si_prepareclient --help" for command line options. Continue? (y/[n]): y *********************************** WARNING *********************************** This utility starts an rsync daemon that makes all of your files accessible by anyone who can connect to the rsync port of this machine. This is the case until you reboot, or kill the 'rsync --daemon' process by hand. By default, once you use si_getimage to retrieve this image on your imageserver, these contents will become accessible to anyone who can connect to the rsync port on your imageserver. See rsyncd.conf(5) for details on restricting access to these files on the imageserver. See the systemimager-ssh package for a more secure method of making images available to clients. *********************************** WARNING *********************************** Continue? (y/[n]): y
Y en el servidor subimos la imagen ya preparada
# si_getimage --golden-client direccion_ip_del_cliente --image nombre_de_la_imagen
<Bunch of stuff rolls by>
wrote 348396 bytes read 427266670 bytes 345826.98 bytes/sec
total size is 425694030 speedup is 1.00
IMAGE RETRIEVAL FINISHED
Press <Enter> to continue...
Page clears
IP Address Assignment
There are four ways to assign IP addresses to the client systems on an
ongoing basis:
1) DHCP
A DHCP server will assign IP addresses to clients installed with
this image. They may be assigned a different address each time.
If you want to use DHCP, but must ensure that your clients
receive the same IP address each time, see "man mkdhcpstatic".
2) STATIC
The IP address the client uses during autoinstall will be
permanently assigned to that client.
3) REPLICANT
Don'mess with the network settings in this image. I' using
tm
it as a backup and quick restore mechanism for a single machine.
Which method do you prefer? [1]:
You have chosen method 1 for assigning IP addresses.
Are you satisfied? ([y]/n): y
Iniciamos el servicio de Systemimager en el servidor de imagenes
# /etc/init.d/systemimager-server-rsyncd start
Ahora configuramos el servidor de booteo (hay que interactuar con varias preguntas)
# si_mkbootserver This script may modify the following files: /etc/services /etc/inetd.conf /etc/xinetd.d/tftp You should already have a kernel and ramdisk to use. Do you wish to continue (y/[n])?y Ok, continuing... Where should tftpd serve files from ([/tftpboot]? enter Checking for a tftp server... found. Checking if tftp server is H. Peter Anvin's tftp server... yup - right on! Checking for a running inetd... 3073. Checking for a running xinetd... Not found. Looking for update-inetd... found. Updating inetd.conf... done. Sending a SIGHUP to inetd (pid 3073)... done. Looking for a tftp client... found. Checking for loopback interface... up. Does tftp server work... yes. Looking for a pxe daemon... found. /etc/pxe.conf does not already exist, so not backing it up. What network interface should pxe run on? ([eth0])? Colocamos la interfaz de red a utilizar Checking to make sure eth1 exists... yeah. Checking to make sure eth1 is up... yup. Will the DHCP server be running on this machine? ([y]/n)? enter Restarting pxe daemon... Stopping pxe: pxe. Starting pxe: pxe. done. Checking to see if pxe daemon exited silently... nope - still running :) done. What is thCopying /usr/lib/syslinux/pxelinux.0 to /tftpboot/X86PC/UNDI/linux-install/linux.0 ... done. Linking /tftpboot/pxelinux.bin to /tftpboot/X86PC/UNDI/linux-install/linux.0 ...done. What is the full pathname of the kernel you want to use? [(/usr/share/systemimager/boot/i386/standard/kernel)] Copying /usr/share/systemimager/boot/i386/standard/kernel to /tftpboot/X86PC/UNDI/linux-install/kernel ... done. Linking /tftpboot/kernel to /tftpboot/X86PC/UNDI/linux-install/kernel ...done. What is the full pathname of the compressed ramdisk (initrd.img) you want to use? [(/usr/share/systemimager/boot/i386/standard/initrd.img)] Copying /usr/share/systemimager/boot/i386/standard/initrd.img to /tftpboot/X86PC/UNDI/linux-install/initrd.img ... done. Linking /tftpboot/initrd.img to /tftpboot/X86PC/UNDI/linux-install/initrd.img ...done. Copying /tftpboot/X86PC/UNDI/linux-install/pxelinux.cfg to /tftpboot/pxelinux.cfg...Ok, configuration complete. Once you're DHCP server is configured, you should be all set. Do you want to run si_mkdhcpserver to configure your DHCP server ([y]/n)?enter Welcome to the SystemImager "si_mkdhcpserver" command. This command will prepare this computer to be a DHCP server by creating a dhcpd.conf file for use with your ISC DHCP server (v2 or v3). If there is an existing file, it will be backed up with the .beforesystemimager extension. Continue? (y/[n]):y Type your response or hit <Enter> to accept [defaults]. If you don't have a response, such as no first or second DNS server, just hit <Enter> and none will be used. What is your DHCP daemon major version number (2 or 3)? [3]:enter Are you using the fixed-address patch (Y or N)? [n]:enter What is the name of your DHCP daemon config file? [/etc/dhcp3/dhcpd.conf]:enter What is your domain name? []: Escribir el nombre del dominio What is your network number? [192.168.1.0]: Escribir la direccion de la red What is your netmask? [255.255.255.0]: Escribir la mascara de subred What is the starting IP address for your dhcp range? [192.168.1.1]: Colocamos la direccion de inicio del rango a repartir What is the ending IP address for your dhcp range? [192.168.1.100]: Colocamos la direccion final del rango a repartir What is the IP address of your first DNS server? []: Colocamos la direccion de los DNS What is the IP address of your default gateway? [192.168.1.254]: Colocamos la direccion de la puerta de enlace What is the IP address of your image server? [192.168.1.254]: Colocamos la direccion de nuestro servidor de imagenes What is the IP address of your boot server? []: Colocamos la direccion de nuestro servidor de booteo What is the IP address of your log server? []: Colocamos la direccion de nuestro servidor de log o bitacoras Use tmpfs staging on client? (If unsure, choose "n") [n]:Si queremos usar archivos temporales con memoria virtual Do you want to use Flamethrower (multicast) to install your clients? [n]: Si se desea instalar de forma multiple en varios clientes al mismo tiempo What... is the air-speed velocity of an unladen swallow? []:african or eruopean? Ahh, but seriously folks... Here are the values you have chosen:
####################################################################### ISC DHCP daemon version: 3 DHCP daemon using fixed-address patch: N ISC DHCP daemon config file: /etc/dhcp3/dhcpd.conf DNS domain name: nombre del dominio Network number: direccion de red Netmask: mascara de subred Starting IP address for your DHCP range: direccion de inicio del rango a repartir Ending IP address for your DHCP range: direccion final del rango a repartir First DNS server: direccion del servidor dns Second DNS server: Third DNS server: Default gateway: direccion de la puerta de enlace Image server: direccion del servidor de imagenes Boot server: direccion del servidor de booteo Log server: direccion del servidor de log o bitacoras Log server port: Flamethrower directory port: 9000 Use tmpfs staging on client: n SSH files download URL: ####################################################################### Are you satisfied? (y/[n]):y
The dhcp server configuration file (/etc/dhcp3/dhcpd.conf) file has been
created for you. Please verify it for accuracy.
If this file does not look satisfactory, you can run this command again
to re-create it: "si_mkdhcpserver"
WARNING!: If you have multiple physical network interfaces, be sure to
edit the init script that starts dhcpd to specify the interface that
is connected to your DHCP clients. Here's an example:
Change "/usr/sbin/dhcpd" to "/usr/sbin/dhcpd eth1".
Depending on your distribution, you may be able to set this with the
"INTERFACES" variable in "/etc/default/dhcp", "/etc/default/dhcp3-server",
or similar, or in your dhcpd initialization script ("/etc/init.d/dhcpd",
"/etc/init.d/dhcp3-server", or similar).
Also, be sure to start or restart your dhcpd daemon. This can usually
be done with a command like "/etc/init.d/dhcpd restart" or similar.
Would you like me to restart your DHCP server software now? (y/[n]): colocamos [y] si queremos reiniciar el servicio de dhcp
Ahora configuramos que descripcion le vamos a entregar a las equipos clientes
#si_addclients Welcome to the SystemImager "si_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 "/var/lib/systemimager/scripts" 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): enter
si_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? []: Colocamos el nombre del dominio
What is the base host name that you want me to use? []: Colocamos el nombre base que desee que tengan las imagenes
What number should I begin with? []: Numero de inicio de las imagenes
What number should I end with? []: Numero final de las imagenes
I will work with hostnames: Nombre base con el numero de inicio hasta el nombre base y el numero final
in the domain: Nombre del dominio
Are you satisfied? (y/[n]): y
si_addclients -- Section 2 (soft links to master script)
--------------------------------------------------------------------------------
Would you like me to create soft links to a "master" script so that hosts:
xxx10 through xxx20
can be autoinstalled with that image? ([y]/n): enter
Luego añadimos al servidor la direccion ip que tiene la maquina cliente que tiene que ser otorgada por el servidor dhcp que configuramos anteriormente
si_mkclientnetboot --netboot --clients "direccion_ip_de_la_maquina_cliente"
Y ahora solo reiniciamos la máquina y esperemos a que bootee por red y el servidor se encargará del resto.
.Ayuda y documentación
Documentación
http://wiki.systemimager.org/index.php/Main_Page
|
[subir] |

