55
1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の二次配布(配布・転載・提供等)は、ご遠慮ください。

NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

1

NTT Communications

Cloudⁿ

Provisioning 操作 マニュアル

Ver.1.1

本冊子掲載の内容の二次配布(配布・転載・提供等)は、ご遠慮ください。

Page 2: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

2

版数 編集日 変更内容

Ver.1.0 2013/4/9 初版作成

Ver.1.0 2013/6/24 4.1 テンプレート詳細について追記

Page 3: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

3

1 はじめに P4~ 1) サービスの概要 2) 事前に準備いただくもの

2 Provisioningサービスの利用準備をする P6~ 1) Provisioningコンソールを起動する 2) テンプレートを準備する

3 Provisioningサービスを利用する P9~ 1) スタックを作成する 2) スタックを更新する 3) スタックを削除する

4 Provisioningテンプレート詳細 P18~ 1) テンプレートプロパティ詳細 2) テンプレートサンプル

目次

Page 4: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

1-1) サービスの概要

本マニュアルでは、 Cloudn Provisioningのご利用方法に関してご説明いたします。

Cloudn Provisioningは、 Cloudn関連の各種リソースを一括して作成・更新し、システム管理を容易にするサービスです。作成するリソースの集合を「スタック」と呼び、スタックを単位とした統一した管理が可能となります。

本スタックを構築するための設計図に相当するものを「テンプレート」と呼び、これをProvisioningに適用することで、任意のリソース群を一括して作成、更新することができます。

Cloudn Provisioningは、AWSにおけるCloudFormationに相当する機能であり、AWS CloudFormation用に開発したCloudFormationテンプレートを容易にCloud Provisioning用へ変換し利用できます。

主な提供機能は以下の通りです。

以下のすべてのCloudn リソースを、スタックに組み込んだ形で設定が可能です。

• Cloudn Compute

• Cloudn Relational Database

• Cloudn Object Storage

• Cloudn Load Balancing Advance

スタックの構成情報であるテンプレートは、テキストファイル(JSON形式)で記述し、Cloudn Provisioningに適用することで、それらのスタックとして定義されたリソース群を一括して作成、更新を行えます。

• Cloudn DNS

• Cloudn AutoScaling

• Cloudn Monitoring

4

Page 5: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

5

Cloundn Provisioning APIをご利用頂くにあたっては、以下のものをご用意ください。

1-2) 事前に準備いただくもの

Cloundn サービス共通のAPIアクセスキーおよび秘密鍵

Cloundn ポータルにて、RDB API利用に必要な「サービス共通」のAPIアクセスキー、および秘密鍵をご確認下さい。確認方法については、「Cloundn ポータル操作マニュアル」 の「3-3) APIアクセスキー・秘密鍵を管理する」を参照下さい。

Provisioningサービスの利用開始

Cloundn ポータルより、Provisioningサービスの利用を開始して下さい。サービスの利用開始方法については、「Cloundn ポータル操作マニュアル」の「3-1) サービスの利用を開始する」を参照下さい。

Computeサービスの利用開始

Cloundn ポータルより、Computeサービスの利用を開始して下さい。(Computeを開始していない場合、Provisioningによるサービス作成ができません。)

また、それ以外にもProvisioningにて作成対象とされる機能(AutoScaling、DNS、Compute、RDB、ObjectStorage、LBA)については、Cloudnポータル上にて利用開始下さい。

サービスの利用開始方法については、「Cloundn ポータル操作マニュアル」の「3-1) サービス

の利用を開始する」を参照下さい。

Page 6: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

6

Provisioning コンソールを起動します。

新しいウィンドウでProvisioning コンソールが起動します。

2-1) Provisioningコンソールを起動する

Cloudⁿポータルにログインし、ご利用いただいているリージョンの、利用開始した「Provisioning」アイコンへのマウスオーバーにて表示される、「コンソールへ」をクリックします。

1

2 クリック

Page 7: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

スタックを作成する元となるテンプレートを準備します。テンプレートは、任意のテキストエディタを用いて、JSON形式のテキストファイルを作成します。

2-2) テンプレートを準備する

7

本マニュアルでは、以下のようなスタックを想定したテンプレートを例として用いることとします。

【想定するスタック】

このとき、テンプレートは以下のように作成されます。

【テンプレート例】

ファイル名:test.template

1

「Computeリソースとして、TCPポート22番の受信ルールが登録されたセキュリティグループと、そのセキュリティグループを適用した仮想サーバーを構築するスタック」

{

"AWSTemplateFormatVersion" : "2010-09-09",

"Description" : "Provisioning Test",

"Resources" : {

"InstanceA" : {

"Type" : "Cloudn::Compute::Instance",

"Properties" : {

"AvailabilityZone" : "jp-e1a",

"ImageId" : "8fdc326b-6e82-49a3-af22-69b0e3ab0cd7",

"InstanceType" : "m1.small",

"SecurityGroups" : [{ "Ref" : "SecurityGroupA"}]

}

},

"SecurityGroupA" : {

"Type" : "Cloudn::Compute::SecurityGroup",

"Properties" : {

"GroupDescription" : "Enable SSH access via port 22"

}

},

"SecurityGroupIngressA" : {

"Type" : "Cloudn::Compute::SecurityGroupIngress",

"Properties" : {

"GroupName" : { "Ref" : "SecurityGroupA" },

"CidrIp" : "0.0.0.0/0",

"IpProtocol" : "tcp",

"FromPort" : "22",

"ToPort" : "22"

}

}

}

}

Page 8: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

本テンプレートでは、セキュリティグループと仮想サーバーの作成に、以下のリソース名、プロパティを用いています。

