Commit c2c8da3a authored by Jan Siersch's avatar Jan Siersch
Browse files

added user guide for ipmi cards

- added script for simple diskless node fs creation
parent 17ea6f27
......@@ -292,6 +292,7 @@ if [[ $doInstallNeutron == true ]]; then
ovs-vsctl add-port br-int $COMPUTENODE_IF_DATA
ln -sf /etc/neutron/plugin.ini.odl /etc/neutron/plugin.ini
chown -R neutron:root /etc/neutron
else
# To install the Networking components
yum install -y openstack-neutron-openvswitch
......
#!/bin/bash
if (( $# != 1 )) || (( $1 < 0 )) || (( $1 > 16 )); then
echo "usage: $0 nodeid"
exit 1
fi
basepath=/tftp/computenode$1
echo "### creating base dir ###"
mkdir -p $basepath/centos6/root/
echo "### installing base system ###"
yum -y --installroot=$basepath/centos6/root/ --releasever=6.6 groupinstall "Base" "Server Platform"
yum -y --installroot=$basepath/centos6/root/ install openssh-server openssh-clients
echo "### setting root password ###"
chmod 700 $basepath/centos6/root/etc/shadow
sed -i "s,^root.*$,$(cat /etc/shadow | grep ^root | sed 's/\!\!//')," $basepath/centos6/root/etc/shadow
chmod 000 $basepath/centos6/root/etc/shadow
echo "### editing mount points ###"
echo > $basepath/centos6/root/etc/fstab <<- EOF
none /tmp tmpfs defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
EOF
echo "### enabling networking ###"
echo "NETWORKING=yes" >> $basepath/centos6/root/etc/sysconfig/network
echo "### configuring network interface ###"
echo > $basepath/centos6/root/etc/sysconfig/network-scripts/ifcfg-eth0 <<- EOF
DEVICE="eth0"
BOOTPROTO="dhcp"
IPV6INIT="no"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
EOF
echo "### copying root user config ###"
cp -f /root/.bashrc /root/.bash_profile $basepath/centos6/root/root/
echo "### creating boot kernel and image ###"
kernver=$(ls -lt /boot | grep initramfs | head -n 1 | tr -s " " | rev | cut -d " " -f 1 | rev | sed 's/^initramfs-//;s/.img$//')
cp /boot/vmlinuz-$kernver $basepath/centos6/vmlinuz
dracut $basepath/centos6/initramfs.img $kernver
chmod 644 $basepath/centos6/initramfs.img
chmod 755 $basepath/centos6/vmlinuz
echo "### configuring bootstrap kernel ###"
cp /usr/share/syslinux/pxelinux.0 $basepath/
mkdir -p -m 755 $basepath/pxelinux.cfg/
echo > $basepath/pxelinux.cfg/default <<- EOF
default centos6
label centos6
kernel centos6/vmlinuz
append initrd=centos6/initramfs.img root=nfs:10.1.1.15:$basepath/centos6/root rw selinux=0 lowres ip=dhcp xencons=ttyS0 console=tty console=ttyS0,19200n8
EOF
echo "### filesystem constructed ###"
echo "### you have to edit exports and dhcp entries manually ###"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment