-
Notifications
You must be signed in to change notification settings - Fork 26
QuickStartGuide
- An installed and supported distro (CentOS-6, CentOS-7, Fedora-27, Fedora-28, SuSE-42)
- EPEL repo for rhel-6 and rhel-7
- EPEL-rhel6: rpm -ivh https://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/e/epel-release-6-8.noarch.rpm
- EPEL-rhel7: rpm -ivh https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
- Fedora: nothing needed
- SuSE-42: nothing needed so far
- debian: package not yet complete. (package not working)
- all packages needed for booting a network client:
- DHCP server, tftp-server, PXE binaries (syslinux-tftpboot)
- systemimager packages (deb needs packaging update, though you can build and install from sources once you've installed all deps (at least dracut and dracut-network)
- For rpm based distro, look for oscar-release rpm in http://www.usablesecurity.net/OSCAR/repos/unstable/ and install it; it'll configure the repo for you. (This repo is subject to change in the future for a SystemImager dedicated one). => example: rpm -ivh http://www.usablesecurity.net/OSCAR/repos/unstable/rhel-7-x86_64/oscar-release-6.1.3-0.20190513.el7.noarch.rpm
- yum -y install systemimager-server dracut-systemimager systemimager-initrd_template systemimager-common systemimager-x86_64boot-standard systemimager-doc systemimager-client
-
/etc/systemimager/systemimager.conf => Check if all default values suit your needs and filesystem hierarchy is correct.
-
DHCP
- /usr/sbin/si_mkdhcpserver => This will produce a /etc/dhcp/dhcpd.conf file. Check it and tweak it for your needs, then restart the dhcpd service on systemd: systemctl restart dhcpd.service on init.d: service dhcpd restart
-
PXE
- /usr/sbin/si_mkbootserver
- Check that you have at least a correct entry in the <tftpdir>/pxelinux.cfg/default => example:
LABEL sisCO7 MENU DEFAULT MENU LABEL ^7 - Install an OSCAR Node using CentOS7 imager KERNEL CO7-kernel APPEND initrd=CO7-initrd.img si.skip-local-cfg=yes si.image-server=10.0.2.2 si.monitor-server=10.0.0.2 si.monitor-console=yes si.config=mynode.conf si.post-action=directboot acpi=no noapic vga=795 splash quiet rd.vconsole.keymap=fr
-
Rsync
- si_mkrsyncd_conf (you should have /etc/systemimager/rsync_stubs/40<yourimagename> created, /etc/systemimager/rsyncd.conf updated and rsync daemon running the systemimager rsync configuration.)
-
Systemimager parameters: => SystemImager supports multiple ways to specify parameters.
-
DHCP options traditional way, but it only supports few parameters: image-server, log-server-port, ssh-download-url, flamethrower-directory-port-base and tmpfs-staging
-
PXE cmdline just like any dracut based initramfs, systemimager supports cmdline parameters all starting with the "si." prefix. => see SystemImager imager parameters. => man systemimager.cmdline => man dracut.cmdline => man kernel.cmdline
-
configs directory: /var/lib/systemimager/scripts/configs/ it contains files with systemimager variables similar to local.cfg except that it's not local ;-) The file is retrieved once network is established. it is either specified using the si.config= PXE cmdline parameter or if a ${IMAGENAME}.conf exists in this directory, then it is read. example: see template
-
disks-layouts directory: /var/lib/systemimager/scripts/disks-layouts It contains files with disks layout and bootloader infos in xml format. man systemimager.disks-layout for description of format. example (complex one) This is the evolution of autoinstallscript.conf that was stored in <imagedir>/<imagename>/etc/systemimager/autoinstallscript.conf => If you are migrating, just copy the old autoinstallscript.conf anf add a bootloader section. To verify file concistency: si_lint --disks-layout=<you disk layout file.xml>
-
network-configs directory: /var/lib/systemimager/scripts/network-configs It contains files with client network configurations in xml format. This file is optional but highly recommanded. IF it is missing, the imager will configure the PXE booted interface in client. (This config file support bonding, infiniband and aliases, so it's convenient if you want to configure more than one interface) man <systemimager.network-config> for description of format. example: (complex one) To verify file concistency: si_lint --network-config=<you network config file.xml>
-
local.cfg (deprecated but still supported) Same as above except it is read from old hard drive or from a floppy (USB stick will be supported later). example: /usr/share/doc/systemimager-server/local.cfg
-
- Using golden client and si_getimage
On client: install systemimager-client (yum -y install systemimager-client)
then issue the following command:
si_prepareclient --server <hostname or ip of your systemimager server>Then, on server do:si_getimage --golden-client <you golden client> --image <image-name> --post-install=directboot=> Note than now, the imaging main script is optional and thus not generated by default. If you want one, you can ask for it, but it'll be a mostly empty skeleton as all disk, image download and extraction, and network configuration command are now dynamically done by imager from the xml configuration files. These method is smarter and doesn't require any regeneration upon configuration change. (and is robust as the xml is validated) - Using mksiimage from systeminstaller-oscar package mksiimage --name --filename /usr/share/oscar/oscarsamples/pkglists/centos-7-x86_64.pkglist
- Prerequisites:
- dhcp server is up and running
- rsyncd is up and running
- an image exists in /var/lib/systemimager/images/<imagename>
- a disk layout exists in /var/lib/systemimager/scripts/disks-layouts/<name>.xml You can validate it using the following command: si_lint --disks-layout=<name>.xml
- an optional (though recommanded) network configuration exists in /var/lib/systemimager/scripts/network-configs/<name>.xml You can validate it using the following command: si_lint --network-config=<name>.xml (Note: the file format is not final yet eventhough it's already near final v1)
- at least si.config= is set in pxe cmdline and a /var/lib/systemimager/scripts/configs/<name>.conf exists and has $IMAGENAME set or si.image-name= is set in pxe cmdline
- no firewall blocks rsync and other systemimager ports
- boot the client using PXE (usually, if PXE boot is not default, pressing F12 at bios boot enables PXE boot).
In PXE menu, choose the appropriate entry you've defined. It should load systemimager imager initramfs.
- steps performed by the imager:
- parse cmdline parameters (defined in PXE kernel cmdline)
- runs pre-install scripts if any
- format disk (and mount partitions to /sysroot)
- runs main-install if one is defined or if a script name matches hostname
- download image to disk
- install any mdraid or/and lvm configs in imaged system
- configures the client network
- installs the bootloader
- runs post-install scripts
- Unmount /sysroot and its dependancies
- execute post imaging action (either wait, reboot, shutdown of finish booting if modules installed on client match imager kernel).
- steps performed by the imager:
-
si_monitor_tk
Runs this command from server to see imaging progress and see remotely what the console prints on the client being imaged (requires an X11 display).
- recreating a new systemimager boot initrd can be done using si_mkbootpackage (can be useful when a new kernel or new firmwares are made available by distro).