2-2) テンプレートを準備する

8

プロパティ (Properties) 値 GroupName { "Ref" : "SecurityGroupA" } IpProtocol tcp FromPort 22 ToPort 22 CidrIp 0.0.0.0/0

【セキュリティグループ受信規則】

リソース名(Type)・・・" Cloudn::Compute ::SecurityGroupIngress "

プロパティ (Properties) 値 AvailabilityZone jp-e1a ImageId 8fdc326b-6e82-49a3-af22-69b0e3ab0cd InstanceType m1.small SecurityGroups [ {"Ref" : "SecurityGroupA"}]

【仮想サーバー】 リソース名(Type)・・"Cloudn::Compute ::Instance"

仮想サーバーを作成する場合、ImageIdには、作成するテンプレートのIDを指定下さい。東日本リージョンで提供している主なオフィシャルテンプレートのIDは以下の通りです。

CentOS 6.3 64bit 8fdc326b-6e82-49a3-af22-69b0e3ab0cd7 Ubuntu Server v12.10 64bit 238a2cd3-724a-47f3-8ee5-b445bb83e350 Windows Server 2008 R2 3cdec611-7f6c-4de5-a605-97358eba6476

プロパティ (Properties) 値 GroupDescription Enable SSH access via port 22

【セキュリティグループ】

リソース名(Type)・・・" Cloudn::Compute ::SecurityGroup"

その他のテンプレートの詳細については、「4. Provisioningテンプレート詳細」をご参照下さい。

Page 9: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

事前作成したテンプレートから、Provisioning コンソールよりスタックを作成します。

3-1) スタックを作成する

9

Provisioningコンソールの「Create New Stack」をクリックします。

1

クリック

「Stack Name」に、任意のスタック名を入力し、「Upload a Template File」が選択された状態で、「参照」ボタンより、事前に作成したテンプレートのテキストファイルを指定し、「Continue」をクリックします。

クリック

Page 10: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

スタック作成情報の確認画面が表示されますので、「Continue」をクリックします。

10

Mail Addressにメールアドレスを設定した場合、作成時に以下のような通知メールが送信されます。

「Creation Timeout」には、作成時のタイムアウト時間を、「Rollback on Failure」には、作成失敗時の動作(何もしない、ロールバックする、削除する)を指定することが可能です。

クリック

3-1) スタックを作成する

Page 11: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

11

作成受け付け画面が表示されますので、「Back to StackList」にてメイン画面に戻ります。(「Status」が「CREATE_COMPLETE」であれば、更新が完了しています。)

3-1) スタックを作成する

クリック

スタック作成対象となる機能(AutoScaling、DNS、Compute、RDB、ObjectStorage、LBA)がCloud

nポータル上で利用開始になっていない場合、エラーとなります。事前に作

成対象のサービスの開始をお願いします。

スタックにて仮想サーバーを作成した場合、当該仮想サーバーの初期パスワードの確認ができません。お手数ですが、Computeコンソール上にて、パスワードの再発行の実施をお願いします。(「Compute操作マニュアル」の「3-13) パスワードをリセットする」を参照)

Page 12: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

12

東日本リージョンのComputeコンソールにて、作成された仮想サーバー、および適用されたセキュリティグループが確認できます。

5

3-1) スタックを作成する

Page 13: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

作成済みのスタックを更新します。例として、先に作成したスタックを、次のようなスタックに更新するものとします。

【スタック更新内容】

このとき、テンプレートは以下のように修正されます。

【テンプレート例】

ファイル名:testUpdate.template

3-2) スタックを更新する

13

「Computeリソースとして、仮想サーバーのプランを “m1.small”から “m1.medium”へ変更する」( “InstanceType”を“m1.medium”へ変更)

{

"AWSTemplateFormatVersion" : "2010-09-09",

"Description" : "Provisioning Test",

"Resources" : {

"InstanceA" : {

"Type" : "Cloudn::Compute::Instance",

"Properties" : {

"AvailabilityZone" : "jp-e1a",

"ImageId" : "8fdc326b-6e82-49a3-af22-69b0e3ab0cd7",

"InstanceType" : "m1.medium",

"SecurityGroups" : [{ "Ref" : "SecurityGroupA"}]

}

},

"SecurityGroupA" : {

"Type" : "Cloudn::Compute::SecurityGroup",

"Properties" : {

"GroupDescription" : "Enable SSH access via port 22"

}

},

"SecurityGroupIngressA" : {

"Type" : "Cloudn::Compute::SecurityGroupIngress",

"Properties" : {

"GroupName" : { "Ref" : "SecurityGroupA" },

"CidrIp" : "0.0.0.0/0",

"IpProtocol" : "tcp",

"FromPort" : "22",

"ToPort" : "22"

}

}

}

}

Page 14: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

修正したテンプレートをもとに、作成済みのスタックを更新します。

3-2) スタックを更新する

14

Provisioningコンソールの「Update Stack」をクリックします。

1

クリック

「Upload a Template File」が選択された状態で、「参照」ボタンより、更新用に修正したテンプレートのテキストファイルを指定し、「Continue」をクリックします。

クリック

Page 15: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

作成受け付け画面が表示されますので、「Back to StackList」にてメイン画面に戻ります。(「Status」が「UPDATE_COMPLETE」であれば、更新が完了しています。)

4

15

クリック

3-2) スタックを更新する

スタック作成情報の確認画面が表示されますので、「Continue」をクリックします。

3

クリック

Page 16: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

16

3-2) スタックを更新する

スタック作成情報の確認画面が表示されますので、「Continue」をクリックします。

5

Page 17: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

クリック

作成されたスタックを削除します。

