オーケストレーションは、高可用性、監視および持続性のためにシステム・コンポーネントの管理を自動化します。
オーケストレーションは、作成したコンポーネントを単一の管理可能なコレクションにまとめます。 また、依存性を指定して、コンポーネントが作成される順序を制御できます。 たとえば、ネットワークおよびストレージ・リソースの作成をインスタンスの作成と調整すると、高可用性が有効な場合、インスタンスが予期せず終了するとインスタンスを自動的に起動できます。 Oracle Compute Cloud Serviceでは、すべてのインスタンスはオーケストレーションを使用して作成されます。
注意:
オーケストレーションのステータスを変更するライフサイクル・コマンド(start
、stop
、restart
など)は、サーバー側のステータス変化の進行状況を即時に戻します。 オーケストレーション・ステータスは、オーケストレーション詳細を取得して監視できます。 オーケストレーションに関連する手順の詳細は、『Oracle Compute Cloud Serviceの使用』のオーケストレーション・テンプレートに関する項を参照してください。
このAPIを使用すると、新しいオーケストレーションをJSON定義から作成できます。
メソッド
POST
RESTリソース
/orchestration/
URI
https://api_endpoint/orchestration/
リクエスト本文のパラメータ
JSON形式のオーケストレーションがリクエスト本文に渡されます。 オーケストレーションJSONファイルの形式および属性の詳細は、『Oracle Compute Cloud Serviceの使用』のオーケストレーション・テンプレートに関する項を参照してください。URIの例
https://api.oc.example.com/orchestration
リクエスト本文の例
{ "relationships": [], "account": null, "description": "", "schedule": {"start_time": null, "stop_time": null}, "uri": null, "oplans": [{ "ha_policy": null, "obj_type": "launchplan", "objects": [{ "instances": [{ "imagelist": "/oracle/public/linux6_12.2.1.0.0_64", "networking": { "net1": {"vnet": "/mytenant/public/ipoib1"}, "net0": {"vnet": "/mytenant/public/eoib1"} }, "shape": "oc3", "label": "pv-mixed1" }] }], "label": "pv-mixednet" }], "name": "/mytenant/public/pv-mixed1" }
レスポンス本文の例
{ "relationships": [], "status": "stopped", "account": "/mytenant/default", "description": "", "schedule": {"start_time": null, "stop_time": null}, "uri": "http ://api/orchestration/mytenant/public/pv-mixed1", "oplans": [{ "status": "stopped", "info": {}, "obj_type": "launchplan", "ha_policy": "", "label": "pv-mixednet", "objects": [{ "instances": [{ "imagelist": "/oracle/public/linux6_12.2.1.0.0_64", "uri": null, "networking": { "net1": {"vnet": "/mytenant/public/ipoib1"}, "net0": {"vnet": "/mytenant/public/eoib1"} }, "shape": "oc3", "label": "pv-mixed1" }] }], "status_timestamp": null }], "info": {}, "status_timestamp": null, "name": "/mytenant/public/pv-mixed1" }
このAPIを使用すると、オーケストレーションをシステムから削除できます。 削除できるのは、停止
ステータスのオーケストレーションのみです。
メソッド
DELETE
RESTリソース
/orchestration/name
URI
https://api_endpoint/orchestration/name
URIパラメータ
パラメータ | 説明 |
---|---|
name |
オーケストレーションの一意の階層名。 たとえば、/mytenant/public/myorch です |
URIの例
https://api.oc.example.com/orchestration/mytenant/public/myorch
このAPIを使用すると、特定のオーケストレーションを開始できます。 開始できるのは、停止
ステータスのオーケストレーションのみです。
オーケストレーションを開始すると、オーケストレーションで定義されたすべてのオブジェクトが作成されます。 オーケストレーションの状態は、起動操作の進行により変化します。 起動APIリクエストは、レスポンスを即時に戻しますが、起動操作はサーバー側で継続します。 起動操作は、オーケストレーションがready
ステータスに達するまで、終了しません。
メソッド
PUT
RESTリソース
/orchestration/name
URI
https://api_endpoint/orchestration/name?action=START
URIパラメータ
パラメータ | 説明 |
---|---|
name | オーケストレーションの一意の階層名。 たとえば、/mytenant/public/myorch です |
action | (オプション)オーケストレーションで実行する必要があるアクションを指定します。 このAPIでは、このパラメータの有効な値はSTART です。 |
URIの例
https://api.oc.example.com/orchestration/mytenant/public/user1/test-vm?action=START
レスポンス本文の例
{ "result": [ { "relationships": [], "status": "starting", "account": "/mytenant/default", "description": "", "schedule": {"start_time": "2015-10-23T09:58:52Z", "stop_time": null}, "uri": "https://api/orchestration/mytenant/public/mytenantdb", "oplans": [{ .....}] "status_timestamp": "2015-10-23T10:01:02Z"}], "info": {"errors": {}, "warnings": {}}, "status_timestamp": "2015-10-23T10:01:02Z", "name": "/mytenant/public/db" } ] }
このAPIを使用すると、特定のオーケストレーションを停止できます。 オーケストレーションを停止するとすべてのインスタンスが削除され、オーケストレーションで割り当てられたすべてのリソースが解放されます。 これには、起動(root)ディスクおよびリザーブされていないIPアドレスが含まれます。 オーケストレーションは、次のいずれか1つのステータスにある場合に停止できます:ready
、shutdown
、warning
およびerror
。 オーケストレーションは再び開始され、新しいインスタンスを作成し、新しいリソースを割り当てます。
メソッド
PUT
RESTリソース
/orchestration/name
URI
https://api_endpoint/orchestration/name?action=STOP
URIパラメータ
パラメータ | 説明 |
---|---|
name | オーケストレーションの一意の階層名。 たとえば、/mytenant/public/myorch です |
action | (オプション)オーケストレーションで実行する必要があるアクションを指定します。 このAPIでは、このパラメータの有効な値はSTOP です。 |
URIの例
https://api.oc.example.com/orchestration/mytenant/public/dev-vm?action=STOP
レスポンス本文の例
{ "account": "/mytenant/default", "description": "", "info": { "errors": {}, "warnings": {} }, "name": "/mytenant/public/dev-vm", "oplans": [ { "ha_policy": "", "info": { "errors": {}, "warnings": {} }, "label": "sj-dev-vm", "obj_type": "launchplan", "objects": [ { "instances": [ { "imagelist": "/oracle/public/oel6", "ip": "10.128.0.10", "label": "sj-oel6-vm", "name": "/mytenant/public/d5baeacd-e97d-4933-b170-fcfad113bf1e", "networking": { "eth0": { "dns": [ "ccd371.mytenant.public.t1700-4186.example.com." ], "seclists": [ "/mytenant/default/default" ], "vethernet": "/oracle/public/default" } }, "shape": "small", "start_time": "2015-11-23T21:15:32Z", "state": "stopping", "uri": null } ] } ], "status": "ready", "status_timestamp": "2015-11-23T21:18:11Z" } ], "relationships": [], "schedule": { "start_time": "2015-11-23T21:15:27Z", "stop_time": "2015-11-24T18:43:13Z" }, "status": "ready", "status_timestamp": "2015-11-23T21:18:11Z", "uri": "http://api/orchestration/mytenant/public/dev-vm" }
このAPIを使用すると、IPアドレスおよび起動ディスクの内容など、インスタンスで使用されるリソースを保持して、VMインスタンスを停止できます。 オーケストレーションを再起動すると、同一の起動ディスクおよびIPアドレスに復帰します。 これらのリソースを保持する必要がない場合、オーケストレーションの停止
を使用します。 ready
またはwarning
状態のオーケストレーションを終了できます。
メソッド
PUT
RESTリソース
/orchestration/name
URI
https://api_endpoint/orchestration/name?action=SHUTDOWN
URIパラメータ
パラメータ | 説明 |
---|---|
name | オーケストレーションの一意の階層名。 たとえば、/mytenant/public/myorch です。 |
action | (オプション)オーケストレーションで実行する必要があるアクションを指定します。 このAPIでは、このパラメータの有効な値はSHUTDOWNです。 |
URIの例
https://api.oc.example.com/orchestration/mytenant/public/dev-vm?action=SHUTDOWN
レスポンス本文の例
{ "account": "/mytenant/default", "description": "", "info": { "errors": {}, "warnings": {} }, "name": "/mytenant/public/dev-vm", "oplans": [ { "ha_policy": "", "info": { "errors": {}, "warnings": {} }, "label": "sj-dev-vm", "obj_type": "launchplan", "objects": [ { "instances": [ { "imagelist": "/oracle/public/oel6", "ip": "10.128.0.10", "label": "sj-oel6-vm", "name": "/mytenant/public/d5baeacd-e97d-4933-b170-fcfad113bf1e", "networking": { "eth0": { "dns": [ "ccd371.mytenant.public.t1700-4186.example.com." ], "seclists": [ "/mytenant/default/default" ], "vethernet": "/oracle/public/default" } }, "shape": "small", "start_time": "2015-11-23T21:15:32Z", "state": "shutting_down", "uri": null } ] } ], "status": "ready", "status_timestamp": "2015-11-23T21:18:11Z" } ], "relationships": [], "schedule": { "start_time": "2015-11-23T21:15:27Z", "stop_time": "2015-11-24T18:43:13Z" }, "status": "ready", "status_timestamp": "2015-11-23T21:18:11Z", "uri": "http://api/orchestration/mytenant/public/dev-vm" }
このAPIを使用すると、以前はshut_down
ステータスにあったオーケストレーションを再起動できます。 オーケストレーションは、warning
、shut_down
またはerror
のステータスで再起動できます。
メソッド
PUT
RESTリソース
/orchestration/name
URI
https://api_endpoint/orchestration/name?action=RESTART
URIパラメータ
パラメータ | 説明 |
---|---|
name | オーケストレーションの一意の階層名。 たとえば、/mytenant/public/myorch です。 |
action | (オプション)オーケストレーションで実行するアクションを指定します。 このAPIでは、このパラメータの有効な値はRESTART です。 |
URIの例
https://api.oc.example.com/orchestration/mytenant/public/dev-vm?action=RESTART
レスポンス本文の例
{ "account": "/mytenant/default", "description": "", "info": { "errors": {}, "warnings": {} }, "name": "/mytenant/public/dev-vm", "oplans": [ { "ha_policy": "", "info": { "errors": {}, "warnings": {} }, "label": "sj-dev-vm", "obj_type": "launchplan", "objects": [ { "instances": [ { "imagelist": "/oracle/public/oel6", "ip": "10.128.0.10", "label": "sj-oel6-vm", "name": "/mytenant/public/d5baeacd-e97d-4933-b170-fcfad113bf1e", "networking": { "eth0": { "dns": [ "ccd371.mytenant.public.t1700-4186.example.com." ], "seclists": [ "/mytenant/default/default" ], "vethernet": "/oracle/public/default" } }, "shape": "small", "start_time": "2015-11-23T21:15:32Z", "state": "restarting", "uri": null } ] } ], "status": "ready", "status_timestamp": "2015-11-23T21:18:11Z" } ], "relationships": [], "schedule": { "start_time": "2015-11-23T21:15:27Z", "stop_time": "2015-11-24T18:43:13Z" }, "status": "ready", "status_timestamp": "2015-11-23T21:18:11Z", "uri": "http://api/orchestration/mytenant/public/dev-vm" }
このAPIを使用すると、特定のオーケストレーションの情報を更新できます。
stopped
ステータスにある場合、名前以外のオーケストレーションのいずれの部分も更新できます。 オーケストレーションがready
ステータスの場合、オーケストレーションの既存のoplanのha_policy
およびlabel
を更新できます。 oplanを追加および削除することもできます。 追加されたoplanはstarted
になり、削除されたoplanはstopped
になります。
メソッド
PUT
RESTリソース
/orchestration/name
URI
https://api_endpoint/orchestration/name
URIパラメータ
パラメータ | 説明 |
---|---|
name | オーケストレーションの一意の階層名。 たとえば、/mytenant/public/myorch です |
リクエスト本文のパラメータ
JSON形式のオーケストレーション・パラメータを更新できます。 オーケストレーション・パラメータの詳細は、『Oracle Compute Cloud Serviceの使用』のオーケストレーション・テンプレートに関する項を参照してください。URIの例
https://api.oc.example.com/orchestration/mytenant/public/ac-control-vms
リクエスト本文の例
{ "relationships": [], "status": "ready", "account": "/mytenant/default", "description": "", "schedule": { "start_time": "2015-07-27T09:02:27Z", "stop_time": null }, "uri": "https://api.oc.example.com/orchestration/mytenant/public/ac-control-vms", "oplans": [{ "status": "ready", "info": {"errors": {}, "warnings": {}}, "obj_type": "launchplan", "ha_policy": "active", "label": "ac-control-vms", "objects": [{"relationships": [{"instances": ["ac-control-vm1", "ac-control-vm2"], .........}], "status_timestamp": "2015-09-17T22:54:14Z" }], "info": {"errors": {}, "warnings": {}}, "status_timestamp": "2015-09-17T22:54:14Z", "name": "/mytenant/public/ac-control-vms" }
レスポンス本文の例
{ "relationships": [], "status": "ready", "account": "/mytenant/default", "description": "", "schedule": { "start_time": "2015-07-27T09:02:27Z", "stop_time": null }, "uri": "https://api.oc.example.com/orchestration/mytenant/public/ac-control-vms", "oplans": [{ "status": "ready", "info": {"errors": {}, "warnings": {}}, "obj_type": "launchplan", "ha_policy": "active", "label": "ac-control-vms", "objects": [{"relationships": [{"instances": ["ac-control-vm1", "ac-control-vm2"], .........}], "status_timestamp": "2015-09-17T22:54:14Z" }], "info": {"errors": {}, "warnings": {}}, "status_timestamp": "2015-09-17T22:54:14Z", "name": "/mytenant/public/ac-control-vms" }
このAPIを使用すると、特定のコンテナまたはサブコンテナ内のオーケストレーションを検出できます。
注意:
検出APIコールは、指定されたコンテナ内のオブジェクトの名前を表示しますが、オブジェクトの詳細は表示しません。 オブジェクトの名前をリストするには、Accept
ヘッダーをapplication/oracle-compute-v3+directory+json
に設定します。 その他の目的では、Accept
ヘッダーをapplication/oracle-compute-v3+json
に設定する必要があります。 メソッド
GET
RESTリソース
/orchestration/container/
URI
https://api_endpoint/orchestration/container/
URIパラメータ
パラメータ | 説明 |
---|---|
container | オーケストレーションの階層名前空間 |
URIの例
https://api.oc.example.com/orchestration/mytenant/public
レスポンス本文の例
{ "result": [ "/mytenant/public/el-control-vms", "/mytenant/public/el-db-vms", "/mytenant/public/scae09-sdi-sdivm-el1-4-storagevolume-app", "/mytenant/public/scae09-sdi-sdivm-el1-5-storagevolume-ops", "/mytenant/public/scae09-sdi-sdivm-el1-6-storagevolume-data", "/mytenant/public/scae09-sdi-sdivm-el1-8-instance" ] }
このAPIを使用すると、特定のオーケストレーションの詳細を取得できます。
メソッド
GET
RESTリソース
/orchestration/name
URI
https://api_endpoint/orchestration/name
URIパラメータ
パラメータ | 説明 |
---|---|
name | オーケストレーションの一意の階層名。 たとえば、/mytenant/public/myorch です |
URIの例
https://api.oc.example.com/orchestration/mytenant/public/el-db-vms
レスポンス本文の例
{ "relationships": [], "status": "ready", "account": "/mytenant/default", "description": "", "schedule": {"start_time": "2015-07-27T09:05:50Z", "stop_time": null}, "uri": "https://api/orchestration/mytenant/public/el-db-vms", "oplans": [ {"status": "ready", "info": {"errors": {}, "warnings": {}}, "obj_type": "launchplan", "ha_policy": "active",.....}], "status_timestamp": "2015-09-06T21:11:39Z"}], "info": {"errors": {}, "warnings": {}}, "status_timestamp": "2015-09-06T21:11:39Z", "name": "/mytenant/public/el-db-vms" }
このAPIを使用すると、特定のコンテナ内のオーケストレーションの詳細を取得できます。 GET
メソッドを使用して、POST
、PUT
およびDELETE
操作の結果を検証できます。
メソッド
GET
RESTリソース
/orchestration/container/
URI
https://api_endpoint/orchestration/container?status=statusValue
URIパラメータ
パラメータ | 説明 |
---|---|
container | オーケストレーションの階層名前空間 |
status=statusValue | (オプション)オーケストレーションの現在のステータス。 次のステータス・オプションがサポートされています。
このパラメータが指定されると、オーケストレーション出力リストがフィルタ処理されて、ステータスに分けられます。 |
URIの例
https://api.oc.example.com/orchestration/mytenant/public
レスポンス本文の例
{ "result": [ { "relationships": [], "status": "ready", "account": "/mytenant/default", "description": "", "schedule": {"start_time": "2015-10-23T09:58:52Z", "stop_time": null}, "uri": "https://api/orchestration/mytenant/public/mytenantdb", "oplans": [{ .....}] "status_timestamp": "2015-10-23T10:01:02Z"}], "info": {"errors": {}, "warnings": {}}, "status_timestamp": "2015-10-23T10:01:02Z", "name": "/mytenant/public/db" } { "relationships": [], "status": "ready", "account": "/mytenant/default", "description": "", "schedule": {"start_time": "2015-10-24T00:43:10Z", "stop_time": null}, "uri": "https://api/orchestration/mytenant/public/mytenantgrill", "oplans": [{.....}], "status_timestamp": "2015-10-24T00:46:31Z"}], "info": {"errors": {}, "warnings": {}}, "status_timestamp": "2015-10-24T00:46:31Z", "name": "/mytenant/public/mytenantgrill" } ]