Installation du logiciel PowerVM NovaLink sur une partition Red Hat Enterprise Linux

Vous pouvez installer le logiciel PowerVM® NovaLink sur une partition Red Hat® Enterprise Linux® (RHEL). Pour installer le logiciel PowerVM NovaLink sur une partition RHEL, le logiciel PowerVM NovaLink requiert RHEL version 7.6ou ultérieure pour IBM® Power ® Systems (little endian).

Avant de commencer

Pour installer PowerVM NovaLink sur votre système géré, procédez comme suit:
Une fois l'assistant d'installation PowerVM NovaLink terminé, effectuez les actions suivantes:
  • Une fois que les serveurs Virtual I/O Server ont été créés et installés, le système redémarre sur le menu SMS.
  • Vous pouvez désormais pointer vers un serveur d'amorçage réseau comportant des images RHEL et réinstaller RHEL sur la partition PowerVM NovaLink à l'aide de l'exemple de fichier de démarrage. Vérifiez que le système d'exploitation RHEL est installé et que la variable d'environnement SELinux est désactivée.

À propos de cette tâche

Pour installer le logiciel PowerVM NovaLink sur la partition RHEL, procédez comme suit:
  1. Configurez le référentiel YUM. Pour obtenir des instructions, voir Configuration du référentiel YUM.
  2. Installez le logiciel PowerVM NovaLink sur la partition RHEL. Pour obtenir des instructions, voir Installation de PowerVM NovaLink sur une partition RHEL en cours d'exécution. Sinon, si vous utilisez PowerVM NovaLink Installer, vous pouvez utiliser le programme d'installation pour sélectionner l'installation d'une autre distribution Linux telle que RHEL. Pour obtenir des instructions, voir Installation de RHEL à l'aide du programme d'installation de PowerVM NovaLink.
Configuration du référentiel YUM

Le référentiel YUM est configuré pour PowerVM NovaLink binaire Red Hat Package Manager (RPM) et les dépendances des RPM.

Choisissez l'une des options suivantes en fonction de la version de RHEL sur laquelle vous souhaitez installer le référentiel YUM :
  • Pour installer le référentiel YUM sur RHEL 7, procédez comme suit :
    1. Connectez-vous à la partition RHEL en tant qu'utilisateur root.
    2. Exécutez la commande suivante :
      rpm -ivh http://public.dhe.ibm.com/systems/virtualization/Novalink/rhel/ibm-novalink-repo-latest.noarch.rpm
      Cette commande installe le fichier de configuration du référentiel YUM, ainsi qu'un script qui sera utilisé pour importer la clé GPG dans la base de données RPM. Cela permet de vérifier l'installation ultérieure des packages PowerVM NovaLink pour s'assurer qu'ils n'ont pas été endommagés ou modifiés. Il est possible que les derniers RPM ne soient pas signés. Dans ce cas, si vous souhaitez les utiliser, vous devez utiliser la valeur gpgcheck=0 dans vos fichiers référentiels. Pour plus de détails sur la configuration, voir l' exemple de fichier kickstart.
    3. Exécutez la commande suivante pour importer la clé dans la base de données RPM:
      /opt/ibm/novalink/bin/import-ibm-novalink-repo-key.sh 
    4. Exécutez les commandes suivantes pour obtenir des fichiers RPM depuis RSCT :
      1. wget ftp://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-latest.noarch.rpm
      2. rpm -vih --nodeps ibm-power-repo-latest.noarch.rpm
    5. Exécutez la commande /opt/ibm/lop/configure et acceptez la licence pour configurer le référentiel.
    6. Pour plus d'informations sur l'activation du référentiel Extra Packages for Enterprise Linux (EPEL) pour la partition, voir https://fedoraproject.org/wiki/EPEL.
  • Pour installer le référentiel YUM sur RHEL 8, procédez comme suit :
    1. Connectez-vous à la partition RHEL en tant qu'utilisateur root et enregistrez RHEL.
    2. Activez les référentiels suivants :
      • AppStream
      • Supplémentaire
      • BaseOS
    3. Pour installer le référentiel Extra Packages for Enterprise Linux (EPEL) pour la partition, exécutez les commandes suivantes:
      1. yum --assumeyes install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
        
      2. yum install kernel-modules-extra
      3. yum update
      4. reboot
    4. Configurez un référentiel YUM (/etc/yum.repos.d/pvm.repo).
      Remarque: La valeur de la variable baseurl peut être un référentiel public ou un référentiel local.

      Si la variable baseurl est un référentiel public, voici un exemple de fichier pvm.repo :

      
             [novalink]
      	name=NovaLink
      	baseurl=http://public.dhe.ibm.com/systems/virtualization/Novalink/rhel/82/novalink_2.0.3
      	enabled=1
      	gpgcheck=0
      

      Si la variable baseurl est un CD ou un référentiel ISO, voici un exemple de fichier pvm.repo :

      
             [novalink]
      	name=NovaLink
      	baseurl=file://<CD Mount Point>/repo/rhel8/ 
      	enabled=1
      	gpgcheck=0
      
    5. Exécutez les commandes suivantes pour obtenir des fichiers RPM à partir de RSCT et du package ibm-power-repo :
      1. wget ftp://public.dhe.ibm.com/software/server/POWER/Linux/yum/download/ibm-power-repo-latest.noarch.rpm
      2. rpm -vih --nodeps ibm-power-repo-latest.noarch.rpm
    6. Après avoir installé le module RPM, exécutez la commande suivante :
      /opt/ibm/lop/configure
    7. Acceptez la licence pour configurer le référentiel.