3-3) スタックを削除する

17

Provisioningコンソールの「Delete Stack」をクリックします。

1

クリック

「Yes,Delete」をクリックすると、削除処理が開始され、メイン画面に戻ります。(「Status」が「DELETE_COMPLETE」となれば、削除が完了しています。)

Page 18: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

4-1) テンプレートプロパティ詳細

18

Cloudnサービス名 リソース名

Compute

Volume

VolumeAttachment

Instance

SecurityGroup

SecurityGroupIngress

RDB DBInstance

LBA LoadBalancer

ObjectStorage Bucket

DNS RecordSet

RecordSetGroup

AutoScale

AutoScalingGroup

LaunchConfiguration

ScalingPolicy

本サービスにて利用するテンプレートプロパティ詳細について記載します。

まず、Provisioningサービスが対応する、Cloudn各サービスとリソース名は以下の通りです。

Page 19: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

4-1) テンプレートプロパティ詳細

サービス名 リソース名

Compute Cloudn::Compute::Volume

Computeサービスにおいて利用するテンプレートプロパティは、以下の通りです。

プロパティ 必須項目

1 AvailabilityZone ○

2 SnapshotId ○

{

"AvailabilityZone" : String,

"SnapshotId" : String,

}

AvailabilityZone

ボリュームを作成するAvailability Zoneを指定する

Required:Yes.

Type: String.

SnapshotId

新規ボリュームとして使用するスナップショットのIDを指定する

Required: Yes.

Type: String.

Property

Syntax

Page 20: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

4-1) テンプレートプロパティ詳細

20

サービス名 リソース名

Compute Cloudn::Compute::VolumeAttachment

プロパティ 必須項目

1 Device ○

2 InstanceId ○

3 VolumeId ○

{

"Device" : String,

"InstanceId" : String,

"VolumeId" : String

}

Device

Volumeをアタッチするデバイスを指定する (e.g., /dev/sdh, or xvdh)

Required:Yes

Type: String

InstanceId

新規ボリュームをアタッチするインスタンスIDを指定する

Required:Yes

Type: String

VolumeId

アタッチするボリュームIDを指定する

Required:Yes

Type: String

Property

Syntax

Page 21: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

4-1) テンプレートプロパティ詳細

21

サービス名 リソース名

Compute Cloudn::Compute::Instance

プロパティ 必須項目

1 AvailabilityZone

2 ImageId ○

3 InstanceType ○

4 SecurityGroups

{

"AvailabilityZone" : String,

"ImageId" : String,

"InstanceType" : String,

"SecurityGroups" : [ String, ... ],

}

Syntax

Page 22: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

4-1) テンプレートプロパティ詳細

22

サービス名 リソース名

Compute Cloudn::Compute::Instance

AvailabilityZone

インスタンスを作成するAvailabilityZoneを指定する。

必須項目: No. (指定しなかった場合、自動的に指定される) Type: String.

Update requires:replacement.

ImageId

テンプレートIDを指定する

Required:Yes.

Type: String.

Update requires:replacement.

InstanceType

インスタンスタイプを指定する

例)“m1.xlarge”や“m1.small”等

Required: Yes.

Type: String.

Update requires:replacement.

SecurityGroups

セキュリティグループ名を指定する。

複数のセキュリティグループを指定することができる。

Required: No.

Type: A list of strings.

Update requires:replacement.

Property

Page 23: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

4-1) テンプレートプロパティ詳細

23

サービス名 リソース名

Compute Cloudn::Compute::SecurityGroup

プロパティ 必須項目

1 GroupDescription ○

2 SecurityGroupIngress

InstanceとSecurityGroupを同一のスタックとして作成した場合、スタック削除時には必ずSecurityGroup削除に失敗し、”DELETE_FAILED”となります。 これは、Instance削除が完了しても、Computeコンソール上では該当のInstanceが”Destroyed”という状態が保存されているため、SecurityGroupを削除しようとしてもInstanceにて使用中となり削除できないためです。 該当のInstanceが完全に削除されればProvisionで再度DeleteStackを行うことで、SecurityGroupを削除することができ、” DELETE_COMPLETE”状態に遷移します。

{

"GroupDescription" : String,

"SecurityGroupIngress" : [ Security Group Rule, ... ],

}

GroupDescription

セキュリティーグループの説明を記入する

Type: String

Required:Yes

Update requires:replacement

SecurityGroupIngress

インスタンスへ適用するルールを追加する

Type:Security Group Rule (次ページに記載)

Required: No

Update requires: no interruption

Property

Syntax

Page 24: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

4-1) テンプレートプロパティ詳細

24

リソース名

Security Group Rule

プロパティ 必須項目

1 IpProtocol ○

2 CidrIp ○

3 FromPort ○

4 ToPort ○

{ "IpProtocol" : String "CidrIp" : String "FromPort" : Number "ToPort" : Number }

IpProtocol プロトコルを指定する Type: String Required:Yes Update requires: no interruption CidrIp Cidrを指定する Type: String Required: Yes. Update requires: no interruption FromPort TCP/UDPの場合、開始ポート番号を指定する ICMPの場合、ICMPタイプを指定する(-1がワイルドカードとなる) Type: String Required:Yes, for ICMP and any protocol that uses ports. Update requires: no interruption ToPort TCP/UDPの場合、終了ポート番号を指定する ICMPの場合、ICMPコードを指定する(-1がワイルドカードとなる) Type: String Required:Yes, for ICMP and any protocol that uses ports. Update requires: no interruption

Property

Syntax

Page 25: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

25

4-1) テンプレートプロパティ詳細

サービス名 リソース名

Compute Cloudn::Compute::SecurityGroupIngress

