OpenHPC:OpenStack OS Image
Jump to navigation
Jump to search
Prepare a filesystem CHROOT image
Create /usr/libexec/warewulf/wwmkchroot/centos7.1-kilo.tmpl to point to updated repo data
[root@head setup-filesystems]# cat /usr/libexec/warewulf/wwmkchroot/centos7.1-kilo.tmpl
#DESC: A clone of Red Hat Enterprise Linux 7
# The general RHEL include has all of the necessary functions, but requires
# some basic variables specific to each chroot type to be defined.
. include-rhel
# Define the location of the YUM repository
YUM_MIRROR="http://mirror.centos.org/centos-7/7.2.1511/os/\$basearch/"
# Install only what is necessary/specific for this distribution
PKGLIST="SysVinit basesystem bash redhat-release chkconfig coreutils e2fsprogs \
ethtool filesystem findutils gawk grep initscripts iproute iputils \
mingetty mktemp net-tools nfs-utils pam portmap procps psmisc rdate rsync \
sed setup shadow-utils rsyslog tcp_wrappers tzdata util-linux words zlib \
tar less gzip which util-linux module-init-tools udev openssh-clients \
openssh-server dhclient pciutils vim-minimal shadow-utils strace cronie \
crontabs cpuspeed cpufrequtils cpio wget yum numactl libicu"
# vim:filetype=sh:syntax=sh:expandtab:ts=4:sw=4:Add CHROOTKILO=/opt/ohpc/admin/images/centos7.1-kilo to ~/.bashrc
Make Initial VNFS (Chroot, compute Node template) and install some Base components into the chroot operating system
wwmkchroot centos-7 $CHROOTKILO
yum -y --installroot=$CHROOTKILO groupinstall Base
yum -y --installroot=$CHROOTKILO install kernel* grub* sudo ipmitool* epel-release htop nano tk* tcl* tigervnc* ipmitool* freeipmi* cairo* perl* gcc* glibc* screen yum-utils vim ntp libnl
lsof libxml2-python python mlocate numactl* lmod-ohpc ohpc-slurm-client lmod-ohpc ganglia-gmond-ohpc enviroment-modules hwlock-libs libfabric libpsm2 intel-clck-ohpcSetup SSH Keys for the Cluster – this is required for the root user only, /home will be exported so user ssh keys will be available.
wwinit ssh_keys
cat ~/.ssh/cluster.pub >> $CHROOTKILO/root/.ssh/authorized_keysCopy over resolv.conf to the chroot and modify the contents to point to the headnode and google dns.
cp /etc/resolv.conf $CHROOTKILO/etc/
vi $CHROOTKILO/etc/resolv.confModify Limits to unlimited on headnode and compute nodes..
echo "* soft memlock unlimited" >> $CHROOTKILO/etc/security/limits.conf
echo "* hard memlock unlimited" >> $CHROOTKILO/etc/security/limits.confBuilding the bootstrap and vnfs images
[root@head setup-filesystems]# wwbootstrap 3.10.0-327.10.1.el7.x86_64
Number of drivers included in bootstrap: 433
Number of firmware images included in bootstrap: 93
Building and compressing bootstrap
Integrating the Warewulf bootstrap: 3.10.0-327.10.1.el7.x86_64
Including capability: provision-adhoc
Including capability: provision-files
Including capability: provision-selinux
Including capability: provision-vnfs
Including capability: setup-filesystems
Including capability: transport-http
Compressing the initramfs
Locating the kernel object
Bootstrap image '3.10.0-327.10.1.el7.x86_64' is ready
Done.
[root@head setup-filesystems]# wwvnfs -y --chroot $CHROOTKILO
Using 'centos7.1-kilo' as the VNFS name
Creating VNFS image from centos7.1
Building new chroot...
Building and compressing the final image
Cleaning temporary files
VNFS 'centos7.1-kilo' has been imported
Done.
Wrote a new configuration file at: /etc/warewulf/vnfs/centos7.1-kilo.conf