kickstart install system - hpckp · kickstart install system ... kickstart file to install fedora...

13
KICKSTART INSTALL SYSTEM David Ramírez Alvarez HPC & IT Manager Sistemas Informáticos Europeos WWW.CLUSTERSIE.COM [email protected] HPC SYSADMIN CONFERENCE 2014

Upload: dangnga

Post on 07-Sep-2018

245 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: KICKSTART INSTALL SYSTEM - HPCKP · KICKSTART INSTALL SYSTEM ... kickstart file to install Fedora or Red Hat Enterprise Linux on multiple machines, making it ideal for network and

KICKSTART INSTALL SYSTEM

David Ramírez Alvarez

HPC & IT Manager – Sistemas Informáticos Europeos

WWW.CLUSTERSIE.COM

[email protected]

HPC SYSADMIN CONFERENCE 2014

Page 2: KICKSTART INSTALL SYSTEM - HPCKP · KICKSTART INSTALL SYSTEM ... kickstart file to install Fedora or Red Hat Enterprise Linux on multiple machines, making it ideal for network and

LADON OS , A FULL SOLUTION BASED ON KICKSTART SYSTEMThis system can be considered a whole solution for HPC environments based on Open-Source and Centos 6.4

Thanks to HPCSYSADMIN TEAM FOR MAKING IT POSSIBLE

It is a very simple and stable solution. We have already installed it in several universities in Spain as well as Addis Ababa (Ethiopia). We did it, mainly to upgrade old HPC Systems improving its performance.

It’s based on kickstarting system. It allows it to be installed in a local, remote or IPMI mode.

Its main characteristics are:

• Groups, users and hosts are controlled by NIS Services. • The queue system is “Open Grid Scheduler”.• It installs nodes through PXE and Kickstart.• Monitoring tools: Ganglia, Nagios, LogAnalyzer.• Tested on Infiniband, CUDA and “Intel PHI” Hardware Componets.• Fully customized.

Page 3: KICKSTART INSTALL SYSTEM - HPCKP · KICKSTART INSTALL SYSTEM ... kickstart file to install Fedora or Red Hat Enterprise Linux on multiple machines, making it ideal for network and

THE KICKSTART SYSTEM

History:

Many system administrators would prefer to use an automated installationmethod to install Fedora, Centos or Red Hat Enterprise Linux on their machines. Toanswer this need, Red Hat created the kickstart installation method. Using kickstart,a system administrator can create a single file containing the answers to all thequestions that would normally be asked during a typical installation.

Kickstart files can be kept on a server system and read by individual computersduring the installation. This installation method can support the use of a singlekickstart file to install Fedora or Red Hat Enterprise Linux on multiple machines,making it ideal for network and system administrators through standard Red Hatinstallation program Anaconda.

Anaconda will produce an anaconda-ks.cfg configuration file at the end of any manual installation. This file can be used to automatically reproduce the same installation or edited (manually or with “system-config-kickstart”).

Kickstart is not a clone tool !!

Kickstart is a very simple and fast system. In one word: EASY TO USE !!!

Page 4: KICKSTART INSTALL SYSTEM - HPCKP · KICKSTART INSTALL SYSTEM ... kickstart file to install Fedora or Red Hat Enterprise Linux on multiple machines, making it ideal for network and

KICKSTART USE ON A HPC NODE

NODE’S PXE

LISTENS FROM

DHCP SERVER

LOADS THE

BOOT FILES

AND KERNELL

PARAMETERS

WITH THE KS

CONFIG FILE

AND INSTALLS IT

GENERALLY PXE LOADS AUTOMATICALLY ON NEW SYSTEMS.OTHERWISE YOU CAN USE IT TROUGH “F12” KEY, BIOS BOOTLOADER

OR IPMI TOOLS TO INVOQUE IT.ipmitool -I lanplus –U * -P * -H * chassis bootdev pxe

Page 5: KICKSTART INSTALL SYSTEM - HPCKP · KICKSTART INSTALL SYSTEM ... kickstart file to install Fedora or Red Hat Enterprise Linux on multiple machines, making it ideal for network and

KICKSTART USE IN A LOCAL MACHINE

INSERT INSTALL

SOURCE

For instance: DVD

or Memory Stick

DEFINING THE

KS FILE

LOCATION

AND INSTALLS IT

Page 6: KICKSTART INSTALL SYSTEM - HPCKP · KICKSTART INSTALL SYSTEM ... kickstart file to install Fedora or Red Hat Enterprise Linux on multiple machines, making it ideal for network and

INSTALLATION PROCESS IN MACHINE