プロパティ 必須項目

1 GroupName △

2 GroupId △

3 IpProtocol ○

4 CidrIp ○

5 FromPort ○

6 ToPort ○

{

"GroupName" : String

"GroupId" : String

"IpProtocol" : String

"CidrIp" : String

"FromPort" : Number

"ToPort" : Number

}

Syntax

Page 26: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

26

4-1) テンプレートプロパティ詳細

サービス名 リソース名

Compute Cloudn::Compute::SecurityGroupIngress

GroupName

ルール追加を行うセキュリティグループ名を指定する

Type: String

Required: Can be used instead of GroupId for security groups.

Update requires: no interruption

GroupId

ルール追加を行うセキュリティグループIDを指定する

Type: String

Required:Can be used instead of GroupName for security groups

Update requires: no interruption

IpProtocol

プロトコルを指定する

Type: String

Required:Yes

Update requires: no interruption

CidrIp

Cidrを指定する

Type: String

Required: Yes

Update requires: no interruption

FromPort

TCP/UDPの場合、開始ポート番号を指定する

ICMPの場合、ICMPタイプを指定する(-1がワイルドカードとなる) Type: String

Required:Yes, for ICMP and any protocol that uses ports.

Update requires: no interruption

ToPort

TCP/UDPの場合、終了ポート番号を指定する

ICMPの場合、ICMPコードを指定する(-1がワイルドカードとなる) Type: String

Required:Yes, for ICMP and any protocol that uses ports.

Update requires: no interruption

Property

Page 27: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

27

4-1) テンプレートプロパティ詳細

サービス名 リソース名

LBA Cloudn::LBA::LoadBalancer

プロパティ 必須項目

1 AvailabilityZones ○

2 HealthCheck

3 Instances

4 Listeners ○

{

"AvailabilityZones" : [ String, ... ],

"HealthCheck" : HealthCheck,

"Instances" : [ String, ... ],

"Listeners" : [ Listener, ... ]

}

AvailabilityZones

ロードバランサーを作成するAvailability Zoneを指定する

Required: No.

Type: A list of strings.

HealthCheck

ヘルスチェックを指定する

Required: No.

Type:LBA HealthCheck Type.

Instances

ロードバランサーに紐付けるインスタンスのインスタンスIDを指定する

Required: No.

Type: A list of strings.

Listeners

ロードバランサーのリスナーを指定します

Required:Yes.

Type: A list of LBA Listener Property Type objects.

LBAサービスにおいて利用するテンプレートプロパティは、以下の通りです。

Property

Syntax

Page 28: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

4-1) テンプレートプロパティ詳細

28

リソース名

LBA HealthCheck Type

プロパティ 必須項目

1 HealthyThreshold ○

2 Interval ○

3 Target ○

4 Timeout ○

5 UnhealthyThreshold ○

{ "HealthyThreshold" : String, "Interval" : String, "Target" : String, "Timeout" : String, "UnhealthyThreshold" : String }

HealthyThreshold インスタンスを正常状態に移行するためのしきい値を指定します Required:Yes Type: String Interval インスタンスのヘルスチェック間隔(秒)を指定してください。 Required:Yes Type: String Target インスタンスを指定します プロトコルはTCPもしくはHTTPのどちらかを指定してください ポートの範囲は1~65535です Required:Yes Type: String Timeout 時間(秒)を指定します 上述のIntervalより小さい値を指定してください Required:Yes Type: String UnhealthyThreshold インスタンスを異常状態に移行するためのしきい値を指定します Required:Yes Type: String

Property

Syntax

Page 29: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

4-1) テンプレートプロパティ詳細

29

リソース名

LBA Listener Property Type

プロパティ 必須項目

1 InstancePort ○

2 InstanceProtocol

3 LoadBalancerPort ○

5 Protocol ○

{

"InstancePort" : String,

"InstanceProtocol" : String,

"LoadBalancerPort" : String,

"Protocol" : String

}

InstancePort

インスタンスが使用するポートを指定します

Required:Yes.

Type: String.

InstanceProtocol

インスタンスが使用するプロトコルを指定します

Required: No.

Type: String.

LoadBalancerPort

ロードバランサーのポートを指定します

Required:Yes.

Type: String.

Protocol

ロードバランサーのプロトコルを指定します

Required:Yes.

Type: String.

Property

Syntax

Page 30: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

4-1) テンプレートプロパティ詳細

30

サービス名 リソース名

ObjectStorage Cloudn::ObjectStorage::Bucket

プロパティ 必須項目

1 AccessControl

{

"AccessControl" : String,

}

AccessControl

作成するバケットのアクセス権限を指定します

Required: No.The default value is Private.

Type: String.

Valid values: Private | PublicRead | PublicReadWrite | AuthenticatedRead

|BucketOwnerRead | BucketOwnerFullControl

ObjectStorageサービスにおいて利用するテンプレートプロパティは、以下の通りです。

Property

Syntax

Page 31: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

31

4-1) テンプレートプロパティ詳細

サービス名 リソース名

DNS Cloudn::DNS::RecordSet

プロパティ 必須項目

1 AliasTarget

2 Comment

3 HostedZoneId △

4 HostedZoneName △

5 Name ○

6 ResourceRecords

7 TTL

8 Type ○

{

"AliasTarget" : AliasTarget,

"Comment" : String,

"HostedZoneId" : String,

"HostedZoneName" : String,

"Name" : String,

"ResourceRecords" : [ String ],

"TTL" : String,

"Type" : String,

}

DNSサービスにおいて利用するテンプレートプロパティは、以下の通りです。

Syntax

Page 32: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

32

