OpenStack での仮想ネットワーク機能の展開
ここでは、Elastic Services Controller(ESC)のいくつかの展開シナリオと VNF の展開手順について説明します。次の表に、さまざまな展開シナリオを示します。
シナリオ |
説明 |
リソース |
利点 |
---|---|---|---|
ESC を使用してイメージとフレーバーを作成することにより、単一の VIM に VNF を展開する |
展開データモデルは、作成されたイメージとフレーバーを参照して、VNF を展開します。 |
イメージとフレーバーは、NETCONF/REST API を使用して ESC で作成されます。 |
|
アウトオブバンドイメージ、フレーバー、ボリューム、およびポートを使用した単一 VIM への VNF の展開 |
展開データモデルは、OpenStack のアウトオブバンドイメージ、フレーバー、ボリューム、およびポートを参照して、VNF を展開します。 |
イメージ、フレーバー、ボリューム、およびポートは、ESC を使用して作成されません。 |
|
アウトオブバンドリソースを使用した複数の VIM への VNF の展開 |
展開データモデルは、アウトオブバンドイメージ、フレーバー、ネットワーク、および VIM プロジェクトを参照して、VNF を展開します。 |
イメージ、フレーバー、VIM プロジェクト(ロケータで指定)およびネットワークは、ESC を使用して作成されません。これらは、VIM のアウトオブバンドに存在する必要があります。 |
展開内の ESC で設定する必要がある(VM を展開するための)VIM を指定できます。 |
複数の OpenStack VIM に VNF を展開するには、「複数の OpenStack VIM への VNF の展開」を参照してください。
単一の OpenStack VIM での VNF の展開
VNF の展開は、ESC ポータルまたはノースバウンド インターフェイスから発信されるサービス要求として開始されます。サービス要求は XML ペイロードで構成されます。ESC は、次の展開シナリオをサポートします。
-
ESC を使用したイメージおよびフレーバの作成による VNF の展開
-
アウトオブバンドイメージ、フレーバ、ボリューム、およびポートを使用した VNF の展開
VNF を展開する前に、OpenStack でイメージ、フレーバ、ボリューム、およびポートが使用可能であることを確認するか、これらのリソースを作成する必要があります。イメージ、フレーバ、およびボリュームの作成の詳細については、リソース管理の概要を参照してください。
展開では、展開と同じテナントによってアウトオブバンドポートを作成する必要があります。ポートの設定の詳細については、『Cisco Elastic Services Controller Administration Guide』の「Interface Configurations」を参照してください。
複数の VIM に VM を展開するには、「複数の OpenStack VIM への VNF の展開」を参照してください。
展開中、ESC は展開データモデルで展開の詳細を検索します。展開データモデルの詳細については、「Cisco Elastic Services Controller Deployment Attributes」を参照してください。ESC が特定のサービスに対する展開の詳細を見つけることができない場合は、vm_group の既存のフレーバとイメージを使用して展開を続行します。ESC がイメージとフレーバの詳細を検出できない場合、展開は失敗します。
重要 |
ネットワークに使用するサブネットを指定することもできます。展開データモデルでは、サブネットを指定する新しい subnet 属性が導入されています。詳細については、「Cisco Elastic Services Controller Deployment Attributes」を参照してください。
|
(注) |
SERVICE_UPDATE 設定が失敗すると、VM の最小数と最大数が変化し、スケールインまたはスケールアウトが発生します。OpenStack で発生したエラーのため、ESC は設定内の VM の最小数または最大数をロールバックできません。CDB(ESC DB)が同期していません。この場合、手動ロールバックを実行するには、別の SERVICE_UPDATE 設定を実行する必要があります。 |
OpenStack での展開では、UUID または名前を使用してイメージとフレーバを参照できます。名前は VIM で一意である必要があります。同じ名前の複数のイメージがある場合、展開は正しいイメージを識別できず、展開は失敗します。
<?xml version="1.0" encoding="UTF-8"?>
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2016-01-22T15:14:52.484+00:00</eventTime>
<escEvent xmlns="http://www.cisco.com/esc/esc">
<status>SUCCESS</status>
<status_code>200</status_code>
<status_message>VIM Driver: VM successfully created,
VM Name: [SystemAdminxyz_abc_NwDepMod1_0_5e6b7957-20e7-4df9-9113-e5fc8c047e91]</status_message>
<depname>test_NwDepModVmGrp1</depname>
<tenant>admin</tenant>
<tenant_id>62cd11f560b44bf5815eaad41fc94c80</tenant_id>
</event>
再起動時間パラメータ
再起動時間パラメータが展開要求に導入されます。これにより、展開におけるリカバリの再起動待機時間をよりきめ細かく制御できます。展開では、VM が再起動すると、モニタに再起動時間が設定されます。VM ALIVE イベントの前に再起動時間が経過すると、VM_RECOVERY_COMPLETE や undeploy などの次のアクションが実行されます。
(注) |
再起動時間が指定されていない場合は、ブートアップ時間が使用されます。 |
データモデルの変更は次のとおりです。
<?xml version="1.0" encoding="UTF-8"?>
<esc_datamodel xmlns="http://www.cisco.com/esc/esc">
<tenants>
<tenant>
<name>tenant</name>
<deployments>
<deployment>
<name>depz</name>
<vm_group>
<name>g1</name>
<image>Automation-Cirros-Image</image>
<flavor>Automation-Cirros-Flavor</flavor>
<reboot_time>30</reboot_time>
<recovery_wait_time>10</recovery_wait_time>
<interfaces>
<interface>
<nicid>0</nicid>
<port>pre-assigned_IPV4_1</port>
<network>my-network</network>
</interface>
</interfaces>
<kpi_data>
<kpi>
<event_name>VM_ALIVE</event_name>
<metric_value>1</metric_value>
<metric_cond>GT</metric_cond>
<metric_type>UINT32</metric_type>
<metric_collector>
<nicid>0</nicid>
<type>ICMPPing</type>
<poll_frequency>3</poll_frequency>
<polling_unit>seconds</polling_unit>
<continuous_alarm>false</continuous_alarm>
</metric_collector>
</kpi>
</kpi_data>
<rules>
<admin_rules>
<rule>
<event_name>VM_ALIVE</event_name>
<action>ALWAYS log</action>
<action>TRUE servicebooted.sh</action>
<action>FALSE recover autohealing</action>
</rule>
</admin_rules>
</rules>
<config_data />
<scaling>
<min_active>1</min_active>
<max_active>2</max_active>
<elastic>true</elastic>
</scaling>
<recovery_policy>
<recovery_type>AUTO</recovery_type>
<action_on_recovery>REBOOT_ONLY</action_on_recovery>
<max_retries>1</max_retries>
</recovery_policy>
</vm_group>
</deployment>
</deployments>
</tenant>
</tenants>
</esc_datamodel>
通知の例は次のとおりです。
20:43:48,133 11-Oct-2016 WARN ===== SEND NOTIFICATION STARTS =====
20:43:48,133 11-Oct-2016 WARN Type: VM_RECOVERY_INIT
20:43:48,134 11-Oct-2016 WARN Status: SUCCESS
20:43:48,134 11-Oct-2016 WARN Status Code: 200
20:43:48,134 11-Oct-2016 WARN Status Msg: Recovery event for
VM [dep-12_CSR1_c_0_37827511-be08-4702-b0bd-1918cb995118] triggered.
20:43:48,134 11-Oct-2016 WARN Tenant: gilan-test-5
20:43:48,134 11-Oct-2016 WARN Service ID: NULL
20:43:48,134 11-Oct-2016 WARN Deployment ID: f6ff8164-fe6d-4589-84fa-f39d676e9231
20:43:48,134 11-Oct-2016 WARN Deployment name: dep-12
20:43:48,134 11-Oct-2016 WARN VM group name: CSR1_cirros
20:43:48,134 11-Oct-2016 WARN VM Source:
20:43:48,134 11-Oct-2016 WARN VM ID: 90d2066c-9a07-485b-8f72-b51026a62922
20:43:48,134 11-Oct-2016 WARN Host ID: 69c3fba0a5b5ffff211bd05b9da7e2130d98d005a9bef71ace7d09ff
20:43:48,134 11-Oct-2016 WARN Host Name: my-server
20:43:48,134 11-Oct-2016 WARN [DEBUG-ONLY] VM IP: 192.168.0.75;
20:43:48,135 11-Oct-2016 WARN ===== SEND NOTIFICATION ENDS =====
20:43:56,149 11-Oct-2016 WARN
20:43:56,149 11-Oct-2016 WARN ===== SEND NOTIFICATION STARTS =====
20:43:56,149 11-Oct-2016 WARN Type: VM_RECOVERY_REBOOT
20:43:56,149 11-Oct-2016 WARN Status: SUCCESS
20:43:56,149 11-Oct-2016 WARN Status Code: 200
20:43:56,150 11-Oct-2016 WARN Status Msg: VM [dep-12_CSR1_c_0_37827511-be08-4702-b0bd-1918cb995118] is rebooted.
20:43:56,150 11-Oct-2016 WARN Tenant: gilan-test-5
20:43:56,150 11-Oct-2016 WARN Service ID: NULL
20:43:56,150 11-Oct-2016 WARN Deployment ID: f6ff8164-fe6d-4589-84fa-f39d676e9231
20:43:56,150 11-Oct-2016 WARN Deployment name: dep-12
20:43:56,150 11-Oct-2016 WARN VM group name: CSR1_cirros
20:43:56,150 11-Oct-2016 WARN VM Source:
20:43:56,151 11-Oct-2016 WARN VM ID: 90d2066c-9a07-485b-8f72-b51026a62922
20:43:56,151 11-Oct-2016 WARN Host ID: 69c3fba0a5b5ffff211bd05b9da7e2130d98d005a9bef71ace7d09ff
20:43:56,151 11-Oct-2016 WARN Host Name: my-server
20:43:56,152 11-Oct-2016 WARN [DEBUG-ONLY] VM IP: 192.168.0.75;
20:43:56,152 11-Oct-2016 WARN ===== SEND NOTIFICATION ENDS =====
20:44:26,481 11-Oct-2016 WARN
20:44:26,481 11-Oct-2016 WARN ===== SEND NOTIFICATION STARTS =====
20:44:26,481 11-Oct-2016 WARN Type: VM_RECOVERY_COMPLETE
20:44:26,481 11-Oct-2016 WARN Status: FAILURE
20:44:26,481 11-Oct-2016 WARN Status Code: 500
20:44:26,481 11-Oct-2016 WARN Status Msg: Recovery: Recovery completed with errors