LAB/GEOPM

GEOPM 설치 3

RyoTTa 2020. 11. 17. 21:17
반응형

Compute node에 대한 Image build

Centos 7.6을 사용


#!/bin/bash

 

#노드와 연결되는 NIC의 IP주소

sms_ip="xxx.xxx.xxx.xxx"

kargs=""

# Define chroot location

export CHROOT=/opt/ohpc/admin/images/centos7.6

# Build initial chroot image

wwmkchroot centos-7 $CHROOT



yum -y --installroot=$CHROOT install ohpc-base-compute

cp -p /etc/resolv.conf $CHROOT/etc/resolv.conf

yum -y --installroot=$CHROOT install ohpc-slurm-client

yum -y --installroot=$CHROOT install ntp

 

yum -y --installroot=$CHROOT install kernel

yum -y --installroot=$CHROOT install lmod-ohpc

 

wwinit database

wwinit ssh_keys



#마스터 노드의 디스크를 네트워크로 연결하기 위함

echo "${sms_ip}:/home /home nfs nfsvers=3,nodev,nosuid,noatime 0 0" >> $CHROOT/etc/fstab

echo "${sms_ip}:/opt/ohpc/pub /opt/ohpc/pub nfs nfsvers=3,nodev,noatime 0 0" >> $CHROOT/etc/fstab

#echo "${sms_ip}:/disk1 /disk1 nfs nfsvers=3,nodev,nosuid,noatime 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

#echo "/disk1 *(rw,no_subtree_check,fsid=12,no_root_squash)" >> /etc/exports

exportfs -a

 

systemctl restart nfs-server

systemctl enable nfs-server

 

chroot $CHROOT systemctl enable ntpd

echo "server ${sms_ip}" >> $CHROOT/etc/ntp.conf



#사용자 복사

wwsh file import /etc/passwd

wwsh file import /etc/group

wwsh file import /etc/shadow

 

wwsh file import /etc/slurm/slurm.conf

#wwsh file import /etc/munge/munge.key

#cp /etc/munge/munge.key $CHROOT/etc/munge/munge.key

#mumge.key 직접 작업 필요(가끔 에러 발생)

 

sudo  yum -y --installroot=$CHROOT install vim

sudo  yum -y --installroot=$CHROOT install htop

sudo  yum -y --installroot=$CHROOT install libgfortran

 

#node들의 CPU driver를 acpi-freq를 사용하기 위함

export kargs="${kargs} intel_pstate=disable"

 

yum -y --installroot=$CHROOT install kmod-msr-safe-ohpc

yum -y --installroot=$CHROOT install msr-safe-slurm-ohpc

 

wwbootstrap `uname -r`

wwvnfs --chroot $CHROOT

 

#Compute node에 기본적인 필수 패키지 설치

yum -y --installroot=${CHROOT} install ohpc-base-compute kernel kernel-headers kernel-devel kernel-tools parted  xfsprogs python-devel yum htop ipmitool glibc* perl perl-CPAN perl-CPAN sysstat gcc make xauth firefox


Warewulf 시작


#!/bin/bash

 

export CHROOT=/opt/ohpc/admin/images/centos7.6

 

systemctl disable firewalld

systemctl stop firewalld

systemctl enable ntpd.service

systemctl restart ntpd

systemctl restart xinetd

systemctl enable mariadb.service

systemctl restart mariadb

systemctl enable httpd.service

systemctl restart httpd

systemctl enable dhcpd.service

 

#restart and enable ganglia services

#systemctl enable gmond

#systemctl enable gmetad

#systemctl start gmond

#systemctl start gmetad

#chroot $CHROOT systemctl enable gmond

systemctl try-restart httpd

systemctl restart dhcpd

wwsh pxe update


Warewulf 초기화


#!/bin/bash

 

wwsh node delete c[1-3]







반응형

'LAB > GEOPM' 카테고리의 다른 글

OpenHPC 설치시 주의점  (1) 2020.11.17
GEOPM 설치 4  (0) 2020.11.17
GEOPM 설치 2  (0) 2020.11.17
GEOPM 설치 1  (0) 2020.11.17