4-1) テンプレートプロパティ詳細

サービス名 リソース名

DNS Cloudn::DNS::RecordSet

HostedZoneId 対象のホストゾーンIDを指定します。 Required: Conditional.You must specify either the HostedZoneName or HostedZoneId, but you cannot specify both. Type: String. HostedZoneName 対象のホストゾーン名を指定します。最後にピリオドを記述します。 Required: Conditional.You must specify either the HostedZoneName or HostedZoneId, but you cannot specify both. Type: String. Name 作成するレコード名を指定します。 レコード名はFQDN(完全修飾ドメイン)で記述します。 Required:Yes. Type: String. ResourceRecords 作成するレコードの値(IPアドレス等)をリスト形式で指定してください。 後述するtypeプロパティで指定したレコードタイプに適した形で記述してください。 また、AliasTargetプロパティを使用した場合はResourceRecordsプロパティは使用しません。 Required: Conditional. Required if TTL or SetIdentifier is set. Also, if you set ResourceRecords, you must set TTL or SetIdentifier. Type: A list of strings. TTL TTLを指定します。 TTLプロパティを指定する場合、ResourceRecordsプロパティは必ず指定してください。 Required: No. Type: String. Type レコードタイプを指定してください。 Required:Yes. Type: String. Valid Values: A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT Comment コメントを指定します。 Required: No. Type: String.

Syntax

Page 33: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

33

4-1) テンプレートプロパティ詳細

サービス名 リソース名

DNS Cloudn::DNS::RecordSet

AliasTarget AliasTargetを使用する場合、指定します Required: Conditional. Required if you are creating an alias resource record set. Type:AliasTarget

リソース名

DNS AliasTarget Property Type

プロパティ 必須項目

1 HostedZoneId ○

2 DNSName ○

{

"HostedZoneId" : String

"DNSName" : String

}

Property

HostedZoneId

LBAが登録されているHostedZoneIDを指定します

Required : Yes

Type : String

DNSName

LBAのDNS名を指定します

Required : Yes

Type : String

Property

Property

Syntax

Page 34: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

4-1) テンプレートプロパティ詳細

34

サービス名 リソース名

DNS Cloudn::DNS::RecordSetGroup

プロパティ 必須項目

1 HostedZoneId △

2 HostedZoneName △

3 RecordSets ○

4 Comment

{ "HostedZoneId" : String, "HostedZoneName" : String, "RecordSets" : [ RecordSet1, ... ], "Comment" : String, }

HostedZoneId

対象のホストゾーンIDを指定します。

Required: Conditional:You must specify either the HostedZoneName or HostedZoneId,

but you cannot specify both.

Type: String

HostedZoneName

対象のホストゾーン名を指定します。

Required: Conditional.You must specify either the HostedZoneName or HostedZoneId,

but you cannot specify both.

Type: String

RecordSets

リソースレコードセットをリスト形式で指定します。

Required:Yes

Type: list of Cloudn::DNS::RecordSet

Comment

コメントを指定します。

Required: No

Type: String

Property

Syntax

Page 35: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

35

4-1) テンプレートプロパティ詳細

サービス名 リソース名

Monitoring Cloudn::Monitoring::Alarm

プロパティ 必須項目

1 ActionsEnabled

2 AlarmDescription

3 AlarmActions

4 ComparisonOperator ○

5 Dimensions ○

6 EvaluationPeriods ○

7 MetricName ○

8 Namespace ○

9 OKActions

10 Period ○

11 Statistic ○

12 Threshold ○

{ "ActionsEnabled" : String, "AlarmDescription" : [ String... ], "AlarmActions" : String, "ComparisonOperator" : String, "Dimensions" : [ Metric Dimension type... ], "EvaluationPeriods" : 固定値, "MetricName" : String, "Namespace" : String, "OKActions" : [String...] "Period" : 固定値, "Statistic" : 固定値, "Threshold" : String }

Monitoringサービスにおいて利用するテンプレートプロパティは、以下の通りです。

Syntax

Page 36: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

36

4-1) テンプレートプロパティ詳細

サービス名 リソース名

Monitoring Cloudn::Monitoring::Alarm

Property ActionsEnabled アラームの状態が変化した際の挙動を指定します。 Either true or false. Required: No Type: String AlarmActions アラーム実行時のアクションをリスト形式で指定します。 各アクションはARNで指定します。 Required: No Type: List of String AlarmDescription アラームの説明を指定します。 Required: No Type: String ComparisonOperator しきい値との比較方法を指定する。 Valid Values:GreaterThanOrEqualToThreshold| GreaterThanThreshold | LessThanThreshold| LessThanOrEqualToThreshold Required: Yes Type: String MetricName メトリックの名前を指定する Required: Yes Type: String Namespace メトリックのネームスペース(Cloudn/Compute等)を指定する Required: Yes Type: String OKActions アラームがOKの状態に遷移した場合のアクションを指定する 各アクションはARNで指定します Required: No Type: List of String Threshold しきい値を指定する Required: Yes Type: String

Property

Page 37: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

37

4-1) テンプレートプロパティ詳細

サービス名 リソース名

Monitoring Cloudn::Monitoring::Alarm

Dimensions

メトリックに紐付けられたディメンション

The dimensions for the alarm's associated metric

Required: No

Type: List of Metric Dimension type

Metric Dimension Type

メトリックディメンションはCloudn::Monitoring::Alarmが記述されたプロパティです。

name/valueのペアでMonitoringのメトリックを紐付けることができます。

最大10のディメンションをメトリックに紐付けることができます。

{

"Name" : String,

"Value" : String

}

Name

ディメンションの名前を指定します

Required:Yes.

