OpenStack の VIM コネクタの設定
OpenStack 固有の操作用に VIM コネクタを設定できます。
(注) |
VIM コネクタを設定するには、VIM コネクタの設定を参照してください。 |
OpenStack での ESC ユーザの非管理者ロールの作成
デフォルトでは、OpenStack では ESC ユーザに管理者ロールが割り当てられます。一部のポリシーでは、特定の ESC 操作に対してデフォルトの管理者ロールの使用が制限される場合があります。ESC リリース 3.1 以降では、OpenStack で ESC ユーザの権限を制限した非管理者ロールを作成できます。
非管理者ロールを作成するには、次の手順を実行します。
-
OpenStack で非管理者ロールを作成します。
-
ESC ユーザに非管理者ロールを割り当てます。
OpenStack Horizon(アイデンティティ)で、または OpenStack コマンド ライン インターフェイスを使用して、ESC ユーザロールを割り当てる必要があります。詳細については、OpenStack のマニュアルを参照してください。
ロール名は OpenStack でカスタマイズできます。デフォルトでは、OpenStack のすべての非管理者ロールに同じレベルの権限が付与されます。
-
管理者以外のロールに必要な権限を付与します。
policy.json ファイルを変更して、必要な権限を付与する必要があります。
(注)
ESC ユーザロールを動作させるには、policy.json ファイルの create_port: fixed_ips および create_port: mac_address パラメータに権限を付与する必要があります。
次の表に、必要な権限を取得後に非管理者ロールで実行できる ESC 操作を示します。
ESC VIM 操作 |
説明 |
権限 |
コメント |
---|---|---|---|
プロジェクトの作成 |
OpenStack プロジェクトを作成する |
/etc/keystone/policy.json "identity:create_project" "identity:create_grant" |
ESC 管理対象 OpenStack プロジェクトの場合は、 ロールに identity: create_grant が必要なプロジェクトにユーザを追加します。 |
プロジェクトの削除 |
OpenStack プロジェクトを削除する |
/etc/keystone/policy.json "identity:delete_project" |
|
イメージのクエリ |
すべてのイメージのリストを取得する |
不要 |
所有者(ターゲットプロジェクトのユーザ)がクエリを実行できます。 パブリックイメージまたは共有イメージを取得できます。 |
イメージの作成(Create Image) |
パブリックイメージを作成する | /etc/glance/policy.json "publicize_image" |
デフォルトでは、管理者はパブリックイメージを作成できます。 イメージの公開はポリシーによって保護されます。 |
プライベートイメージを作成する |
不要 |
次の文を使用してプライベートイメージを作成できます。 <image> <name>mk-test-image</name> ... <disk_bus>virtio</disk_bus> <visibility>private</visibility> </image> |
|
イメージの削除 |
イメージを削除する |
不要 |
所有者はイメージを削除できます。 |
フレーバーのクエリ |
既存のフレーバーをクエリする |
不要 |
所有者はフレーバーをクエリできます。 パブリックフレーバーもクエリできます。 |
フレーバーの作成 |
新しいフレーバーを作成する | /etc/nova/policy.json "os_compute_api:os-flavor-manage" |
フレーバーの管理は通常、 クラウドの管理者だけができます。 |
フレーバーの削除 |
フレーバーを削除する | /etc/nova/policy.json "os_compute_api:os-flavor-manage" |
|
ネットワークのクエリ |
ネットワークのリストを取得する | /etc/neutron/policy.json "get_network" |
所有者は、共有ネットワークを含むネットワークのリストを取得できます。 |
ネットワークの作成 |
通常のネットワークを作成する |
不要 |
|
特殊なケースでネットワークを作成する | /etc/neutron/policy.json "create_network:provider:physical_network" "create_network:provider:network_type" "create_network:provider:segmentation_id"
"create_network:shared" |
これらのルールは、 physical_network(SR-IOV など)、network_type(SR-IOV など)、またはsegmentation_id(3008 など)を使用してネットワークを作成するか、あるいはネットワークを共有用に設定する場合に必要です。 <network> <name>provider-network</name> <!-- <shared>false</shared> //default is true--> <admin_state>true</admin_state> <provider_physical_network>VAR_PHYSICAL_NET
</provider_physical_network> <provider_network_type>vlan </provider_network_type> <provider_segmentation_id>2330 </provider_segmentation_id>
... </network> |
|
ネットワークの削除 |
ネットワークを削除する |
不要 |
所有者はネットワークを削除できます。 |
サブネットのクエリ |
サブネットのリストを取得する | /etc/neutron/policy.json "get_subnet" |
ネットワークの所有者はサブネットのリストを取得できます。 共有ネットワークからサブネットのリストを取得することもできます。 <network> <name>esc-created-network</name> <!--network must be created by ESC--> <admin_state>false</admin_state> <subnet>
<name>makulandyescextnet1-subnet1</name> <ipversion>ipv4</ipversion> <dhcp>true</dhcp> <address>10.6.0.0</address> <netmask>255.255.0.0</netmask>
</subnet> </network> |
サブネットの作成 | サブネットを作成する |
不要 |
ネットワークの所有者はサブネットを作成できます。 |
サブネットの削除 | サブネットを削除する |
不要 |
ネットワークの所有者はサブネットを削除できます。 |
ポートのクエリ | 既存のポートを取得する | 不要 | 所有者はポートのリストを取得できます。 |
ポートの作成 |
DHCP を使用してネットワーク インターフェイスを作成する |
不要 |
|
MAC アドレスを使用してネットワーク インターフェイスを作成する |
/etc/neutron/policy.json "create_port:mac_address" |
<interfaces> <interface> <nicid>0</nicid> <mac_address>fa:16:3e:73:19:b5</mac_address> <network>esc-net</network> </interface>
</interfaces> VM リカバリにもこの権限が必要です。
|
|
固定 IP または共有 IP を使用してネットワーク インターフェイスを作成する |
/etc/neutron/policy.json "create_port:fixed_ips" |
<subnet> <name>IP-pool-subnet</name> <ipversion>ipv4</ipversion> <dhcp>false</dhcp> <address>172.16.0.0</address> <netmask>255.255.255.0</netmask>
<gateway>172.16.0.1</gateway> </subnet> <shared_ip> <nicid>0</nicid> <static>false</static> </shared_ip> VM リカバリにもこの権限が必要です。 |
|
ポートの更新 |
ポートデバイスの所有者の更新 |
不要 |
所有者はポートを更新できます。 |
アドレスペアを許可するようにポートを更新する |
/etc/neutron/policy.json "update_port:allowed_address_pairs" |
<interface> <nicid>0</nicid> <network>VAR_MANAGEMENT_NETWORK_ID</network> <allowed_address_pairs> <network> <name>VAR_MANAGEMENT_NETWORK_ID</name>
</network> <address> <ip_address>172.16.0.0</ip_address> <netmask>255.255.0.0 </netmask> </address> <address> <ip_address>172.16.6.1</ip_address>
<ip_prefix>24 </ip_prefix> </address> </allowed_address_pairs> </interface> |
|
ポートの削除(Delete Port) |
ポートを削除する |
不要 |
所有者はポートを削除できます。 |
ボリュームのクエリ |
ボリュームのリストを取得する |
不要 |
所有者はボリュームのリストを取得できます。 |
ボリュームの作成 |
ボリュームを作成する |
不要 |
|
ボリュームの削除 |
ボリュームを削除する |
不要 |
所有者はボリュームを削除できます。 |
VM のクエリ |
プロジェクト内のすべての VM を取得する |
不要 |
所有者は、プロジェクト内のすべての VM のリストを取得できます。 |
VM の作成 |
VM を作成する |
不要 |
|
ホストのターゲット展開で VM を作成する |
/etc/nova/policy.json "os_compute_api:servers:create:forced_host" |
<placement> <type>zone_host</type> <enforcement>strict</enforcement> <host>anyHOST</host> </placement> |
|
ゾーンのターゲット展開で VM を作成する |
不要 |
||
同じホストに VM を作成する アフィニティ/アンチアフィニティ |
不要 |
||
サーバグループに VM を作成する アフィニティ/アンチアフィニティ |
不要 |
このサポートは、グループ内アンチアフィニティ専用です。 |
|
[VM の削除(Delete VM)] |
VM を削除する |
不要 |
所有者は VM を削除できます。 |
OpenStack でのリソース管理の詳細については、OpenStack のリソースの管理を参照してください。
OpenStack エンドポイントの上書き
デフォルトでは、ESC は認証に成功後、OpenStack が提供するエンドポイントのカタログリターンオプションを使用します。ESC はこれらのエンドポイントを使用して、OpenStack のさまざまな API と通信します。エンドポイントは正しく設定されていないこともあります。たとえば、OpenStack インスタンスは認証に KeyStone V3 を使用するように設定されているのに、OpenStack から返されるエンドポイントが KeyStone V2 用の場合があります。この問題は、OpenStack エンドポイントを上書きすることで解決できます。
VIM コネクタの設定中に OpenStack エンドポイントを上書き(設定)できます。これは、インストール時に bootvm.py パラメータおよび VIM コネクタ API を使用して実行できます。
次の OpenStack エンドポイントは、VIM コネクタの設定を使用して設定できます。
-
OS_IDENTITY_OVERWRITE_ENDPOINT
-
OS_COMPUTE_OVERWRITE_ENDPOINT
-
OS_NETWORK_OVERWRITE_ENDPOINT
-
OS_IMAGE_OVERWRITE_ENDPOINT
-
OS_VOLUME_OVERWRITE_ENDPOINT
インストール時に OpenStack エンドポイントを上書きする場合、ユーザは ESC 設定パラメータファイルを作成し、ESC VM の展開中にこのファイルを引数として bootvm.py に渡します。
次に、param.conf ファイルの例を示します。
openstack.os_identity_overwrite_endpoint=http://www.xxxxxxxxxxx.com
インストール時の VIM コネクタの設定の詳細については、VIM コネクタの設定を参照してください。
VIM コネクタ API(REST と NETCONF の両方)を使用して、デフォルト以外の VIM コネクタの OpenStack エンドポイントを上書き(設定)するには、新しい VIM コネクタの作成時または既存の VIM コネクタの更新時に、上書きするエンドポイントを VIM コネクタのプロパティとして追加します。
各 VIM コネクタには、独自の上書きエンドポイントを設定できます。デフォルトの上書きエンドポイントはありません。
次の例では、os_identity_overwrite_endpoint および os_network_overwrite_endpoint プロパティを追加して、エンドポイントを上書きします。
<esc_system_config xmlns="http://www.cisco.com/esc/esc">
<vim_connectors>
<!--represents a vim-->
<vim_connector>
<id>default_openstack_vim</id>
<type>OPENSTACK</type>
<properties>
<property>
<name>os_auth_url</name>
<value>http://172.16.0.0:35357/v3</value>
</property>
<property>
<name>os_project_domain_name</name>
<value>default</value>
</property>
<property>
<name>os_project_name</name>
<value>admin</value>
</property>
<property>
<name>os_identity_overwrite_endpoint</name>
<value>http://some_server:some_port/</value>
</property>
<property>
<name>os_network_overwrite_endpoint</name>
<value>http://some_other_server:some_other_port/</value>
</property>
</properties>
</vim_connector>
</vim_connectors>
</esc_system_config>