This Guide describes how to upgrade LiCO container from V8.0.0 to V8.1.0.
Before upgrading LiCO, ensure the version of the operating system and OpenHPC are listed in the following table. To use LiCO 8.1.0 in the required operating system, install LiCO 8.1.0 by following the instructions of LiCO 8.1.0 Installation Guide (for EL9).
LiCO version | Red Hat (RHEL) | Rocky/EL8 | Lenovo OpenHPC version |
---|---|---|---|
V8.0.0 | 9.4 | 9.4 | 3.1 |
V8.1.0 | 9.6 | 9.6 | 3.3.1 |
lico-control stop
docker rename lico lico_8.0.0
# Management node hostname
sms_name="head"
# IP address of management node
sms_ip="192.168.0.2"
# Old version of repository directory for LiCO and the version of LiCO in
# the current system
original_lico_repo_dir="/install/custom/lico-8.0.0"
# Old version of repository directory for LiCO-dep and
# the version of LiCO-dep in the current system
original_lico_dep_repo_dir="/install/custom/lico-dep-8.0.0"
# New version of repository directory for LiCO, please change it according to LiCO version
new_lico_repo_dir="/install/custom/lico-8.1.0"
# New version of LiCO repository directory for LiCO-dep,
# please change it according to LiCO-dep version
new_lico_dep_repo_dir="/install/custom/lico-dep-8.1.0"
# Link name of LiCO repository directory for LiCO
link_lico_repo_dir="/install/custom/lico"
# Link name of LiCO repository directory for LiCO-dep
link_lico_dep_repo_dir="/install/custom/lico-dep"
# Existing shared directories for LiCO
lico_share_dir="/home"
# Shared directories of repo file in LiCO Installation Guide
share_installer_dir="/install/installer"
chmod 600 lico_release.local
source lico_release.local
OpenHPC-3.3.EL_9.x86_64.tar:
http://repos.openhpc.community/dist/3.3/OpenHPC-3.3.EL_9.x86_64.tar
lenovo-openhpc-3.3.1.el9.x86_64.tgz:
https://hpc.lenovo.com/lico/downloads/8.1.0/lenovo-openhpc-3.3.1.el9.x86_64.tgz
lico-dep-8.1.0.el9.x86_64.tgz:
https://hpc.lenovo.com/lico/downloads/8.1.0/lico-dep-8.1.0.el9.x86_64.tgz
LiCO 8.1.0 release package lico-release-8.1.0.el9.x86_64.tar.gz:
https://commercial.lenovo.com/cn/en/signin
LiCO 8.1.0 docker package lico-docker-8.1.0.x86_64.tar.gz:
https://commercial.lenovo.com/cn/en/signin
cd /root
lico_container_workspace="/root/lico-workspace/8.1.0"
mkdir -p $lico_container_workspace
tar -xzvf lico-docker-8.1.0.x86_64.tar.gz -C $lico_container_workspace
mv OpenHPC-3.3.EL_9.x86_64.tar $lico_container_workspace
mv lenovo-openhpc-3.3.1.el9.x86_64.tgz $lico_container_workspace
mv lico-dep-8.1.0.el9.x86_64.tgz $lico_container_workspace
mv lico-release-8.1.0.el9.x86_64.tar.gz $lico_container_workspace
cp $lico_container_workspace/lico-docker/Dockerfile \
$lico_container_workspace/lico-docker/scripts/build.sh $lico_container_workspace
\cp $lico_container_workspace/lico-docker/scripts/lico-control /usr/bin/
chmod +x $lico_container_workspace/build.sh
chmod +x /usr/bin/lico-control
cd $lico_container_workspace
./build.sh
backup_dir=/root/lico_8.0.0_backup/
mkdir -p $backup_dir
cd $lico_container_workspace/lico-docker/upgrade
python3 container-upgrade backup --backup-path $backup_dir --backup-db --backup-config --backup-sharedir
If the /opt/lico/cloud/azure/slurm.conf
file exists,
back it up:
cp /opt/lico/cloud/azure/slurm.conf /opt/lico/cloud/azure/slurm.conf.bak
[root@head ~]# slurmctld --version
slurm 24.11.5
Note: Please refer to the LiCO 8.1.0 Installation Guide (for EL9) to upgrade slurm and other related software packages to the specified version.
cat << eof > /root/project.ldif
dn: ou=Project,dc=hpc,dc=com
ou: Project
objectClass: top
objectClass: organizationalUnit
eof
systemctl stop slapd
slapadd -l /root/project.ldif -n 1 -f /etc/openldap/slapd.conf
systemctl start slapd
rm -rf /etc/lico
lico-control prepare
cp $backup_dir/head/configure/lico/nodes.csv /etc/lico/
cd /root/lico-workspace/8.1.0/lico-docker/upgrade/
python3 container-upgrade merge-config --backup-path $backup_dir
If the /opt/lico/cloud/azure/slurm.conf.bak
file exists,
restore it:
mv /opt/lico/cloud/azure/slurm.conf.bak /opt/lico/cloud/azure/slurm.conf
[DATABASE]
HOST = '127.0.0.1'
PORT = 3306
[TRANSITER]
HOST = '127.0.0.1'
PORT = 22
lico-control init --mode lico
lico-control init --mode cloudtools
lico-control run
lico-control docker-cmd rm lico_8.0.0
lico-control stop
lico-control docker-cmd rename lico lico_8.1.0
cd $lico_container_workspace/lico-docker/upgrade/
python3 container-rollback --backup-path $backup_dir --restore-db --restore-sharedir
lico-control run --image lico:8.0.0
lico-control docker-cmd rm lico_8.1.0