3.2. 更新未连接的 Satellite 服务器
这部分论述了在 Air-gapped Disconnected 设置中更新所需的步骤,其中连接的 Satellite 服务器(这会从 CDN 同步内容)是断开与断开连接的 Satellite Server 之间的空缺。
在连接的卫星服务器上完成以下步骤。
确保您已在连接的 Satellite 服务器中同步以下存储库。
rhel-8-for-x86_64-baseos-rpms rhel-8-for-x86_64-appstream-rpms satellite-6.13-for-rhel-8-x86_64-rpms satellite-maintenance-6.13-for-rhel-8-x86_64-rpms
-
下载组织的调试证书,并将其存储在本地,例如
/etc/pki/katello/certs/org-debug-cert.pem或您选择的位置。如需更多信息,请参阅 管理 Red Hat Satellite 中的 创建机构调试证书。 使用以下存储库信息在
/etc/yum.repos.d下创建 Yum 配置文件:[rhel-8-for-x86_64-baseos-rpms] name=Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) baseurl=https://satellite.example.com/pulp/content/My_Organization/Library/content/dist/rhel8/8/x86_64/baseos/os enabled=1 sslclientcert = /etc/pki/katello/certs/org-debug-cert.pem sslclientkey = /etc/pki/katello/certs/org-debug-cert.pem sslcacert = /etc/pki/katello/certs/katello-server-ca.crt sslverify = 1 [rhel-8-for-x86_64-appstream-rpms] name=Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) baseurl=https://satellite.example.com/pulp/content/My_Organization/Library/content/dist/rhel8/8/x86_64/appstream/os enabled=1 sslclientcert = /etc/pki/katello/certs/org-debug-cert.pem sslclientkey = /etc/pki/katello/certs/org-debug-cert.pem sslcacert = /etc/pki/katello/certs/katello-server-ca.crt sslverify = 1 [satellite-6.13-for-rhel-8-x86_64-rpms] name=Red Hat Satellite 6.13 for RHEL 8 RPMs x86_64 baseurl=https://satellite.example.com/pulp/content/My_Organization/Library/content/dist/layered/rhel8/x86_64/satellite/6.13/os enabled=1 sslclientcert = /etc/pki/katello/certs/org-debug-cert.pem sslclientkey = /etc/pki/katello/certs/org-debug-cert.pem sslcacert = /etc/pki/katello/certs/katello-server-ca.crt [satellite-maintenance-6.13-for-rhel-8-x86_64-rpms] name=Red Hat Satellite Maintenance 6.13 for RHEL 8 RPMs x86_64 baseurl=https://satellite.example.com/pulp/content/My_Organization/Library/content/dist/layered/rhel8/x86_64/sat-maintenance/6.13/os enabled=1 sslclientcert = /etc/pki/katello/certs/org-debug-cert.pem sslclientkey = /etc/pki/katello/certs/org-debug-cert.pem sslcacert = /etc/pki/katello/certs/katello-server-ca.crt sslverify = 1
-
在配置文件中,使用下载的机构调试证书的位置替换
sslclientcert和sslclientkey中的/etc/pki/katello/certs/org-debug-cert.pem。 -
更新
satellite.example.com,使其包含正确的 FQDN 以供您的部署。 将
My_Organization替换为baseurl中正确的机构标签。要获取机构标签,请输入以下命令:# hammer organization list
输入
reposync命令:# reposync --delete --download-metadata -p ~/Satellite-repos -n \ --disableplugin=foreman-protector \ --repoid rhel-8-for-x86_64-baseos-rpms \ --repoid rhel-8-for-x86_64-appstream-rpms \ --repoid satellite-6.13-for-rhel-8-x86_64-rpms \ --repoid satellite-maintenance-6.13-for-rhel-8-x86_64-rpms
这会从连接的卫星服务器下载存储库的内容,并将其存储在
~/Satellite-repos目录中。-
验证 RPM 已经下载,并且存储库数据目录是否已在
~/Satellite 存储库的每个子目录中生成。 归档目录的内容
# cd ~ # tar czf Satellite-repos.tgz Satellite-repos
-
使用生成的
Satellite-repos.tgz文件在非联网卫星服务器中升级。
在断开连接的 Satellite 服务器中执行以下步骤:
-
将生成的
Satellite-repos.tgz文件复制到断开连接的 Satellite 服务器中 将存档提取到
root用户可以访问的任意位置。在以下示例中,/root是提取位置。# cd /root # tar zxf Satellite-repos.tgz
使用以下存储库信息在
/etc/yum.repos.d下创建 Yum 配置文件:[rhel-8-for-x86_64-baseos-rpms] name=Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) baseurl=file:///root/Satellite-repos/rhel-8-for-x86_64-baseos-rpms enabled=1 [rhel-8-for-x86_64-appstream-rpms] name=Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) baseurl=file:///root/Satellite-repos/rhel-8-for-x86_64-appstream-rpms enabled=1 [satellite-6.13-for-rhel-8-x86_64-rpms] name=Red Hat Satellite 6 for RHEL 8 Server RPMs x86_64 baseurl=file:///root/Satellite-repos/satellite-6.13-for-rhel-8-x86_64-rpms enabled=1 [satellite-maintenance-6.13-for-rhel-8-x86_64-rpms] name=Red Hat Satellite Maintenance 6 for RHEL 8 Server RPMs x86_64 baseurl=file:///root/Satellite-repos/satellite-maintenance-6.13-for-rhel-8-x86_64-rpms enabled=1
-
在配置文件中,将
/root/Satellite-repos替换为提取的位置。 检查可用的版本,以确认列出了下一个次版本:
# satellite-maintain upgrade list-versions
使用健康检查选项来确定系统是否准备好升级。在第一次使用这个命令时,
satellite-maintain会提示您输入 hammer admin 用户凭证,并将它们保存在/etc/foreman-maintain/foreman-maintain-hammer.yml文件中。# satellite-maintain upgrade check --whitelist="check-upstream-repository,repositories-validate" --target-version 6.13.z- 检查结果,并在执行升级前解决所有突出显示的错误条件。
由于更新时间较长,请使用
tmux等实用程序来暂停并重新附加通信会话。然后您可以检查升级进度,而不会持续连接到命令 shell。如果您丢失了运行 upgrade 命令的命令 shell 的连接,您可以在
/var/log/foreman-installer/satellite.log文件中看到记录的消息,以检查进程是否成功完成。执行升级:
# satellite-maintain upgrade run --whitelist="check-upstream-repository,repositories-validate" --target-version 6.13.z确定系统是否需要重启:
# dnf needs-restarting --reboothint
可选:如果上一个命令告知您重新引导,请重启系统:
# reboot