Type: String.

Value

ディメンションの値を指定します

Required:Yes.

Type: String.

Property

Page 38: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

38

4-1) テンプレートプロパティ詳細

サービス名 リソース名

Monitoring Cloudn::Monitoring::Alarm

EvaluationPeriods

この値は何を指定しても反映されないが、Alarmを受け付ける際に必要。固定値

Required: Yes

Type: String

Period

この値は何を指定しても反映されないが、Alarmを受け付ける際に必要。固定値

Required: Yes

Type: String

Statistic

この値は何を指定しても反映されないが、Alarmを受け付ける際に必要。固定値

Required: Yes

Type: String

Monitoring:Alarmを設定する場合、以下の3つのパラメータが必須となります。 “EvaluationPeriods” “Period” “Statistic”

これらの値は何を指定しても反映されませんが、Monitoring:Alarmを受け付ける際に必要となるパラメータとなります。

Property

Page 39: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

39

4-1) テンプレートプロパティ詳細

サービス名 リソース名

RDB Cloudn::RDB::DBInstance

プロパティ 必須項目

1 AllocatedStorage ○

2 AvailabilityZone

3 BackupRetentionPeriod

4 DBInstanceClass ○

5 DBName ○

6 Engine ○

7 EngineVersion

8 LicenseModel

9 MasterUsername ○

10 MasterUserPassword ○

11 MultiAZ

12 Port

13 PreferredBackupWindow

14 PreferredMaintenanceWindow

RDBサービスにおいて利用するテンプレートプロパティは、以下の通りです。

Page 40: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

40

4-1) テンプレートプロパティ詳細

サービス名 リソース名

RDB Cloudn::RDB::DBInstance

{

"AllocatedStorage" : String,

"AvailabilityZone" : String,

"BackupRetentionPeriod" : String,

"DBInstanceClass" : String,

"DBName" : String,

"Engine" : String,

"EngineVersion" : String,

"LicenseModel" : String,

"MasterUsername" : String,

"MasterUserPassword" : String,

"MultiAZ" : Boolean,

"Port" : String,

"PreferredBackupWindow" : String,

"PreferredMaintenanceWindow" : String

}

Syntax

Page 41: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

41

4-1) テンプレートプロパティ詳細

サービス名 リソース名

RDB Cloudn::RDB::DBInstance

AllocatedStorage

データベース·インスタンスに割り当てられるストレージの容量(GB)を指定します

Valid Values : 30 | 100

Required:Yes.

Type: String.

Update requires: no interruption

AvailabilityZone

データベースのinstanceが作成されるZoneを指定します

Required: No.

Type: String.

Update requires:replacement

BackupRetentionPeriod

自動Back-upファイルを何日間分保存するかを指定します

0を指定すると自動Back-upを無効化します。

Required: No.

Type: String.

Update requires: no interruption

DBInstanceClass

作成するDBInstanceのCPU/Memoryサイズを指定します

Valid Values : db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge

Required:Yes.

Type: String.

Update requires: no interruption

DBName

作成するデータベースの名前を指定します

Required: No.

Type: String.

Update requires:replacement

Property

Page 42: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

42

4-1) テンプレートプロパティ詳細

サービス名 リソース名

RDB Cloudn::RDB::DBInstance

Engine 作成されるinstanceで使用するデータベースエンジンの名前を指定します Valid Values : MySQL Required:Yes. Type: String. Update requires:replacement EngineVersion 利用するデータベースエンジンのバージョンを指定します Valid Values : 5.5.28 Required: No. Type: String. Update requires: some interruptions LicenseModel 作成されるDBInstanceのLicenseモデル情報を指定します Valid values : general-public-license Required: No. Type: String. Update requires:replacement MasterUsername データベースへアクセスする為のユーザ名を指定します Required:Yes. Type: String. Update requires:replacement MasterUserPassword データベースへアクセスするためのパスワードを指定します Required:Yes. Type: String. Update requires: no interruption MultiAZ DBInstanceをMulti-AZの構成で構築するかを指定します You cannot set the AvailabilityZone parameter if the MultiAZ parameter is set to true. Required: No. Type: Boolean. Update requires: no interruption

Property

Page 43: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

43

4-1) テンプレートプロパティ詳細

サービス名 リソース名

RDB Cloudn::RDB::DBInstance

Port

作成したデータベースへのコネクションを受け付けるPort番号を指定します

Required: No.

Type: String.

Update requires:replacement

PreferredBackupWindow

自動バックアップを実施する時間を指定します Default : システムがランダムに指定する240分間です

Constraints : 指定書式はhh24:mi-hh24:miです

時刻指定はUTCです

PreferredMaintenanceWindowと同一時間は指定できません

指定可能期間は240分固定です

開始時間に02:00から11:00(UTC)は指定できません

Required: No.

Type: String.

Update requires: no interruption

PreferredMaintenanceWindow

システムメンテナンスの発生しうる時間帯を、週時で指定します

指定時間帯はUTCです

本時間帯に、アップデート等のメンテナンス作業を実施します

Format : ddd:hh24:mi-ddd:hh24:mi

Default : システムがランダムに設定する300分間

Valid Days : Mon、Tue、Wed、Fri、Sat、Sun

Constraints : 指定可能期間は300分固定です

Required: No.

Type: String.

Update requires: no interruption

Property

Page 44: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

44

4-1) テンプレートプロパティ詳細

サービス名 リソース名

AutoScaling Cloudn::AutoScale::AutoScalingGroup

プロパティ 必須項目

1 AvailabilityZones ○

2 Cooldown

3 DesiredCapacity

4 HealthCheckGracePeriod

5 HealthCheckType

