XCAT部署集群指南


第1章 XCAT集群软件

1.1 XCAT集群软件介绍

xCAT 是一个集群管理工具,xCAT 能提供云、集群、HPC、系统网络、数据中心、在线游戏基础设施的管理。
xCAT 使管理员能够:
 1 发现硬件服务器
 2 执行远程系统管理
 3 在物理机或虚拟机上配置操作系统
 4 准备机器的 Diskful(有状态)和 Diskless(无状态)
 5 安装和配置用户应用程序
 6 并行系统管理

1.2硬件环境:

IPADDR hostname 介绍
192.168.3.30 master 主节点 Centos7.9系统
192.168.3.201 node01 从节点 Centos7.9 系统


第2章 xCat软件安装

2.1 配置管理节点

1.用wget下载go-xcat

wget https://raw.githubusercontent.com/xcat2/xcat-core/master/xCAT-server/share/xcat/tools/go-xcat -O - >/tmp/go-xcat
chmod +x /tmp/go-xcat

2.运行go-xcat

/tmp/go-xcat install

3.验证xCAT安装

可以通过以下步骤快速验证xCAT安装:
获取配置文件以将xCAT命令添加到您的路径中:

source /etc/profile.d/xcat.sh

4.检查 xCAT 版本

lsxcatd -a

5.通过转储站点表检查以验证 xCAT 数据库是否已初始化

tabdump site

6.启动xcat

service xcatd start
systemctl start xcatd.service


第3 章XCAT部署

3.1 配置 xcat 的相关服务 (集群服务包括:network 服务、NTP 服务、DNS 服务、集群管理服务)

3.1.1 配置XCAT基本信息

tabprune networks -a #删除初始数据

chtab netname= 192_168_3_0-255_255_255_0 networks.net=192.168.3.0  networks.mask=255.255.255.0 networks.gateway=192.168.3.1 networks.dhcpserver=192.168.3.1 networks.tftpserver=192.168.3.1 networks.nameservers=192.168.3.1 networks.ntpservers=192.168.3.1

Note:以上这条巨长的命令是连着的,不要乱加回车

3.2 配置NTP(网络时间同步)

3.2.1 备份ntp设置

mv /etc/ntp.conf /etc/ntp.conf.bak

3.2.2 配置ntp设置文件

vi /etc/ntp.conf

以下内容粘贴进去

driftfile /var/lib/ntp/drift
restrict default nomodify notrap nopeer noquery
restrict 127.0.0.1
server 127.127.1.0                                      #使用本地的时间
fudge  127.127.1.0 stratum 10           #服务器的层级。作为局域网的时间同步
restrict ::1
includefile /etc/ntp/crypto/pwkeys
/etc/ntp/keys
disable monitor
server 192.168.3.1   # added by /sbin/dhclient-script

3.2.3 重启ntp服务

systemctl enable ntpd.service
service ntpd restart 

3.2.4 测试ntp服务

ntpdate -u 192.168.3.30

Note:出问题查https://blog.csdn.net/weixin_34618526/article/details/112577185

3.2.5 修改site表

chtab key=ntpservers site.value=192.168.3.30
chtab key=domain site.value=test.com
chtab key=nameservers site.value=192.168.3.30 
#根据具体情况配置,这个属性最后会被写到每个node的/etc/resolv.conf文件里
chtab key=forwarders site.value=192.168.3.1

3.2.6 查看site表

tabdump site

3.3 修改postscripts 表

3.3.1 看一下postscripts表

tabdump postscripts

3.3.2 配置ntp等服务

chtab node=xcatdefaults postscripts.postscripts="syslog,remoteshell,syncfiles,setupntp"
chtab node=compute postscripts.postscripts="hardeths,configRSH,configService,configNFS,setupGang,reboot "

Note:设置 DNS 如果系统中安装了 bind-chroot 的软件包,会与想 xCAT 冲突,所以如果安装了 bind-chroot 需要把它卸载掉:

rpm -qa | grep bind-chroot
rpm -e bind-chroot

3.3.3 配置域名

配置network表

vi /etc/sysconfig/network

将以下内容粘贴进去:

# Created by anaconda
NETWORKING=yes
HOSTNAME=master
DOMAINNAME=test.com

配置rc.loacl表

vi /etc/rc.local

将以下内容粘贴进去

#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.

touch /var/lock/subsys/local
/bin/domainname test.com

配置hosts表

vi /etc/hosts

127.0.0.1 localhost
192.168.3.30 master master.test.com
192.168.3.201 node01 node01.test.com

配置resolv.conf

vi /etc/resolv.conf

#Generated by NetworkManager
search test.com
nameserver 192.168.3.30

重启named服务

systemctl restart named
chkconfig named on
nslookup node01

结果:

192.168.3.30   master master.test.com
 
192.168.3.201  node01 node01.test.com
 
Server:         192.168.3.30
Address:        192.168.3.30#53
 
Name:        	node01.test.com
Address: 		192.168.3.201

3.4 定义计算节点

chtab node=node01 nodelist.groups=compute,all
nodeadd node01 groups=compute,all mac.interface=ens33 hosts.ip=192.168.3.201 mac.mac=00:0c:29:dd:cd:34 nodehm.mgt=ipminodehm.power=ipmi
makehosts -n
makedhcp -n
chkconfig dhcpd on

设置 noderes 表

chtab node=node01 noderes.netboot=pxe noderes.xcatmaster=192.168.3.30 noderes.installnic=ens33 noderes.primarynic=ens33 noderes.nfsserver=192.168.3.30

设置 nodetype 表

chtab node=node01 nodetype.os=centos7.9 nodetype.arch=x86_64 nodetype.profile=compute nodetype.nodetype=osi

配置passwd表

chtab key=system passwd.username=root passwd.password=Admin@123
chtab key=blade  passwd.username=USERID passwd.password=PASSWORD
chtab key=ipmi   passwd.username=USERID passwd.password=PASSWORD

配置 DHCP

chtab key=dhcpinterfaces site.value='192.168.3.30|ens33'
makedhcp compute
systemctl restart dhcpd

实现定制安装

vim /opt/xcat/share/xcat/install/rh/compute.tmpl

确定如下配置注释掉

#cmdline       
#langsupport en_US   
# firewall –disabled
#mouse none
# selinux –disabled
# %packages ### 删掉 –resolvedeps

修改 kickstart 文件

cd /opt/xcat/share/xcat/install/rh
cp compute.rhels7.tmpl compute.centos7.9.tmpl
cp compute.rhels7.pkglist compute.centos7.9.pkglist

复制安装文件

cd /mnt/iso/
copycds CentOS-7-x86_64-DVD-2009.iso

第4章 系统分发安装
4.1分发安装

nodeset node01 osimage=centos7.9-x86_64-install-compute

至此,xcat分发部署节点1完成
4.2 测试安装


nodestat node01
node01: sshd                ##说明安装成功

第5章 附件

Centos系统镜像:http://mirrors.aliyun.com/centos/7/isos/x86_64/
Xcat官方文档:https://xcat-docs.readthedocs.io/en/stable/overview/index.html

第6章 参考文献

常见报错_NTP同步常见报错之no server suitable for synchrnization found
ntp server 配置参数_安装配置NTP服务器详解
搭建linux时钟同步服务器,Linux时间同步服务器搭建
使用xcat部署系统_使用xCAT和TORQUE进行动态服务器配置
XCAT在虚拟机上部署系统
xcat 安装(liunx高性能刀片集群管理软件)
xCAT安装指南
利用xCAT在kylin系统上自动批量部署系统
PXE高效批量网络装机

  • 1
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

谁的BUG最难改

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值