2.3. Red Hat Openstack Platform および Ansible リポジトリーの更新

Red Hat OpenStack Platform 16.1 パッケージおよび Ansible 2.9 パッケージを使用するようにリポジトリーを更新します。

手順

  1. アンダークラウドに stack ユーザーとしてログインします。
  2. stackrc ファイルを取得します。

    $ source ~/stackrc
  3. RhsmVars パラメーターが含まれるオーバークラウドのサブスクリプション管理用環境ファイルを編集します。通常、このファイルのデフォルト名は rhsm.yml です。
  4. サブスクリプション管理の設定で rhsm_repos パラメーターを確認します。rhsm_repos パラメーターで Red Hat OpenStack Platform 16.0 リポジトリーおよび Ansible 2.8 リポジトリーが使用されている場合は、リポジトリーを正しいバージョンに変更します。

    parameter_defaults:
      RhsmVars:
        rhsm_repos:
          - rhel-8-for-x86_64-baseos-tus-rpms
          - rhel-8-for-x86_64-appstream-tus-rpms
          - rhel-8-for-x86_64-highavailability-tus-rpms
          - ansible-2.9-for-rhel-8-x86_64-rpms
          - advanced-virt-for-rhel-8-x86_64-rpms
          - openstack-16.1-for-rhel-8-x86_64-rpms
          - fast-datapath-for-rhel-8-x86_64-rpms
  5. オーバークラウドのサブスクリプション管理用環境ファイルを保存します。
  6. オーバークラウドの静的なインベントリーファイルを作成します。

    $ tripleo-ansible-inventory --ansible_ssh_user heat-admin --static-yaml-inventory ~/inventory.yaml

    デフォルトのオーバークラウド名 overcloud 以外のオーバークラウド名を使用する場合は、--plan オプションを使用して実際のオーバークラウドの名前を設定します。

  7. すべてのノードで、リポジトリーを Red Hat OpenStack Platform 16.1 に設定するタスクが含まれる Playbook を作成します。

    $ cat > ~/update_rhosp_repos.yaml <<'EOF'
    - hosts: all
      gather_facts: false
      tasks:
        - name: change osp repos
          command: subscription-manager repos --disable=openstack-16-for-rhel-8-x86_64-rpms --enable=openstack-16.1-for-rhel-8-x86_64-rpms --disable=ansible-2.8-for-rhel-8-x86_64-rpms --enable=ansible-2.9-for-rhel-8-x86_64-rpms
          become: true
    EOF
  8. update_rhosp_repos.yaml Playbook を実行します。

    $ ansible-playbook -i ~/inventory.yaml -f 25 ~/update_rhosp_repos.yaml --limit <undercloud>,<Controller>,<Compute>
    • --limit オプションを使用して、コンテンツをすべての RHOSP ノードに適用します。<undercloud><Controller><Compute> を、それらのノードを含む環境内の Ansible グループに置き換えます。
    • これらのノードに別のサブスクリプションを使用している場合は、Ceph Storage ノードに対してこの Playbook を実行することはできません。
  9. すべてのノードで、リポジトリーを Red Hat OpenStack Platform 16.1 に設定するタスクが含まれる Playbook を作成します。

    $ cat > ~/update_ceph_repos.yaml <<'EOF'
    - hosts: all
      gather_facts: false
      tasks:
        - name: change ceph repos
          command: subscription-manager repos --disable=openstack-16-deployment-tools-for-rhel-8-x86_64-rpms --enable=openstack-16.1-deployment-tools-for-rhel-8-x86_64-rpms --disable=ansible-2.8-for-rhel-8-x86_64-rpms --enable=ansible-2.9-for-rhel-8-x86_64-rpms
          become: true
    EOF
  10. update_ceph_repos.yaml Playbook を実行します。

    $ ansible-playbook -i ~/inventory.yaml -f 25 ~/update_ceph_repos.yaml --limit CephStorage

    --limit オプションを使用して、コンテンツを Ceph Storage ノードに適用します。