6 LaunchConfigurationName ○

7 LoadBalancerNames

8 MaxSize ○

9 MinSize ○

{

"AvailabilityZones" : [ String, ... ],

"Cooldown" : String,

"DesiredCapacity" : String,

"HealthCheckGracePeriod" : Integer,

"HealthCheckType" : String,

"LaunchConfigurationName" : String,

"LoadBalancerNames : [ String, ... ],

"MaxSize" : String,

"MinSize" : String

}

AutoScalingサービスにおいて利用するテンプレートプロパティは、以下の通りです。

Syntax

Page 45: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

45

4-1) テンプレートプロパティ詳細

サービス名 リソース名

AutoScaling Cloudn::AutoScale::AutoScalingGroup

AvailabilityZones

AutoScalingGroupを設定するAvailabilityZoneを指定します

Required:Yes.

Type: A list of strings.

Cooldown

スケールを開始するまでの猶予時間を指定します

Required: No.

Type: String.

DesiredCapacity

AutoScalingGroupを作成したときに作成するインスタンス数を指定します

Required: No.

Type: String.

HealthCheckGracePeriod

新しいComputeInstanceが起動してからLBAがヘルスチェックを開始するまでの時間(秒)を指定します

Required: No.

Type: Integer

HealthCheckType

ComputeとLBAのどちらでHealthCheckするかを指定します

Valid value : “Compute“, "LBA"

Required: No.

Type: String.

LaunchConfigurationName

Cloudn::AutoScaling::LaunchConfigurationの名前を指定します Required:Yes.

Type: String.

Update requires:replacement

Property

Page 46: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

46

4-1) テンプレートプロパティ詳細

サービス名 リソース名

AutoScaling Cloudn::AutoScale::AutoScalingGroup

LoadBalancerNames

LBAの名前を指定します

Required: No.

Type: List of Strings

Update requires:replacement

MaxSize

生成されるインスタンスの最大数を指定します

Required:Yes.

Type: String.

MinSize

生成されるインスタンスの最小数を指定します

Required:Yes.

Type: String.

Property

AutoScaling::ScalingPolicyはProvisioningより作成することはできますが、削除することはできません。これは、 ScalingPolicyの機能として自動的にInstanceが生成されてしまうためです。 AutoScalingGroupは、紐づいているInstanceがいる限りScalingPolicyを削除することができません。そのため、AutoScalingのAPIを使用してScalingPolicyを強制的に削除する必要があります。 手動でScalingPolicyを削除したのち、StackDeleteを行うことでスタックを削除することができます。

Page 47: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

47

4-1) テンプレートプロパティ詳細

サービス名 リソース名

AutoScaling Cloudn::AutoScale::LaunchConfiguration

プロパティ 必須項目

1 BlockDeviceMappings ○

2 ImageId

3 InstanceMonitoring

4 InstanceType

5 SecurityGroups

{

"BlockDeviceMappings" : [ BlockDeviceMapping, ... ],

"ImageId" : String,

"InstanceMonitoring" : Boolean,

"InstanceType" : String,

"SecurityGroups" : [ SecurityGroup, ... ]

}

Syntax

AutoScaling::ScalingPolicyはProvisioningより作成することはできますが、削除することはできません。これは、 ScalingPolicyの機能として自動的にInstanceが生成されてしまうためです。 AutoScalingGroupは、紐づいているInstanceがいる限りScalingPolicyを削除することができません。そのため、AutoScalingのAPIを使用してScalingPolicyを強制的に削除する必要があります。 手動でScalingPolicyを削除したのち、StackDeleteを行うことでスタックを削除することができます。

Page 48: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

48

4-1) テンプレートプロパティ詳細

サービス名 リソース名

AutoScaling Cloudn::AutoScale::LaunchConfiguration

BlockDeviceMappings

デバイス名を指定します

Required: No.

Type: A list of BlockDeviceMappings.

ImageId

テンプレートIDを指定します

Required:Yes.

Type: String.

InstanceMonitoring

インスタンスの監視を指定します

デフォルトでは監視を行う設定になっています

Required: No. Default value is "true".

Type: Boolean.

InstanceType

インスタンスのタイプを指定します

Required:Yes.

Type: String.

SecurityGroups

セキュリティグループをリスト形式で指定します

Required: No.

Type: A list of EC2 security groups.

Property

Page 49: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

4-1) テンプレートプロパティ詳細

49

リソース名

Block Device Mapping Property Type

プロパティ 必須項目

1 DeviceName ○

{

"DeviceName" : String

}

DeviceName

デバイス名を指定します

Required:Yes.

Type: String.

Property

Syntax

Page 50: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

50

4-1) テンプレートプロパティ詳細

サービス名 リソース名

AutoScaling Cloudn::Compute::ScalingPolicy

プロパティ 必須項目

1 AdjustmentType ○

2 AutoScalingGroupName ○

3 Cooldown

4 ScalingAdjustment ○

{

"AdjustmentType" : String,

"AutoScalingGroupName" : String,

"Cooldown" : String,

"ScalingAdjustment" : String

}

Syntax

Page 51: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

51

4-1) テンプレートプロパティ詳細

サービス名 リソース名

AutoScaling Cloudn::Compute::ScalingPolicy

AdjustmentType

下記の条件から選択し、指定します

Valid values : ChangeInCapacity, ExactCapacity, PercentChangeInCapacity.

Required:Yes

Type: String

AutoScalingGroupName

Cloudn::Compute::AutoScalingGroup名を指定します

Required:Yes

Type: String

Cooldown

次のスケールまでの時間(秒)を指定します

Required: No

Type: String

ScalingAdjustment

