언제나 그렇듯!

.bashrc에 환경 변수 설정

다만, /root 의 .bashrc로 생성해서 환경 변수를 넣어 주는것이 편리하다. (추후 "sudo su -" 를 쓰기 편하기 위해)

openSUSE는 eth1로 뜨네?

export CHROOT=/opt/ohpc/admin/images/leap15.2
export eth_provision=eth1
export num_computes=2
export c_ip=("10.0.2.4" "10.0.2.5")
export c_mac=("08:00:27:4b:df:4f" "08:00:27:f9:ca:3f")
export c_name=("openhpc-1" "openhpc-2")
export compute_regex=openhpc-*

export ntp_server=10.0.2.15
export sms_name=master
export sms_ip=10.0.2.15
export sms_eth_internal=eth1
export internal_netmask=255.0.0.0

2020/12/02 - [프로그램 사용/slurm] - openHPC 설치 part 1?

 

+ DHCP로 ip는 받는데 tftp로 파일을 받아오지 못해서 확인해보니

SuSEfirewall2 라는 서비스 대신 firewalld로 suse leap 15 버전에서는 서비스 명칭이 변경되었다.

echo ${sms_ip} ${sms_name} >> /etc/hosts
systemctl disable firewalld
systemctl stop firewalld

 

 

ohpc용 저장소 추가 (특이하게 rpm을 쓰네?)

$ rpm -ivh http://repos.openhpc.community/OpenHPC/2/Leap_15/x86_64/ohpc-release-2-1.leap15.x86_64.rpm

 

ohpc용 기본 패키지 설치

zypper는 처음 써보는데.. 아무생각없이 하라는 대로 했더니 -n 옵션이 reject로 기본 입력되서 설치가 되지 않는다.

그냥 -n 빼고 물어볼 때 t(temporary)나 a(always)를 선택해 주어야 한다.

(sudo su 로 해보니 root는 -n이 y이고 일반 유저는 reject으로 설정이 되어있는 듯 하다)

> sudo zypper -n install ohpc-base ohpc-warewulf

New repository or package signing key received:

  Repository:       OpenHPC-2 - Base
  Key Name:         private OBS (key without passphrase) <defaultkey@localobs>
  Key Fingerprint:  5392744D 3C543ED5 784765E6 8A306019 DA565C6C
  Key Created:      Tue 17 Dec 2019 04:09:12 AM KST
  Key Expires:      (does not expire)
  Subkey:           210B8BF01271E2F2 2019-12-17 [does not expire]
  Rpm Name:         gpg-pubkey-da565c6c-5df7d658


