11.6. 准备 Leapp 以使用 Satellite 服务器

如果您使用 Satellite Server 6 托管 RPM 内容,请完成这些准备步骤,以确保使用 Satellite 成功升级 Leapp。

前提条件

  • 创建一个 Satellite 服务器激活码,该激活码链接到 Red Hat OpenStack Platform 16.1 和 Red Hat Enterprise Linux 8.2 的软件仓库。
  • 为您的 overcloud 节点生成 Ansible 清单文件。
  • 在管理门户中,为 Red Hat OpenStack Platform 16.1 升级创建并提升内容视图,并包括升级所需的存储库。如需更多信息,请参阅 Red Hat Satellite Server 6 的注意事项
  • 如果您使用 Ceph 订阅并已将 director 配置为将 overcloud-minimal 镜像用于 Ceph 存储节点,则必须在 Satellite 服务器上创建一个内容视图,并将以下 Red Hat Enterprise Linux (RHEL) 8.2 存储库添加到其中:

    • Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)

      rhel-8-for-x86_64-appstream-rpms
      x86_64 8.2
    • Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)

      rhel-8-for-x86_64-baseos-rpms
      x86_64 8.2

      如需更多信息,请参阅 Red Hat Satellite Content Management 指南中的 Importing Red Hat ContentManaging Content Views

流程

  1. stack 用户的身份登录 undercloud。
  2. 创建名为 playbook-satellite.yaml 的文件,并将以下内容粘贴到文件中:

    - name: Pre-install leapp
      hosts: overcloud
      become: yes
      tasks:
        - name: Pre-install leapp
          yum:
            name:
              - leapp
              - leapp-repository
            state: installed
        - name: Remove katello-host-tools-fact-plugin
          yum:
            name:
              - katello-host-tools-fact-plugin
            state: removed
        - name: Register system
          redhat_subscription:
            activationkey: "osp16-key"
            org_id: "ACME"
            server_hostname: "satellite.example.com"
            rhsm_baseurl: "https://satellite.example.com/pulp/repos"
            force_register: True

    修改 redhat_subscription 变量,以适合您的 Satellite 服务器。

  3. 运行 playbook:

    $ ansible-playbook -i ~/inventory.yaml playbook-satellite.yaml