Installation d' PowerVM NovaLink sur une partition RHEL en cours d'exécution

Choisissez l'une des options suivantes en fonction de la version de RHEL sur laquelle vous souhaitez installer PowerVM NovaLink :

  • Pour installer l'environnement PowerVM NovaLink sur une partition RHEL 7, procédez comme suit:
    1. Avant d'installer PowerVM NovaLink, exécutez la commande suivante pour installer le package kernel-devel :
      yum install kernel-devel
      Remarque: vous ne devez pas combiner cette commande avec l'étape 6.
    2. Connectez-vous à la partition RHEL en tant qu'utilisateur racine (root).
    3. Pour vérifier si la variable SELinux est en mode désactivé ou en mode permissif, exécutez la commande suivante:
      getenforce
      La variable SELinux est définie sur le mode Désactivé .
    4. Si la variable SELinux n'est pas en mode désactivé ou en mode permissif, vous devez exécuter la commande suivante pour définir la variable SELinux en mode désactivé ou en mode permissif et réamorcer la partition PowerVM NovaLink :
      setenforce disabled
      Vous pouvez également exécuter la commande suivante pour désactiver la variable SELinux et réamorcer la partition PowerVM NovaLink :
      vi /etc/sysconfig/selinux 
      Change the variable as SELINUX=disabled
    5. Pour arrêter et désactiver le service de pare-feu, exécutez les commandes suivantes :
      systemctl stop firewalld
      systemctl disable firewalld
    6. Pour installer la pile PowerVM NovaLink , exécutez la commande suivante:
      yum install pvm-novalink python-positional
    7. Une fois l'installation terminée, vous pouvez ajouter l'utilisateur admin au groupe pvm_admin en exécutant la commande suivante :
      usermod -G pvm_admin <admin_user_id> 
  • Pour installer l'environnement PowerVM NovaLink sur une partition RHEL 8.2ou ultérieure, procédez comme suit:
    1. Connectez-vous à la partition RHEL en tant qu'utilisateur racine (root).
    2. Pour installer la pile PowerVM NovaLink , exécutez la commande suivante:
      yum --assumeyes install python3 pvm-novalink xerces-c
    3. Une fois l'installation terminée, vous pouvez ajouter l'utilisateur neo et lui affecter le privilège utilisateur sudo à l'aide de la commande suivante :
      useradd -G pvm_admin -m -p `openssl passwd -1 neo123`  neo
      sed -i "s/\(root\)\(.*ALL\)$/\1\2\nneo\2/" /etc/sudoers
       
    4. Pour créer un lien lointain pour Python 3 en tant que Python, choisissez la méthode 1 ou la méthode 2 :
      • Méthode 1
        1. Exécutez la commande suivante :
          sudo alternatives --config python
          sudo] password for neo:
          There are 2 programs which provide 'python'.
            Selection    Command
          -----------------------------------------------
          *+ 1           /usr/libexec/no-python
             2           /usr/bin/python3
          Enter to keep the current selection[+], or type selection number: 2
          
        2. Choisissez l'option 2 pour utiliser Python 3.
      • Méthode 2
        Exécutez la commande suivante :
        ln -s /usr/bin/python3 /usr/bin/python
Installation de RHEL à l'aide du programme d'installation d' PowerVM NovaLink

Le programme d'installation PowerVM NovaLink dispose d'une nouvelle option permettant de sélectionner l'installation d'une autre distribution Linux telle que RHEL. Si vous sélectionnez cette option, la partition PowerVM NovaLink est réamorcée dans le menu SMS après la création et l'installation des serveurs Virtual I/O Server. Vous pouvez configurer une installation de RHEL 7.3 ou RHEL 8 avec les packages PowerVM NovaLink à l'aide d'un fichier de démarrage.

Voici un exemple de fichier kickstart de RHEL 7.3 :
#platform=Power VM
#version=DEVEL

# Firewall configuration
firewall --disabled

# Install OS instead of upgrade
install
repo --name=epel --baseurl=http://download.fedoraproject.org/pub/epel/7/ppc64le

