64
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. AWSマイスターシリーズ Amazon Elastic Compute Cloud (Amazon EC2) – Windows編 2013.05.29 アマゾンデータサービスジャパン株式会社 ソリューションアーキテクト 渡邉 源太

[AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

AWSマイスターシリーズ

Amazon Elastic Compute Cloud (Amazon EC2) – Windows編

2013.05.29

アマゾンデータサービスジャパン株式会社

ソリューションアーキテクト 渡邉 源太

Page 2: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

2

今日のAgenda

Amazon EC2 –Windowsインスタンスとは?

Windowsインスタンスの基本

最新アップデート

高度な使い方

まとめ

Page 3: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

3

今日のAgenda

Amazon EC2 –Windowsインスタンスとは?

Windowsインスタンスの基本

最新アップデート

高度な使い方

まとめ

Page 4: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

4

AWSの様々なサービス お客様のアプリケーション

認証 AWS IAM

モニタリング Amazon

CloudWatch

Web管理画面 Management

Console

デプロイと自動化 AWS Elastic Beanstalk AWS Cloud Formation

AWS OpsWorks

IDEプラグイン Eclipse

Visual Studio

ライブラリ & SDKs Java, PHP, .NET, Python, Ruby,

node.js

Development &

Administration

AWS グローバルインフラ Geographical Regions, Availability Zones, Points of Presence AZ Region

ネットワーク & ルーティング Amazon VPC / Amazon Elastic Load Balancer / Amazon Route 53 /AWS Direct Connect

Infrastructure

Service

コンピュータ処理 Amazon EC2

Auto Scale

ストレージ Amazon S3 Amazon EBS

Amazon Glacier AWS Storage Gateway

データベース Amazon RDS

Amazon DynamoDB Amazon ElastiCache

Amazon Redshift

コンテンツ配信 Amazon CloudFront

メッセージ Amazon SNS Amazon SQS Amazon SES

分散処理 Elastic MapReduce

検索エンジン Amazon Cloud Search

トランスコード Amazon Elastic Transcoder

ワークフロー管理 Amazon SWF

Application

Service

Page 5: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

5

AWSのグローバルインフラストラクチャ

US West (Northern

California)

US East (Northern

Virginia)

EU (Ireland)

Asia

Pacific (Singapore)

Asia

Pacific (Tokyo)

GovCloud (US ITAR

Region)

US West (Oregon)

South

America (Sao Paulo)

AWS Regions

AWS Edge Locations

1. どのリージョンでも同じ使い勝手、同じやり方で自由に利用可能

2. リージョンを指定して、アプリケーションやデータを配置する事が可能

Asia

Pacific (Sydney)

Page 6: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

6

アベイラビリティゾーン(AZ)

• 各リージョン内に、複数のAZ(データセンター群)が存在 • 各AZはお互いに影響を受け難いように、

地理的・電源的・ネットワーク的に分離して設計 • AZ間は高速専用線で接続(リージョン間はインターネット経由)

Page 7: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

7

Amazon EC2 - Windowsインスタンス

Amazon EC2で実行可能なWindowsイメージ

Windows Server 2012、Windows Server 2008 R2、Windows Server 2008およびWindows Server 2003 R2が実行可能

SQL Server 2008 / 2012 Express EditionまたはWeb Edition、Standard Editionが時間単位の課金で利用可能

Page 8: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

8

Windowsインスタンスの利用パターン

Windows Server インフラ

• Active Directory

• Exchange

• SharePoint

業務アプリケーション

• SAP

• 多くのISVアプリケーション

.NETアプリケーション

• ASP.NET + SQL Server

Windows HPC

Page 9: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

9

SQL Server 2008, SharePoint 2010で構成 クラウド側がプライマリー、社内サーバ(オンプレミス)がセカンダリー ライセンス:ライセンスモビリティ適用 ネットワーク:Amazon VPC

(仮想プライベートクラウド)を利用

アマゾンでもMS SharePointを AWSクラウド上で活用中

Page 10: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

10

SharePoint on AWS システム構成例

Page 11: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

11

CloudFormationによる SharePointサーバーファーム構築

CloudFormationテンプレートのサンプルを使用して6ステップでSharePointサーバーファームを構築

• http://aws.amazon.com/articles/9982940049271604

テンプレートは環境にあわせて自由にカスタマイズ可能

コストは約$3250/月

Page 12: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

12

SAP on AWS システム構成例

AZ-A AZ-B

Subnet-1

SAP

DEV

SAP

PRD

SAP

QAS

S3

CloudWatch

DC/イントラ

SAP

DEV SAP

DEV

SAP

QAS SAP

QAS

監視

Backup/

Restore

Subnet-3

SAP

Router

NAT

Instance

Internet

Gateway

VPN

Gateway

VPN接続/専用線

SAP

Solman

Subnet-2

Page 13: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

13

今日のAgenda

Amazon EC2 – Windowsインスタンスとは?

Windowsインスタンスの基本 • 触ってみよう!

• 基本コンセプト

最新アップデート

高度な使い方

まとめ

Page 14: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

14

AWSサービスの選択

Webコンソールでコントロールするサービスを選ぶ

Page 15: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

15

リージョンを変更する

日本にいながら、世界中のどのリージョンも選択できる 1. リージョン選択メニューをクリック

2. Asia Pacific (Tokyo) を選択

XXXX

Page 16: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

16

インスタンスを起動する

インスタンスを起動するために、起動ウィザードを立ちあげます。

1. [EC2 Dashboard]をクリック

2. [Launch Instance]をクリック

XXXX

Page 17: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

17

ウィザード選択

Classic Wizardを選択し、Continue

Page 18: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

18

AMI選択

任意のAMIを選ぶことで、 好みの環境 (OS、ミドルウェア、アプリ、データ) を選択できる

Page 19: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

19

台数、インスタンスタイプ、 アベイラビリティゾーンの指定

Page 20: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

20

EBSの設定

Page 21: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

21

Key Pair選択

いわゆる公開鍵方式でサーバーにアクセスする。 初回時は、秘密鍵を手元にダウンロードする

Page 22: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

22

Security Groups選択

いわゆるファイアウォールの設定 作っておいたグループをサーバーに割り当てる

Page 23: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

23

インスタンスの起動

Request Instances Wizardの内容を確認し、「Launch」をクリックしてインスタンスを起動

Page 24: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

24

作成したインスタンスの確認

Instancesで、インスタンス一覧を確認

新規に作成したインスタンスのホスト名を確認する。

「Status Checks」に緑のチェックマークがつくと起動完了

Page 25: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

25

Windowsパスワードの取得

インスタンスの起動後、10分~15分くらいかかります

インスタンスを選択して「Instances Actions」から「Connect」「Retrieve Password」を選択

xxx.pemをテキストエディタで開いて内容をコピー(-----BEGIN RSA PRIVATE KEY-----から-----END RSA PRIVATE KEY-----まで)し「Private Key」へ貼り付け、「Decrypt Password」をクリック(IEの場合)

Page 26: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

26

Windowsインスタンスへの接続

インスタンスを選択して「Instance Actions」から「Connect」→「Download shortcut file」もしくはリモートデスクトップ接続からPublic DNSを指定して接続

リモートデスクトップ接続の場合は、<Public DNS名>¥Administratorとしてログオン

Page 27: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

27

Windows Server 2012 デスクトップ画面

デスクトップの壁紙にインスタンス情報が表示される

デスクトップ画面左下にカーソルで「スタートスクリーン」、画面右下にカーソルで「チャーム」を表示

インスタンス情報

Page 28: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

28

今日のAgenda

Amazon EC2 –Windowsインスタンスとは?

Windowsインスタンスの基本 • 触ってみよう!

• 基本コンセプト

最新アップデート

高度な使い方

まとめ

Page 29: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

29

Key Pairとは?

Key Pairを作成すると、1組の公開鍵・秘密鍵が作成される

公開鍵はAWS側で保管。EC2起動時にインスタンスにコピー

秘密鍵はローカル側で保管。Windowsインスタンスの場合、パスワードの復号化に必要

リージョンごとに独立

キーペアの作成

公開鍵は、AWSによってEC2起動時に埋め込まれる

秘密鍵は、デスクトップにダウンロード

される

EC2インスタンスは2つの鍵を用いる

Page 30: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

30

Security Groupとは?

インスタンスへのトラフィックを制限するファイアーウォール機能

デフォルトでは全トラフィックが閉じており、外からアクセスできない

必要な受信アクセスに対してアクセスルールを定義する • プロトコル( TCP/UDP)

• 宛先ポート

• アクセス元IP / Security Group

設定したルール以外の受信トラフィックは破棄される

ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート3389 (RDP)

ポート80 (HTTP)

EC2ファイアウォール

Security Group

ポート25 (SMTP)

Page 31: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

31

Amazon Machine Image (AMI)

AMIはインスタンス作成に使用するイメージテンプレート

AWS公式AMIや、サードパーティもAMIを提供 • https://aws.amazon.com/amis/

• https://aws.amazon.com/marketplace/

選択したAMIから起動する

EC2インスタンスから、任意のタイミングで カスタムAMIを作成できる

launch

Amazon

Machine

Image (AMI)

Amazon EC2インスタンス

Page 32: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

32

AMIとインスタンス、AZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム

AMI

AMIからインスタンスを 起動

カスタムAMIを使って、インスタンスを複数台起動

カスタムAMIを作成 必要に応じて共有設定

Page 33: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

33

EC2ConfigServices

EC2独自のカスタマイズツール

スタートメニューから、「EC2 ConfigService Settings」で起動

Windowsイメージのカスタマイズが可能

• Set Computer Name

• User Data

• Eventlog

• Wallpaper Information

Page 34: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

34

Sysprepの実行

Sysprepにより複製用のマスタイメージを作成可能

「Image」タブの「Random」「Shutdown with Sysprep」を選択

確認の画面が表示されるので「はい」を選択

実行後、OSは自動的にシャットダウンされる

Page 35: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

35

カスタムAMIの作成

• 素となるインスタンスをカスタマイズ

• 右クリックで「Create Image」を選択

• AMIの名前を必要に応じて入力

• 「No Reboot」にチェックしない

• 素となるインスタンスがReboot

• AMI作成開始

Page 36: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

36

Amazon Elastic Block Store (EBS)

EBSとは、EC2に仮想外付けされる

ブロックレベルのストレージサービス

サイズは1GB単位で~1TBまで

サイズ/期間(/IO)で課金される

各EC2インスタンスで、複数EBSを使える

詳細

データは永続的に保存される

いつでもバックアップ(スナップショット)

スナップショットから、EBSを作成可能 (他のAZに作成できる)

Provisioned IOPSでIOパフォーマンス指定

他のEC2インスタンスに付け替え可能

Region

Availability Zone - a

EBS EBS EBS

Availability Zone - b

EBS EBS

Amazon S3

EBS スナップショット

EC2 EC2

Page 37: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

37

EBSボリュームのアタッチ

Available状態のボリュームを右クリック->「Attach Volume」

アタッチ情報を入力 • アタッチ先インスタンス (ボリュームと同じゾーンのインスタンスから選択)

• アタッチ先デバイス (例: xvdf, xvdg, xvdh … xvdp )

EBS

Page 38: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

38

インスタンスストレージの使用

インスタンスストレージ(Ephemeral Disk)はインスタンス起動時にデフォルトでアタッチされる(Citrix PV Driverの場合)

アタッチされたボリュームをOSから初期化して使用

Page 39: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

39

今日のAgenda

Amazon EC2 –Windowsインスタンスとは?

Windowsインスタンスを触ってみる

最新アップデート

高度な使い方

まとめ

Page 40: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

40

Windows関連アップデート (1/2)

11/19 Windows Server 2012 が利用可能に

• EC2の公式AMI (31個のAMI)

• AWS Elastic Beanstalkでも利用可能

12/5 AWS MarketplaceがWindowsアプリに対応

12/6 AWS Tools for Windows PowerShellリリース

2/26 AWS Diagnostics for Microsoft Windows Server ベータ版リリース

Page 41: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

41

Windows関連アップデート (2/2)

3/26 Windows Server 2003 R2/2008/2008 R2 AMIアップデート

• Citrix Para Virtualized (PV) Driverの採用

• アタッチ可能なEBSの上限数が25個に

4/4 Windowsのオンデマンドインスタンスを最大26%値下げ

• 第一世代スタンダード(m1)、第二世代スタンダード(m3)、ハイメモリ(m2)およびハイCPU(c1)に適用

5/8 AWS Management Pack for Microsoft System Centerリリース

Page 42: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

42

AWS Tools for Windows PowerShell

AWSへの容易なコマンドラインアクセス

• 550以上のコマンドレット

• AWS SDK for .NETがベース

スクリプトによる管理の自動化に対応

EC2, S3をはじめ多くのサービスの管理が可能

• http://aws.amazon.com/jp/powershell/

42

Page 43: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

43

EC2インスタンスの作成と起動

EC2インスタンスの作成

• PS C:\>New-EC2Instance –ImageID ami-5db8385c –MinCount 1 –MaxCount 1 –KeyName myPSKeyPair –SecurityGroup myPSSecurityGroup –InstanceType t1.micro

EC2インスタンスの起動

• PS C:\>Start-EC2Instance –InstanceId i-7b2e5078

43

Page 44: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

44

S3の操作

S3バケットの作成

• PS C:\>New-S3Bucket –BucketName mypsbucket

オブジェクトのアップロード

• PS C:\>Write-S3Object –BucketName mypsbucket –Key sample.txt –File .\sample.txt

フォルダーのアップロード

• PS C:\>Write-S3Object –BucketName mypsbucket –Folder .\Scripts –KeyPrefix SampleScripts\

44

Page 45: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

45

PowerShellによるスクリプティング

例:C:\Logsにある1週間より前のファイルをS3のバケットにアップロードしてローカルから削除するスクリプト

foreach ($i in Get-ChildItem C:\Logs) { if ($i.CreationTime -lt ($(Get-Date).AddDays(-7))) { if ($i.Length -gt 0) { Write-S3Object -BucketName mylogbucket -Key Logs/$i -File $i.FullName } Remove-Item $i.FullName } }

45

Page 46: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

46

AWS Management Pack for Microsoft System Center

オンプレミスとAWSリソースの両方をSystem Center Operations Managerから参照、監視することが可能に

監視対象

• EC2インスタンス(WindowsおよびLinux)

• EBSボリューム

• Elastic Load Balancing

• CloudFormationスタック

• Auto Scalingグループ

• Elastic Beanstalkアプリケーション

SQL Server、SharePoint、Exchangeなどの監視との統合が可能

Page 47: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

47

AWS Management Pack for Microsoft

System CenterによるAWSリソース監視

監視対象

インスタンス一覧

Amazon EC2 Instanceタスク

Page 48: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

48

ダイアグラムビューによるAWSリソースの表示

CloudFormationスタック

Elastic Loadbalancer

Auto scalingグループ

EC2インスタンス

EBSボリューム

Page 49: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

49

AWS Diagnostics for Microsoft Windows Server

Windowsインスタンスのトラブルシューティングに役立つツール • http://aws.amazon.com/jp/win

dows/awsdiagnostics

以下のデータが収集可能 • ネットワーク

• ドメインとコンピュータ名

• ライセンスアクティベーション

• 時刻設定とタイムゾーン

• インストールされているドライバ

• Windows firewallとSecurity Groupの設定

• インストール済みのアップデート

• 1週間以内にクラッシュした場合のミニダンプファイル

49

Page 50: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

50

今日のAgenda

Amazon EC2とは?

Amazon EC2を触ってみる

最新アップデート

高度な使い方

まとめ

Page 51: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

AWSのマルチAZを用いた冗長構成

ゾーンA

www.example.com

データの同期

Web

サーバ

データ

DB

スレーブ

App

サーバ

Web

サーバ

データ

App

サーバ

DB

マスタ

ゾーンB

ヘルスチェックで サーバー状況を監視

DBソース の参照

Page 52: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

52

SQL Server AlwaysOn Availability Group on AWS

Windows Server Failover Cluster ManagerおよびSQL Server 2012 Availability GroupをAWS上で構成可能に!

Availability Zoneをまたいだレプリケーションと高可用性を実現

環境構築のためのCloudformationテンプレートも提供

52

Availability Zone Availability Zone

SQL Server

DB

SQL Server

DB

Domain

Controller

Domain

Controller

AWS Cloud

Page 53: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

53

www.example.com

Amazon Route 53

AMI

EC2

①AMIから EC2を起動

②S3からEBSを作成

VM Import/ExportによるバックアップからEC2への復旧

保存 ファイル

③名前を 切り替える 既存DC

既存 サーバー

AWS Import/Export

郵送

AWS VM Import

Page 54: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

54

VM Import/Export

既存の仮想マシンをそのままAmazon EC2にインポートすることが可能

• Windows Server 2003 / R2

• Windows Server 2008 / R2

以下の仮想ディスクフォーマットに対応

• VMware vSphere VMDK

• Microsoft Hyper-V VHD

• Citrix XenServer VHD

Page 55: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

55

RD GatewayによるWindowsインスタンスへの接続

RDP(TCP:3389)での通信ができない環境におけるセキュアなアクセスを実現

55

Page 56: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

56

RD GatewayによるWindowsインスタンスへの接続

RD Gatewayとは • RDP(TCP:3389)ではなくHTTPS(TCP:443)を使用した接

• SSLを使用することにより、従来のRDPよりもセキュアな接続を実現

• VPC内のEIP (Elastic IP )をもたないインスタンスにも接続可能

前提条件 • RD GatewayサーバーとなるWindowsインスタンスをVPCの

Public Subnetで起動

• EIP(Elastic IP )を割り当て、Route 53などのDNSにFQDNを登録

• RDPを使用してRD Gatewayサーバーに接続

Page 57: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

57

User Dataの使用

User Dataにスクリプト(<script></script>)またはPowerShell(<powershell></Powershell>)を埋め込むことで、インスタンス起動時の処理を自動化

例:<powershell>Read-S3Object -BucketName myS3Bucket -Key myFolder/myFile.zip -File c:\destinationFile.zip</powershell>

User DataはWindowsが利用可能になるとすぐに実行される

Page 58: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

58

マイクロソフト ライセンスモビリティ

既存のマイクロソフト製品のライセンスをAWS上に持ち込み可能

• Exchange Server 2010

• SharePoint Server 2010

• SQL Server 2008 R2 Enterpriseなど

ソフトウェアアシュアランス(SA)の特典として提供

• http://www.microsoft.com/ja-jp/licensing/software-assurance/license-mobility.aspx

1サーバーライセンスが1インスタンスに、1プロセッサライセンスが4コアまでの1インスタンスに対応

• SQL Server 2012ではコアライセンスに変更

Page 59: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

59

ライセンスモビリティの対象製品

マイクロソフト製品使用権説明書(RUP)に定義

• RUPは四半期に一度更新されるため定期的に要確認

• マイクロソフト製品使用権説明書(2013年4月版)

• http://www.microsoftvolumelicensing.com/Downloader.aspx?DocumentId=6324

ライセンスモビリティ対象製品

• Exchange Server 2010

• SharePoint Server 2010

• SQL Server 2008 R2 Enterpriseなど

ライセンスモビリティの対象ではない製品

• Windows OS

• デスクトップアプリケーションなど

Page 60: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

60

Windows関連ドキュメントアップデート

Securing the Microsoft Platform on Amazon Web Services

• http://d36cz9buwru1tt.cloudfront.net/AWS_Microsoft_Platform_Security.pdf

Implementing Microsoft Windows Server Failover Clustering (WSFC) and SQL Server 2012 AlwaysOn Availability Groups in the AWS Cloud

• http://media.amazonwebservices.com/AWS_WSFC_SQL_Server_AlwaysOn.pdf

60

Page 61: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

61

今日のAgenda

Amazon EC2 –Windowsインスタンスとは?

Windowsインスタンスを触ってみる

最新アップデート

高度な使い方

まとめ

Page 62: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

62

AWS無料利用枠

アカウント取得から1年間有効

EC2関連では毎月以下が無料で利用可能

• EC2

• Linux マイクロインスタンス 750時間

• Microsoft Windows Server マイクロインスタンス 750時間

• EBS

• 30 GBのストレージ

• 200万 I/O、

• 1GBのスナップショット ストレージ

• データ転送

• 帯域幅「送信(アウト)」15 GB

http://aws.amazon.com/jp/free/

Page 63: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

24時間・365日での日本語サポートの提供 • 日本語でのサポートをご提供しております

http://aws.amazon.com/jp/premiumsupport/

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 / 365日(年中無休)

初回応答時間 セルフサービス 12時間

(営業時間内) 1時間 15分

サポート連絡先 N/A 1人 5人 無制限

チャット 不可 不可 可能 可能

TEL 不可 不可 可能 可能

専任スタッフ なし なし なし あり

料金(月額) 無料(AWSの利用料に

含まれる) $49/月

AWS利用総額の 10%~

※最低料金:$100/月

AWS利用総額の 10%~

※最低$15,000/月

63

Page 64: [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) Windows編

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

64

ご参加ありがとう ございました。