Page 7: KICKSTART INSTALL SYSTEM - HPCKP · KICKSTART INSTALL SYSTEM ... kickstart file to install Fedora or Red Hat Enterprise Linux on multiple machines, making it ideal for network and

THE KS FILE “GRAPHICAL CONFIGURE TOOL”“system-config-kickstart tool”

This tool enables you to define these parametresthrough a simple way, such as:

• Users and groups.• Install method.• Partition disks (Simple).• Software Packages.• Language and location.• Pre and Post Installation scripts• And more …

Page 8: KICKSTART INSTALL SYSTEM - HPCKP · KICKSTART INSTALL SYSTEM ... kickstart file to install Fedora or Red Hat Enterprise Linux on multiple machines, making it ideal for network and

THE KS.CFG FILE “MANUALLY EDITING” - PART 1

#platform=x86, AMD64 o Intel EM64T#version=DEVEL# Firewall configurationfirewall --enabled --http --ssh --service=ssh# Install OS instead of upgradeinstall# Use CDROM installation mediacdrom# Root passwordrootpw XXXXX# System authorization informationauth --useshadow --passalgo=sha512# Use text mode install.firstboot --disable

Straight file editing “Kickstart.cfg”

In this file we configure:

• 64 bits platform with new installation.• Firewall configuration.• DVD installation.• Local authentication• Language and keymap.• Interactive method.• Disabling Selinux• Rebooting the machine after installation.

# System keyboardkeyboard es# System languagelang en_US# SELinux configurationselinux --disabled# Reboot after installationreboot# System timezonetimezone Europe/Madrid

Page 9: KICKSTART INSTALL SYSTEM - HPCKP · KICKSTART INSTALL SYSTEM ... kickstart file to install Fedora or Red Hat Enterprise Linux on multiple machines, making it ideal for network and

THE KS.CFG FILE “MANUALLY EDITING” - PART 2

# System bootloader configurationbootloader --append="crashkernel=auto rhgb quiet" --location=mbr --driveorder="sda,sdb"# Clear the Master Boot Recordzerombr# Partition clearing informationclearpart --all --initlabel# Disk partitioning informationpart raid.008001 --fstype="raid" --size=25000 --ondisk=sdapart raid.008002 --fstype="raid" --grow --size=200 --ondisk=sdapart raid.008017 --fstype="raid" --size=25000 --ondisk=sdbpart raid.008018 --fstype="raid" --grow --size=200 --ondisk=sdbraid / --device=md0 --fstype="ext4" --level=1 raid.008001 raid.008017raid pv.009001 --device=md1 --level=1 raid.008002 raid.008018volgroup ladon --pesize=4096 pv.009001

logvol /data --fstype=xfs --name=data --vgname=ladon --size=10000 logvol /home --fstype=xfs --name=home --vgname=ladon --size=1000000 logvol /opt --fstype=xfs --name=opt --vgname=ladon --size=15000 #logvol /scratch --fstype=xfs --name=scratch --vgname=ladon --size=250000 logvol swap --name=swap --vgname=ladon --size=8000 logvol /tmp --fstype=xfs --name=tmp --vgname=ladon --size=20000 logvol /usr/local --fstype=xfs --name=usrl --vgname=ladon --size=25000

• CLEAR MBR ON ALL DISKS.

• CLEAR ALL PARTITIONS.

• CREATE TWO RAID PARTS IN TWO DISKS.

• CREATE MD DEVICES.

• CREATE LVM OVER RAID

• CREATE LOGICAL VOLUMES

• SIZES ARE IN MB250000 = 250.000 MB = 250 GB

Page 10: KICKSTART INSTALL SYSTEM - HPCKP · KICKSTART INSTALL SYSTEM ... kickstart file to install Fedora or Red Hat Enterprise Linux on multiple machines, making it ideal for network and

THE KS.CFG FILE - PART 3

%postmkdir -p /sharemkdir -p /root/.sshecho "192.168.2.10:/home /home nfs defaults 0 0" >> /etc/fstabecho "192.168.2.10:/usr/local /usr/local nfs defaults 0 0" >> /etc/fstabecho "192.168.2.10:/opt /opt nfs defaults 0 0" >> /etc/fstabecho "192.168.2.10:/share /share nfs defaults 0 0" >> /etc/fstabmount /sharecp /share/nodo/id_dsa.pub /root/.ssh/authorized_keys

