9.3.17. RHOSP でのネットワークリソースの作成

独自のインフラストラクチャーを使用する Red Hat OpenStack Platform (RHOSP) インストールの OpenShift Container Platform に必要なネットワークリソースを作成します。時間を節約するには、セキュリティーグループ、ネットワーク、サブネット、ルーター、およびポートを生成する指定された Ansible Playbook を実行します。

前提条件

  • Python 3 がマシンにインストールされている。
  • Playbook 依存関係のダウンロードでモジュールをダウンロードしている。
  • インストール Playbook のダウンロードで Playbook をダウンロードしている。

手順

  1. オプション: 外部ネットワークの値を inventory.yaml Playbook に追加します。

    inventory.yaml Ansible Playbook の外部ネットワーク値の例

    ...
          # The public network providing connectivity to the cluster. If not
          # provided, the cluster external connectivity must be provided in another
          # way.
    
          # Required for os_api_fip, os_ingress_fip, os_bootstrap_fip.
          os_external_network: 'external'
    ...

    重要

    inventory.yaml ファイルの os_external_network の値を指定しなかった場合は、仮想マシンが Glance および外部接続にアクセスできるようにする必要があります。

  2. オプション: 外部ネットワークおよび Floating IP (FIP) アドレスの値を inventory.yaml Playbook に追加します。

    inventory.yaml Ansible Playbook の FIP 値の例

    ...
          # OpenShift API floating IP address. If this value is non-empty, the
          # corresponding floating IP will be attached to the Control Plane to
          # serve the OpenShift API.
          os_api_fip: '203.0.113.23'
    
          # OpenShift Ingress floating IP address. If this value is non-empty, the
          # corresponding floating IP will be attached to the worker nodes to serve
          # the applications.
          os_ingress_fip: '203.0.113.19'
    
          # If this value is non-empty, the corresponding floating IP will be
          # attached to the bootstrap machine. This is needed for collecting logs
          # in case of install failure.
          os_bootstrap_fip: '203.0.113.20'

    重要

    os_api_fip および os_ingress_fip の値を定義しない場合、インストール後のネットワーク設定を実行する必要があります。

    os_bootstrap_fip の値を定義しない場合、インストーラーは失敗したインストールからデバッグ情報をダウンロードできません。

    詳細は、環境へのアクセスの有効化を参照してください。

  3. コマンドラインで、security-groups.yaml Playbook を実行してセキュリティーグループを作成します。

    $ ansible-playbook -i inventory.yaml security-groups.yaml
  4. コマンドラインで、network.yaml Playbook を実行して、ネットワーク、サブネット、およびルーターを作成します。

    $ ansible-playbook -i inventory.yaml network.yaml
  5. オプション: Nova サーバーが使用するデフォルトのリゾルバーを制御する必要がある場合は、RHOSP CLI コマンドを実行します。

    $ openstack subnet set --dns-nameserver <server_1> --dns-nameserver <server_2> "$INFRA_ID-nodes"