This Blog entry is modified from Basic Install xCAT from xCAT wiki with some minor modification at point 7*, 8* and 9*
1. Pre-install
- Internal IP of headnode – referred to as (xcat_int_ip)
- External IP (internet connected) of headnode – referred to as (xcat_ext_ip)
- External DNS server IP – referred to as (dns_ext_ip)
- Cluster domain – referred to as (cluster_dom)
2. Network Wiring
- eth0 is attached into an existing corporate network
- eth1 is attached to the switch that the compute nodes are attached to
3. Setup Networking
Configure the Ethernet interfaces
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
PEERDNS=no
BOOTPROTO=dhcp
HWADDR=00:14:5E:6B:18:21
ONBOOT=yes
ifdown eth0 && ifup eth0
vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
HWADDR=00:14:5E:6B:18:22
ONBOOT=yes
IPADDR=(xcat_int_ip)
NETMASK=255.255.255.0
ifdown eth1 && ifup eth1
4. Install xCAT
Add the xCAT package repositories
cd /etc/yum.repos.d
wget http://xcat.sourceforge.net/yum/xcat-core/xCAT-core.repo
wget http://xcat.sourceforge.net/yum/xcat-dep/rh5/x86_64/xCAT-dep.repo
yum clean metadata
yum install xCAT
Verify the install
source /etc/profile.d/xcat.sh
tabdump site
If the tabdump command works, xCAT is installed. If it doesn’t work, check to ensure all previous steps completed sucessfully
5. Configure the xCAT site table.
- Set the dns to forward requests for the (dns_ext_ip) network
- Set the domain to (cluster_dom),
- Set the master and nameserver to (dns_ext_ip),
- Set eth1 to be the dhcp server interface
tabedit site
#key,value,comments,disable
"xcatdport","3001",,
"xcatiport","3002",,
"tftpdir","/tftpboot",,
"master","(xcat_int_ip)",,
"domain","(cluster_dom)",,
"installdir","/install",,
"timezone","America/Denver",,
"nameservers","(xcat_int_ip)",,
"forwarders","(dns_ext_ip)"
"dhcpinterfaces","eth1"
"ntpservers","0.north-america.pool.ntp.org"
6. Setup the xCAT networks table
tabedit networks
#netname,net,mask,mgtifname,gateway,dhcpserver,tftpserver,nameservers,dynamicrange,nodehostname,comments,disable
internal,"10.10.10.0","255.255.255.0","eth1","10.10.10.1","10.10.10.1","10.10.10.1","10.10.10.1",,,"10.10.10.200-10.10.10.254",,,
external,"192.168.0.0","255.255.0.0","eth0",,,,"192.168.0.1",,,,
There should be an entry for each network the nodes need to access. In this case, DNS is forwarded to the 192.168.0.1 server:
* 7. Setup the xCAT noderes table
(variation from xCAT wiki)
The noderes table defines the resources of the nodes. This includes all of the servers it uses to boot to a usable state and all the types of boot ups it will do.
Note: Primary interface (primarynic) for ipmi machines is the one where the BMC is set to.
tabedit noderes
#node,servicenode,netboot,tftpserver,nfsserver,monserver,nfsdir,installnic,primarynic,discoverynics,cmdinterface,xcatmaster,current_osimage,next_osimage,nimserver,comments,disable
"compute",,"pxe","10.10.10.1","10.10.10.1",,"/install","eth0","eth0",,,,,,,,
*8. Setup the xCAT passwd table
(variation from xCAT wiki)
tabedit passwd
#key,username,password,comments,disable
"omapi","xcat_key","xxxxxxxxxx=",,
"system","root","passw0rd",,
The “omapi” is generated by xCAT. Don’t touch it. But you will need to include the 2nd line “system”
*9. Setup the xCAT chain table
(variation from xCAT wiki)
tabedit chain
#node,currstate,currchain,chain,ondiscover,comments,disable
"n00",,,,,,
"n01",,,,,,
"n02",,,,,,
*10. Setup the xCAT nodetype table
(variation from xCAT wiki)
tabedit nodetype
#node,os,arch,profile,provmethod,supportedarchs,nodetype,comments,disable
"n00","centos5.4","x86_64","compute",,,,,
"n01","centos5.4","x86_64","compute",,,,,
"n02","centos5.4","x86_64","compute",,,,,
11. Setup the xCAT hosts table
tabedit hosts
xcat,(xcat_int_ip)
"n00",(n00_ip)
"n01",(n01_ip)
"n02",(n02_ip)
12. Setup the xCAT mac table
tabedit mac
"n00","eth0",(mac)
"n01","eth0",(mac)
"n02","eth0",(mac)
13. Setup the xCAT nodelist table
tabedit nodelist
"n00","compute,all",,,
"n01","compute,all",,,
"n02","compute,all",,,
14. Setup the xCAT nodehm table
tabedit nodehm
"n00","ipmi","ipmi",,,,,,,,,,
"n01","ipmi","ipmi",,,,,,,,,,
"n02","ipmi","ipmi",,,,,,,,,,
15. Create the hosts file
makehosts all
There should entries in the /etc/hosts that reflect all the nodes
16. Create the DHCP files
makedhcp -n
makedhcp all
service dhcpd restart
chkconfig --level 345 dhcpd on
assuming all the nodes and devices are in the “all” group, that command will work:
Note: dhcpd does NOT need to be restarted after adding a node via makedhcp, but does after running the “-n” option which creates a new file
17. Edit /etc/resolv.conf
vi /etc/resolv.conf
search (xcat_dom)
nameserver (xcat_int_ip)
18. Build the DNS server
makedns
makedns all
service named restart
chkconfig --level 345 named on
assuming all the nodes and devices are in the “all” group, this command will work:
Note: named DOES need to be restarted after running a makedns command
19. Routing to the Internet through the Head Node
echo "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE" >> /etc/rc.local
echo "echo 1 > /proc/sys/net/ipv4/ip_forward" >> /etc/rc.local
* Do remember to configure the gateway for each of the compute node to eth1 (private nic) of the Head Node. Go to client private nic /etc/sysconfig/network-scripts/ifcfg-eth0 and add “GATEWAY=(int_ip_address)”
The xCAT server should now be completely configured.
20. Setup Images
copycds CentOS-5.2-i386-bin-DVD.iso
Note: Do this for the DVD ISO and ”’NOT”’ the cd!
21. Install the node!
rinstall n01
That’s not all. See Using xCAT contributed scripts