6.6. コントロールプレーンにスイッチ設定を追加する
スイッチ設定をコントロールプレーンに追加するには、OpenStackControlPlane CR の neutron サービス設定を通じて、スイッチの 03-ml2-genericswitch.conf 設定ファイルと Secret カスタムリソース (CR) の両方をマウントします。
手順
-
ワークステーションで
OpenStackControlPlaneCR ファイルopenstack_control_plane.yamlを開きます。 ironicサービスに次の設定を追加して、ネットワークインターフェイスをneutronに変更します。spec: ... ironic: template: customServiceConfig: | [DEFAULT] default_network_interface=neutron汎用スイッチを ML2 メカニズムドライバーとして
neutronサービス仕様に追加します。apiVersion: core.openstack.org/v1beta1 kind: OpenStackControlPlane metadata: name: openstack-control-plane namespace: openstack spec: secret: osp-secret ... neutron: ... template: ml2MechanismDrivers: - genericswitch - ovnneutronサービス仕様にextraMountsパラメーターを追加して、物理ネットワークスイッチの設定をマウントします。neutron: ... template: ... extraMounts: - name: switchConf extraVol: - volumes: - name: neutron-switch-config secret: secretName: neutron-switch-config mounts: - name: neutron-switch-config mountPath: /etc/neutron/neutron.conf.d/03-ml2-genericswitch.conf subPath: 03-ml2-genericswitch.conf readOnly: true物理ネットワークスイッチに認証鍵を割り当てる必要がある場合は、マウントに秘密鍵ファイルを追加します。
mounts: - name: neutron-switch-config mountPath: /etc/neutron/neutron.conf.d/03-ml2-genericswitch.conf subPath: 03-ml2-genericswitch.conf readOnly: true - name: neutron-switch-config mountPath: /etc/neutron/<key_file_name> subPath: <key_file_name> readOnly: truemountPathは、03-ml2-genericswitch.confファイルでスイッチデバイスに対して定義された鍵ファイルへのパスと一致する必要があります。コントロールプレーンを更新します。
$ oc apply -f openstack_control_plane.yaml -n openstack