# Root password encrypted using python one liner
# python -c 'import crypt,base64,os; print(crypt.crypt("passw0rd", "$6$" + 
base64.b64encode(os.urandom(6))))'

rootpw --iscrypted $6$F5jDDW3B$Vf3th7JxE2nfwozOnbrl6moBeEanQbRqZRjvWeC03nJIumI3
intYOm4JUnl9Hg0uEncViM.snO5Dkq.zC3yo70

# System authorization information 

auth --passalgo=sha512

# Use text mode install 

text

# System keyboard 

keyboard us 

# System language 

lang en_US

# SELinux configuration 

selinux --disabled

# Do not configure the X Window System 
skipx 
services --enabled=sshd
 
# Installation logging level 
# logging --level=info 

logging --level=debug 

# System timezone 

timezone America/Chicago

# Clear the controller Boot Record 
zerombr 

# Partition clearing information 
clearpart --drives=sda,sdb --all --initlabel

# reqpart will take care of PreP partition on first disk reqpart
# It will be safer to use /dev/disk/by-id/<device id>  if known 
# instead of /dev/sda or /dev/sdb
# Uncomment if configuring  single disk no redundant VIOS
# part /boot --size 300 --fstype ext4 --ondisk /dev/sda
# part pv.01 --size 1 --grow --ondisk /dev/sda
# volgroup pvmvg pv.01 
# logvol / --vgname=pvmvg --name=root --size=9216
# logvol /var --vgname=pvmvg --name=var --size=10240
# logvol /tmp --vgname=pvmvg --name=tmp --size=1024
# logvol swap --vgname=pvmvg --name=swap --fstype swap --size=4096
# logvol /home --vgname=pvmvg --name=home --size=1 --grow

bootloader --driveorder=sda,sdb

# RAID1 2 disk partition recipe using LVM over RAID
# Second disk needs to have PreP partition created
 
part None --fstype prepboot --ondrive=sdb --size 8
part raid.00 --size 256 --asprimary --ondrive=sda 
part raid.10 --size 256 --asprimary --ondrive=sdb 
part raid.01 --size 29696 --asprimary --ondrive=sda
part raid.11 --size 29696 --asprimary --ondrive=sdb
raid /boot --fstype ext4 --device raid1-boot --level=RAID1 raid.00 raid.10 
raid pv.01 --device raid1-pv --level=RAID1 raid.01 raid.11

volgroup pvmvg pv.01 

# Adjust size accordingly if you want to have different values

logvol / --vgname=pvmvg --name=root --size=9216 
logvol /var --vgname=pvmvg --name=var --size=10240 
logvol /tmp --vgname=pvmvg --name=tmp --size=1024
logvol swap --vgname=pvmvg  --name=swap --fstype swap --size=4096
logvol /home --vgname=pvmvg --name=home --size=1 --grow

# Reboot the lpar after install completes 

reboot

%packages 
kernel-headers 
kernel-devel 
openssh* 
parted* 
net-tools* 
@base 
epel-release 
telnet 
%end

%post --log=/var/log/novalink-post.log 

exec < /dev/console > /dev/console
echo "Running post configuration"
# Create the configuration file for the NovaLink repo 
# at your location 

cat > /etc/yum.repos.d/pvm.repo <<EOF 
[novalink] name=NovaLink
baseurl=http://<FILL IN YOUR LOCATION> 
failovermethod=priority 
enabled =1
gpgcheck=0 
EOF

# Create the configuration file for the optional or extra packages 
# at your location as needed 

cat > /etc/yum.repos.d/optional-yum.repo <<EOF 
[optional]
name=Optional yum repository 
baseurl=ftp://<FILL IN YOUR LOCATION> 
gpgkey=file://<FILL IN YOUR GPG KEY LOCATION> 
EOF

# Create the configuration file for the IBM RSCT repo 

cat > /etc/yum.repos.d/ibm-power.repo <<EOF 
[IBM_Power_Tools]
name=IBM Power Tools baseurl=
http://public.dhe.ibm.com/software/server/POWER/Linux/yum/OSS/RHEL/7/ppc64le 
enabled=1
gpgcheck= 0

[IBM_Power_SDK_Tools]
name=IBM Power SDK Tools 
baseurl=http://public.dhe.ibm.com/software/server/POWER/Linux/yum/SDK/RHEL/7/ppc64le 
enabled=1 
gpgcheck=0 

[Advance_Toolchain]
name=Advance Toolchain 
baseurl=ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/redhat/RHEL7
enabled=1 
gpgcheck=0 
EOF

yum --assumeyes install pvm-novalink python-positional

# Create firewall configuration file to open port 657 for RSCT
 
cat > /etc/firewalld/services/rmc.xml <<EOF 
<?xml version="1.0" encoding="utf-8"?>
<service> 
  <short>RMC</short>
  <description>