Do you want to reject the key, trust temporarily, or trust always? [r/t/a/?] (r): r
Error building the cache:
[OpenHPC|http://repos.openhpc.community/OpenHPC/2/Leap_15] Valid metadata not found at specified URL
History:
 - Signature verification failed for repomd.xml
 - Can't provide /repodata/repomd.xml

Warning: Skipping repository 'OpenHPC-2 - Base' because of the above error.

 

귀찮으니 죽죽죽~ ㅋㅋ

3.3 Add provisioning services on master node
$ sudo su -
systemctl enable chronyd.service
echo "server ${ntp_server}" >> /etc/chrony.conf
echo "allow all" >> /etc/chrony.conf
systemctl restart chronyd

3.4 Add resource management services on master node
zypper -n install ohpc-slurm-server
cp /etc/slurm/slurm.conf.ohpc /etc/slurm/slurm.conf
perl -pi -e "s/ControlMachine=\S+/ControlMachine=${sms_name}/" /etc/slurm/slurm.conf

3.7 Complete basic Warewulf setup for master node
perl -pi -e "s/device = eth1/device = ${sms_eth_internal}/" /etc/warewulf/provision.conf
perl -pi -e "s/^DHCPD_INTERFACE=\S+/DHCPD_INTERFACE=${sms_eth_internal}/" /etc/sysconfig/dhcpd
systemctl enable tftp.socket
perl -pi -e "s#\#tftpdir = /var/lib/#tftpdir = /srv/#" /etc/warewulf/provision.conf
export MODFILE=/etc/apache2/conf.d/warewulf-httpd.conf
perl -pi -e "s#modules/mod_perl.so\$#/usr/lib64/apache2/mod_perl.so#" $MODFILE
perl -pi -e "s#modules/mod_version.so\$#/usr/lib64/apache2/mod_version.so#" $MODFILE

ip link set dev ${sms_eth_internal} up
ip address add ${sms_ip}/${internal_netmask} broadcast + dev ${sms_eth_internal}

systemctl enable mysql
systemctl restart mysql
systemctl enable apache2.service
systemctl restart apache2
systemctl enable dhcpd.service
systemctl enable tftp.socket
systemctl start tftp.socket

3.8.1 Build initial BOS image
mkdir -p -m 755 $CHROOT
mkdir -m 755 $CHROOT/dev
mknod -m 666 $CHROOT/dev/zero c 1 5
wwmkchroot -v opensuse-15.2 $CHROOT
cp -p /etc/zypp/repos.d/OpenHPC*.repo $CHROOT/etc/zypp/repos.d
zypper -n --root $CHROOT --no-gpg-checks --gpg-auto-import-keys refresh

3.8.2 Add OpenHPC components
zypper -n --root $CHROOT install ohpc-base-compute
cp -p /etc/resolv.conf $CHROOT/etc/resolv.conf
zypper -n --root $CHROOT --no-gpg-checks --gpg-auto-import-keys refresh
cp /etc/passwd /etc/group $CHROOT/etc
zypper -n --root $CHROOT install ohpc-slurm-client
chroot $CHROOT systemctl enable munge
echo SLURMD_OPTIONS="--conf-server ${sms_ip}" > $CHROOT/etc/sysconfig/slurmd
cp /opt/ohpc/pub/examples/udev/60-ipath.rules $CHROOT/etc/udev/rules.d/
zypper -n --root $CHROOT install chrony #(에러 발생)
chroot $CHROOT systemctl enable chrony #(에러 발생)
echo "server ${sms_ip}" >> $CHROOT/etc/chrony.conf
zypper -n --root $CHROOT install kernel-default
zypper -n --root $CHROOT install lmod-ohpc
chroot $CHROOT systemctl enable sshd.service
mv $CHROOT/etc/hostname $CHROOT/etc/hostname.orig

3.8.3 Customize system configuration
wwinit database
wwinit ssh_keys
echo "${sms_ip}:/home /home nfs nfsvers=3,nodev,nosuid 0 0" >> $CHROOT/etc/fstab
echo "${sms_ip}:/opt/ohpc/pub /opt/ohpc/pub nfs nfsvers=3,nodev 0 0" >> $CHROOT/etc/fstab
echo "/home *(rw,no_subtree_check,fsid=10,no_root_squash)" >> /etc/exports
echo "/opt/ohpc/pub *(ro,no_subtree_check,fsid=11)" >> /etc/exports
exportfs -a
systemctl restart nfs-server
systemctl enable nfs-server

3.8.5 Import files
wwsh file import /etc/passwd
wwsh file import /etc/group
wwsh file import /etc/shadow
wwsh file import /etc/munge/munge.key

3.9.1 Assemble bootstrap image
wwbootstrap `uname -r`

3.9.2 Assemble Virtual Node File System (VNFS) image
wwvnfs --chroot $CHROOT

3.9.3 Register nodes for provisioning
echo "GATEWAYDEV=${eth_provision}" > /tmp/network.$$
wwsh -y file import /tmp/network.$$ --name network
wwsh -y file set network --path /etc/sysconfig/network --mode=0644 --uid=0
for ((i=0; i<$num_computes; i++)) ; do
wwsh -y node new ${c_name[i]} --ipaddr=${c_ip[i]} --hwaddr=${c_mac[i]} -D ${eth_provision}
done
wwsh -y provision set "${compute_regex}" --vnfs=leap15.2 --bootstrap=`uname -r` \
--files=dynamic_hosts,passwd,group,shadow,munge.key,network
systemctl restart dhcpd
wwsh pxe update

 

'프로그램 사용 > openHPC' 카테고리의 다른 글

hpl/linpack openmpi slurm  (0) 2021.01.05
openSUSE에 getvnfs extracting failed ㅠㅠ  (0) 2021.01.05
slurm, pbs pro, torque/maui  (0) 2021.01.04
slurm gpu  (0) 2020.12.28
xcat 는 arm 미지원  (0) 2020.12.28
Posted by 구차니