Difference between revisions of "OpenHPC:OpenStack OS Image"
Jump to navigation
Jump to search
(Created page with "== Prepare a filesystem CHROOT image == '''Create <Code>/usr/libexec/warewulf/wwmkchroot/centos7.1-kilo.tmpl</code> to point to updated repo data <syntaxhighlight> [root@head setup-fil...") |
|||
| Line 1: | Line 1: | ||
== Prepare a filesystem CHROOT image == | == Prepare a filesystem CHROOT image == | ||
| − | + | * Create <Code>/usr/libexec/warewulf/wwmkchroot/centos7.1-kilo.tmpl</code> to point to updated repo data | |
<syntaxhighlight> | <syntaxhighlight> | ||
| Line 31: | Line 31: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | + | * Add <code>CHROOTKILO=/opt/ohpc/admin/images/centos7.1-kilo</code> to <code>~/.bashrc</code> | |
| − | < | + | <syntaxhighlight> |
| − | '''Make Initial VNFS (Chroot, compute Node template) and install some Base components into the chroot operating system''' | + | [root@head images]# cat ~/.bashrc |
| + | # .bashrc | ||
| + | |||
| + | # User specific aliases and functions | ||
| + | |||
| + | alias rm='rm -i' | ||
| + | alias cp='cp -i' | ||
| + | alias mv='mv -i' | ||
| + | alias l='ls -l' | ||
| + | alias ipmit='ipmitool -U ADMIN -P ADMIN -I lanplus -H' | ||
| + | |||
| + | CHROOTKILO=/opt/ohpc/admin/images/centos7.1-kilo | ||
| + | CHROOT=/opt/ohpc/admin/images/centos7.1 | ||
| + | ohpc_repo=http://build.openhpc.community/OpenHPC:/1.0/CentOS_7.1/OpenHPC:1.0.repo | ||
| + | sms_name=head.vscaler.local # Hostanem of Headnode | ||
| + | sms_ip=172.30.0.1 # Private Interface IP of Headnode | ||
| + | sms_eth_internal=enp1s0f0 # Private Interface of Headnode | ||
| + | eth_provision=enp1s0f0 # Provisioning Interface of Headnode | ||
| + | internal_netmask=255.255.0.0 # Netmaks of Private Interface | ||
| + | ntp_server=0.centos.pool.ntp.org # Some NTP Server | ||
| + | bmc_username=ADMIN | ||
| + | bmc_password=ADMIN | ||
| + | sms_ipoib=10.10.20.1 # IPoIB Address of Headnode | ||
| + | ipoib_netmask=255.255.255.0 # IPoIB Netmask of Headnode | ||
| + | |||
| + | # Source global definitions | ||
| + | if [ -f /etc/bashrc ]; then | ||
| + | . /etc/bashrc | ||
| + | fi | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | * Make Initial VNFS (Chroot, compute Node template) and install some Base components into the chroot operating system''' | ||
<syntaxhighlight> | <syntaxhighlight> | ||
Revision as of 11:32, 9 March 2016
Prepare a filesystem CHROOT image
- Create
/usr/libexec/warewulf/wwmkchroot/centos7.1-kilo.tmplto 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-kiloto~/.bashrc
[root@head images]# cat ~/.bashrc
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias l='ls -l'
alias ipmit='ipmitool -U ADMIN -P ADMIN -I lanplus -H'
CHROOTKILO=/opt/ohpc/admin/images/centos7.1-kilo
CHROOT=/opt/ohpc/admin/images/centos7.1
ohpc_repo=http://build.openhpc.community/OpenHPC:/1.0/CentOS_7.1/OpenHPC:1.0.repo
sms_name=head.vscaler.local # Hostanem of Headnode
sms_ip=172.30.0.1 # Private Interface IP of Headnode
sms_eth_internal=enp1s0f0 # Private Interface of Headnode
eth_provision=enp1s0f0 # Provisioning Interface of Headnode
internal_netmask=255.255.0.0 # Netmaks of Private Interface
ntp_server=0.centos.pool.ntp.org # Some NTP Server
bmc_username=ADMIN
bmc_password=ADMIN
sms_ipoib=10.10.20.1 # IPoIB Address of Headnode
ipoib_netmask=255.255.255.0 # IPoIB Netmask of Headnode
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi- 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