AdjustmentTypeで指定した条件に一致したとき、スケールする数を指定します

Required:Yes

Type: String

Property

AutoScaling::ScalingPolicyはProvisioningより作成することはできますが、削除することはできません。これは、ScalingPolicyの機能として自動的にInstanceが生成されてしまうためです。 AutoScalingGroupは、紐づいているInstanceがいる限りScalingPolicyを削除することができません。そのため、AutoScalingのAPIを使用してScalingPolicyを強制的に削除する必要があります。 手動でScalingPolicyを削除したのち、StackDeleteを行うことでスタックを削除することができます。

Page 52: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

以下に、

- Compute

- RelationalDatabase

- ObjectStorage

- LoadBalancerAdvance

- DNS

- AutoScaling

- Monitoring

の各リソースを作成するテンプレート例を記載します。

4-2) テンプレートサンプル

52

{

"AWSTemplateFormatVersion": "2010-09-09",

“Description”: “Json Template example.",

"Resources": {

"InstanceA": {

"Type": "Cloudn::Compute::Instance",

"Properties": {

"AvailabilityZone": "jp-e1a",

"ImageId": "8fdc326b-6e82-49a3-af22-69b0e3ab0cd7",

"InstanceType": "m1.small",

"SecurityGroups": [

{

"Ref": "SecurityGroupA"

}

]

}

},

"SecurityGroupA": {

"Type": "Cloudn::Compute::SecurityGroup",

"Properties": {

"GroupDescription": "Enable SSH access via port 80"

}

},

"SecurityGroupIngressA": {

"Type": "Cloudn::Compute::SecurityGroupIngress",

"Properties": {

"GroupName": {

"Ref": "SecurityGroupA"

},

"CidrIp": "0.0.0.0/0",

"IpProtocol": "tcp",

"FromPort": "100",

"ToPort": "100"

}

},

Page 53: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

4-2) テンプレートサンプル

53

"SecurityGroupB": {

"Type": "Cloudn::Compute::SecurityGroup",

"Properties": {

"GroupDescription": "Enable SSH access via port 80"

}

},

"SecurityGroupIngressB": {

"Type": "Cloudn::Compute::SecurityGroupIngress",

"Properties": {

"GroupName": {

"Ref": "SecurityGroupB"

},

"CidrIp": "0.0.0.0/1",

"IpProtocol": "tcp",

"FromPort": "10",

"ToPort": "20"

}

},

"ElasticLoadBalancer": {

"Type": "Cloudn::LBA::LoadBalancer",

"Properties": {

"AvailabilityZones": [

"jp-e1a",

"jp-e1b"

],

"Instances": [

{

"Ref": "InstanceA"

}

],

"Listeners": [

{

"InstanceProtocol": "HTTP",

"LoadBalancerPort": "80",

"InstancePort": "80",

"Protocol": "HTTP"

}

]

}

},

Page 54: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

4-2) テンプレートサンプル

54

"myDNSRecords": {

"Type": "Cloudn::DNS::RecordSet",

"Properties": {

"HostedZoneName": "provtest.com.",

"Comment": "DNS name for my instance.",

"Name": "testtest3.provtest.com",

"Type": "A",

"TTL": "900",

"ResourceRecords": [

"192.168.1.101"

]

}

},

"CPUAlarmHigh": {

"Type": "Cloudn::Monitoring::Alarm",

"Properties": {

"AlarmDescription": "malarm1",

"MetricName": "CPUUtilization",

"Threshold": "10",

"Namespace": "Cloudn/Compute",

"ComparisonOperator": "GreaterThanThreshold",

"Dimensions": [

{

"Name": "InstanceId",

"Value": "aa3a9b6c-2c73-4302-be12-44de1ee20546"

}

],

"AlarmActions": [

"arn:cloudn:monitoring:jp-e1:[email protected]"

],

"Statistic": "Sum",

"Period": "300",

"EvaluationPeriods": "2"

}

},

"WebServerGroup": {

"Type": "Cloudn::AutoScale::AutoScalingGroup",

"Properties": {

"AvailabilityZones": {

"Fn::GetAZs": ""

},

"LaunchConfigurationName": {

"Ref": "LaunchConfig"

},

"MinSize": "1",

"MaxSize": "2",

"LoadBalancerNames": [

{

"Ref": "ElasticLoadBalancer"

}

]

}

},

Page 55: NTT Communications Cloudⁿ Provisioning...1 NTT Communications Cloudⁿ Provisioning 操作 マニュアル Ver.1.1 本冊子掲載の内容の次配布(配布・転載・提供等)は、ご遠慮ください。3

4-2) テンプレートサンプル

55

"LaunchConfig": {

"Type": "Cloudn::AutoScale::LaunchConfiguration",

"Properties": {

"ImageId": "8fdc326b-6e82-49a3-af22-69b0e3ab0cd7",

"InstanceType": "m1.small",

"SecurityGroups": [

{

"Ref": "SecurityGroupA"

}

]

}

},

"WebServerScaleUpPolicy": {

"Type": "Cloudn::AutoScale::ScalingPolicy",

"Properties": {

"AdjustmentType": "ChangeInCapacity",

"AutoScalingGroupName": {

"Ref": "WebServerGroup"

},

"Cooldown": "1",

"ScalingAdjustment": "1"

}

},

"DBInstance": {

"Type": "Cloudn::RDB::DBInstance",

"Properties": {

"DBName": “testDB01",

"Engine": "MySQL",

"MultiAZ": "true",

"MasterUsername": “test",

"DBInstanceClass": "db.m1.small",

"AllocatedStorage": "30",

"MasterUserPassword": “test"

}

}

}

}