rm -rf /etc/yum.repos.d/*cp /share/nodo/yum/* /etc/yum.repos.d/

yum groupinstall -y "Development Tools"yum install -y binutils gcc make patch apcupsd libgomp ….

tar -xpf /share/nodo/gangliacennodo.tgz -C /chkconfig gmond onecho source /opt/bash.bashrc.local.sge >> /etc/bashrc%end

• CREATING DIRECTORIES

• CONFIGURING NFS FOLDERS

• INSERTING PUBLIC KEYS TO AUTHENTICATE

• IMPORTING CUSTOMS REPOSITORIES.

• INSTALLING SOFTWARES AND LIBRARIES.

• CUSTOMIZING SOURCES, SERVICES AND APPS

• AND MUCH MORE…

Page 11: KICKSTART INSTALL SYSTEM - HPCKP · KICKSTART INSTALL SYSTEM ... kickstart file to install Fedora or Red Hat Enterprise Linux on multiple machines, making it ideal for network and

MY REAL KSNODE.CFG FILE – PART 1

#platform=x86, AMD64, or Intel EM64T#version=DEVEL# Firewall configurationfirewall --disabled# Install OS instead of upgradeinstallnfs --server=192.168.2.10 --dir=/share/Centos/6/os/x86_64/# Root passwordrootpw --iscrypted $1$.6J3E/1E$io0kMnhGHo0mUlDvVJNql1# System authorization informationauth --useshadow --passalgo=sha512 --enablenis --nisdomain=ladon.local --nisserver=192.168.2.10# Use text mode installtext# System keyboardkeyboard es

# System languagelang en_US# SELinux configurationselinux --disabled# Do not configure the X Window Systemskipx# Installation logging levellogging --level=info# Reboot after installationreboot# System timezonetimezone Europe/Madrid# unsupported_hardware ( I am testing it)unsupported_hardware# Network informationnetwork --bootproto=dhcp --device=eth0 --onboot=on

Page 12: KICKSTART INSTALL SYSTEM - HPCKP · KICKSTART INSTALL SYSTEM ... kickstart file to install Fedora or Red Hat Enterprise Linux on multiple machines, making it ideal for network and

MY REAL KSNODE.CFG FILE – PART 2# Partition clearing informationclearpart --all --initlabel# Disk partitioning informationpart swap --fstype="swap" --size=32000part / --fstype="ext4" --size=25000part /var --fstype="ext4" --size=15000part /tmp --fstype="ext4" --size=15000part /scratch --fstype="ext4" --grow --size=1%postmkdir -p /sharemkdir -p /root/.sshecho "192.168.2.10:/home /home nfs defaults 0 0" >> /etc/fstabecho "192.168.2.10:/usr/local /usr/local nfs defaults 0 0" >> /etc/fstabecho "192.168.2.10:/opt /opt nfs defaults 0 0" >> /etc/fstabecho "192.168.2.10:/share /share nfs defaults 0 0" >> /etc/fstabmount /sharecp /share/nodo/id_dsa.pub /root/.ssh/authorized_keysrm -rf /etc/yum.repos.d/*cp /share/nodo/yum/* /etc/yum.repos.d/yum groupinstall -y "Development Tools“ yum install -y binutils gcc make patch apcupsd libgomp glibc-headers glibc-devel ganglia-gmondchkconfig ntpd on && chkconfig apcupsd on && chkconfig cpuspeed off && chkconfig gmond onsed -i.bak 's/^PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_configtar -xpf /share/nodo/gangliacennodo.tgz -C /echo source /opt/bash.bashrc.local.sge >> /etc/bashrc

%packages@base@core@debugging@directory-client@fonts@java-platform@legacy-x@nfs-file-server@server-platform@server-policy%end

perl -p -i -e 's/^(\s+kernel.*)$/$1 serial console=ttyS1,115200n8/' /boot/grub/grub.confecho "" >> /etc/inittabecho "# Run serial console on ttyS1" >> /etc/inittabecho "S1:2345:respawn:/sbin/agetty ttyS1 115200n8 vt100" >> /etc/inittabecho "ttyS1" >> /etc/securetty%end

Page 13: KICKSTART INSTALL SYSTEM - HPCKP · KICKSTART INSTALL SYSTEM ... kickstart file to install Fedora or Red Hat Enterprise Linux on multiple machines, making it ideal for network and

LIVE DEMO & THANKS FOR YOUR PATIENCE !!

REFERENCES:http://www.server-world.info/en/note?os=CentOS_6&p=pxehttp://www.server-world.info/en/note?os=CentOS_6&p=pxe&f=3http://www.centos.org/docs/5/html/Installation_Guide-en-US/ch-redhat-config-kickstart.htmlhttp://en.wikipedia.org/wiki/Cobbler_(software)https://fedoraproject.org/wiki/Anaconda/Kickstart

YOU CAN DOWNLOAD MY DEMO FILE AT (with wget)http://www.ladon.es/hpc14.demo

FOR ANY HELP OR MORE [email protected]