Reliable Scalable Cluster Technology (RSCT) is a set of software components that together
provide a comprehensive clustering environment for AIX®, Linux, Solaris, and Windows 
operating systems. RSCT is the infrastructure used by a variety of IBM® products to provide
clusters with improved system availability,  scalability, and ease of use.</description> 
<port protocol="tcp" port="657"/>
 <port protocol="udp" port="657"/>
</service>
EOF

systemctl  enable firewalld.service firewall-offline-cmd --add-service=rmc

# Make sure PreP partition are mirrorred

dd if=/dev/sda1 of=/dev/sdb1 
parted /dev/sda set 1 boot on 
parted /dev/sdb set 1 boot on
%end
Exemple de fichier de démarrage de RHEL 8 :


#platform=Power VM
#version=DEVEL

# Firewall configuration
firewall --disabled

# Root password encrypted using python one liner
# python -c 'import crypt,base64,os; print(crypt.crypt("passw0rd", "$6$" + base64.b64encode(os.urandom(6))))'
rootpw --iscrypted $6$F5jDDW3B$Vf3th7JxE2nfwozOnbrl6moBeEanQbRqZRjvWeC03nJIumI3intYOm4JUnl9Hg0uEncViM.snO5Dkq.zC3yo70

# System authorization information
authselect  --passalgo=sha512

# Use text mode install
text

# System keyboard
keyboard us

# System language
lang en_US

# SELinux configuration
selinux --disabled

# Do not configure the X Window System
skipx
services --enabled=sshd

# Installation logging level
#logging --level=info
logging --level=debug

# System timezone
timezone  America/New_York

# Clear the controller Boot Record
zerombr


# Storage data and setup below. By default, this kickstart file
# assumes 2 disks: sda and sdb, to be on a RAID. A sample single
# disk setup is also provided. Set this up to properly reflect your
# environment.

# 1 DISK SETUP START
# Uncomment everything until "1 DISK SETUP END"
# if configuring single disk with no redundant VIOS
# Also, you must edit the PreP partition setting in
# the post install at the end of this file if using
# a single drive environment.

# bootloader --driveorder=sda
# part None --fstype prepboot --ondrive=sda --size 8
# part /boot --size 300 --fstype ext4 --ondisk /dev/sda
# part pv.01 --size 1 --grow --ondisk /dev/sda
# volgroup pvmvg pv.01
# logvol / --vgname=pvmvg --name=root --size=9216
# logvol /var --vgname=pvmvg --name=var --size=10240
# logvol /tmp --vgname=pvmvg --name=tmp --size=1024
# logvol swap --vgname=pvmvg --name=swap --fstype swap --size=4096
# logvol /home --vgname=pvmvg --name=home --size=1 --grow
# clearpart --drives=sda --all --initlabel

# 1 DISK SETUP END

# 2 DISK WITH RAID SETUP START
# Comment everything until "2 DISK WITH RAID SETUP END"
# if configuring single disk with no redundant VIOS

# Set drive boot order
bootloader --driveorder=sda,sdb

# RAID1 2 disk partition recipe using LVM over RAID
# Second disk needs to have PreP partition created
part None --fstype prepboot --ondrive=sdb --size 8

# Setup RAID
part raid.00 --size 256 --asprimary --ondrive=sda
part raid.10 --size 256 --asprimary --ondrive=sdb
part raid.01 --size 29696 --asprimary --ondrive=sda
part raid.11 --size 29696 --asprimary --ondrive=sdb

raid /boot --fstype ext4 --device raid1-boot --level=RAID1 raid.00 raid.10
raid pv.01 --device raid1-pv --level=RAID1 raid.01 raid.11

# Build out volume group and logical volumes.
volgroup pvmvg pv.01

logvol / --vgname=pvmvg --name=root --size=9216
logvol /var --vgname=pvmvg --name=var --size=10240
logvol /tmp --vgname=pvmvg --name=tmp --size=1024
logvol swap --vgname=pvmvg --name=swap --fstype swap --size=4096
logvol /home --vgname=pvmvg --name=home --size=1 --grow

# Partition clearing information
clearpart --drives=sda,sdb --all --initlabel

# 2 DISK WITH RAID SETUP END

# reqpart will take care of PreP partition on first disk
reqpart




# Reboot the lpar after install completes
reboot

%packages
kernel-headers
kernel-devel
openssh*
parted*
net-tools*
@base
telnet
%end

#%pre
#echo "Cleaning the partitions"
#dd if=/dev/zero of=/dev/sda bs=512 count=1
#dd if=/dev/zero of=/dev/sdb bs=512 count=1
#%end

Etapes suivantes

Une fois l'installation terminée, mettez à jour le logiciel PowerVM NovaLink si nécessaire.