2.6 KiB
Repository Server
The repository server is lx-repos-01.psi.ch, usually accessed with the alias repos.psi.ch. For the DMZ we have lx-repos-dmz-01.psi.ch with the alias repos-dmz.psi.ch.
Prepare a new RHEL Version for Installation
Download the iso image on lx-sync-01.psi.ch from https://id-sat-prd-03.ethz.ch or https://access.redhat.com/downloads/content/rhel and add it to the /packages/rhel\[8/9]/iso directory
The service restart mounts the iso as a loop device into a directory of the same name.
Then the ipxe and grub templates of the sysdb have to be edited, to add the new version:
https://gitea.psi.ch/lx/sysdb/src/branch/prod/sysdb/ipxe_template.py
https://gitea.psi.ch/lx/sysdb/src/branch/prod/sysdb/grub_template.py
Once the change is committed, the changes have to be pulled on sysdb.psi.ch:
[root@sysdb ~]# cd /var/www/sysdb/app/
[root@sysdb ~]# git pull
[root@sysdb ~]# systemctl restart httpd
The changes only come live after a restart of the httpd.
Upgrade a Repository Server to a new RHEL version
This is a bit tricky because the automated process wants to load from ISO and packages from the old server. But it works well with a few manual interactions:
- rename the VM to *-old and create a new one
- update MAC address in https://gitea.psi.ch/lx/bootstrap/src/branch/prod/generate-pxe-uefi
- run
generate-pxe-uefiand update the result in https://gitea.psi.ch/lx/network-boot or https://gitea.psi.ch/lx/network-boot-dmz - ensure the kickstart files is also regenerated an available on
lx-sync-01.psi.ch:/packages/kickstart - on
lx-sync-01.psi.ch:/packages/kickstartmodify the respective kickstart file by removing all manual IP configuration and changing to--bootproto=dhcpto make it get an dynamic IP which does not conflict with the one used by the old server - boot the new VM and let it install the OS
- get the dynamcially assigned IP from vSphere
- make your
sshtemporarily go for the domain name to the new IP, eg. by adjuting your local.ssh/configor/etc/hostsormgt-gw.psi.ch:/etc/hosts(but do not change the hostname in the inventory file) - let the Ansible playbook run until it fails because it cannot mount
/packages - login to the new server
- run
dnf update - on the new server edit
/etc/NetworkManager/system-connections/ens*.nmconnectionand set there the IP configuration of the old server - shutdown old server
- reboot new server
- remove temporary ssh redirection to dynamic IP of new server
- run the Ansible playbook again, it should not fail any more