warewulf_CentOS7_Master - alex-aleyan/linux_wiki GitHub Wiki
systemctl isolate graphical.target
export ntp_server=$(hostname)
export server_ww_nic="enp0s8"
export ${server_ww_nic_ip}="192.168.1.10"
export ${server_ww_nic_mask}="255.255.255.0"
Setup the repos:
install_centos7_repos.sh
Disable firewall (interferes with warewulf)
install warewulf:
yum -y install ohpc-base
yum -y install ohpc-warewulf
Configure ntpd utility:
systemctl enable ntpd.service
echo "server ${${server_ww_nic_ip}}" >> /etc/ntp.conf
systemctl restart ntpd
Configure nics, database, http and dhcp services:
perl -pi -e "s/device = eth1/device = ${server_ww_nic}/" /etc/warewulf/provision.conf
perl -pi -e "s/^\s+disable\s+= yes/ disable = no/" /etc/xinetd.d/tftp
ifconfig ${server_ww_nic} ${${server_ww_nic_ip}} netmask ${server_ww_nic_mask} up
echo "DHCPDARGS="${server_ww_nic}";" >> /etc/dhcp/dhcpd.conf
systemctl restart xinetd
systemctl enable mariadb.service
systemctl restart mariadb
systemctl enable httpd.service
systemctl restart httpd
systemctl enable dhcpd.service
Build BOS (Base OS) image (other OS')
echo 'export CHROOT=/opt/ohpc/admin/images/centos7' >> /etc/bashrc
mkdir -p $CHROOT
wwmkchroot centos-7 $CHROOT
Import Files:
wwsh file import /etc/passwd
wwsh file import /etc/group
wwsh file import /etc/shadow
Assemble bootstrap image:
export WW_CONF=/etc/warewulf/bootstrap.conf
echo "drivers += updates/kernel/" >> $WW_CONF
echo "drivers += overlay" >> $WW_CONF
wwbootstrap $(uname -r)
wwvnfs --chroot $CHROOT
Adding a node
echo "GATEWAYDEV=${server_ww_nic}" > /etc/sysconfig/network
wwsh -y file import /etc/sysconfig/network
wwsh node new node01 --ipaddr=192.168.1.11 --hwaddr=<YOU_MAC_HERE> -D eth0
- add this file to provision
-
wwsh -y provision set node01" --vnfs=centos7 --bootstrap=$(uname -r) \
--files=dynamic_hosts,passwd,group,shadow,network
systemctl restart dhcpd
wwsh pxe update