39
Microsoft Azure Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト 武田 正樹 [email protected] / @masakit555

Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

Microsoft Azure にMovable Type 6 をインストール

日本マイクロソフト株式会社エバンジェリスト

武田正樹[email protected] / @masakit555

Page 2: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

本日の内容

• 開発環境の構築– Mac 環境の方は、事前にMicrosoft Remote Desktop をインストールしてください。

https://itunes.apple.com/jp/app/microsoft-remote-desktop/id715768417?mt=12&ls=1

• Movable Type 6 を Azure にインストール– 下記内容に基づいて手順書を作成しています。

http://www.movabletype.jp/documentation/mt6/advanced/windows-azure-deploy.html

Page 3: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

開発環境の構築

Page 4: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

Azure 管理ポータルにログイン

• https://manage.windowsazure.com にアクセスします。• アクセスすると、Microsoftアカウント入力画面にリダイレクトします。• サインインに使用するMicrosoftアカウントを入力し、[続行]ボタンをクリックします。

Page 5: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

Microsoft アカウントを入力

• Microsoftアカウント、パスワードを入力し、[サインイン]ボタンをクリックします。

Page 6: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

[+新規] をクリックします。

Page 7: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

5) [✔] をクリックします。

4) [日本(東)] を選択します。

3) RDP 接続用のID,パスワードを入力します。

2) Windows Server 2012 R2 Datacenter を選択します。

1) ユニークなURLを作成します。右に緑色のチェックマークが表示されれば使用することができます。

Page 8: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

[接続] をクリックします。

数分で仮想マシンの作成が完了します。

Page 9: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

1) [✔] をクリックします。

Windows 環境の場合(Mac 環境は画面が異なります)

2) [ファイルを開く] をクリックします。

3) [接続] をクリックします。

4) 仮想マシン作成時に入力した ID, パスワードを入力します。

5) [はい] をクリックします。

Page 10: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

<Remote Desktop 接続画面>

1) [Local Server] をクリックします。

2) IE Enhanced Security Configuration の[On] をクリックします。

3) Off を選択して[OK] をクリックします。

4) 画面左下のアイコンをクリックします。

5) IEのアイコンをクリックします。

Page 11: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

2) [Run] をクリックします。

<Remote Desktop 接続画面>

1) http://go.microsoft.com/?linkid=9811175&clcid=0x409にアクセスします。

Page 12: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

<Remote Desktop 接続画面>

1) [Install] をクリックします。

2) [I Accept] をクリックします。

3) [Finish] をクリックします。

Page 13: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

<Remote Desktop 接続画面>

3) [Run] をクリックします。

1) http://www.microsoft.com/en-us/download/details.aspx?id=8279にアクセスします。

2) [Download] をクリックします。

Page 14: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

<Remote Desktop 接続画面>

1) [Next] をクリックします。

4) [Finish] をクリックします。

2) [I Agree] をクリックします。

3) [Next] をクリックします。この後の画面も [Next] をクリックします。

Page 15: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

Movable Type 6 のインストール

Page 16: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

[+新規] をクリックします。

Page 17: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

赤枠のところをクリックします。

Page 18: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

3) [->] をクリックします。

2) 上記と同じになるように選択します。

1) データベース名を入力します。

Page 19: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

3) [✔] をクリックします。

2) 上記と同じになるように選択します。

1) データベースのユーザー名とパスワードを入力します。

Page 20: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

[+新規] をクリックします。

SQL データベースの作成が完了しました。

Page 21: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

5) [✔] をクリックします。

1) ユニークなURLを作成します。右に緑色のチェックマークが表示されれば使用することができます。

2) 右と同じになるように選択します。

Page 22: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

[アクセスキーの管理] をクリックします。

Blob ストレージの作成が完了しました。

Page 23: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

下記情報をお手元のマシンにコピー & ペーストしておきます。

[✔] をクリックします。

このアイコンをクリックするとコピーできます。

Page 24: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

[+新規] をクリックします。

Page 25: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

5) [✔] をクリックします。

1) ユニークなURLを作成します。右に緑色のチェックマークが表示されれば使用することができます。

2) [日本(東)]を選択します。

Page 26: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

クラウドサービスの作成が完了しました。

Page 27: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

• 下記URLよりファイルをダウンロードしてください。

– http://mta508.azurewebsites.net/mta-handson.zip

– http://mta508.azurewebsites.net/mta-6.0.3.zip

• ダウンロードしたファイルを解凍してc:¥mta に展開します。

• 画面下アイコンをクリックして、Powershell を起動します。

<Remote Desktop 接続画面に戻ります>

Page 28: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

以下のコマンドを順番に実行します。

> cd 'C:¥Program Files (x86)¥Microsoft SDKs¥Windows Azure¥AzCopy'> .¥AzCopy.exe c:¥mta¥mta-6.0.3 https://①.blob.core.windows.net/mta /destKey:② /S /Y /XO

> .¥AzCopy.exe c:¥mta¥mta-handson¥tools https://①.blob.core.windows.net/tools /destKey:② /S /Y

<Remote Desktop 接続画面>

①の値

②の値

Page 29: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

以下のコマンドを順番に実行します。

> cd 'C:¥Program Files¥Microsoft SDKs¥Windows¥v7.1¥Bin'

> .¥makecert.exe -a sha1 -b 11/01/2013 -len 2048 -n "CN=AzureRDPCert" -pe -r -sky exchange -ss

My “C:¥mta¥AzureRDPCert-mtdevcs01.cer" -sv “C:¥mta¥AzureRDPCert-mtdevcs01.pvk"

> .¥pvk2pfx.exe -pvk “C:¥mta¥AzureRDPCert-mtdevcs01.pvk” -pi “①" -spc “C:¥mta¥AzureRDPCert-

mtdevcs01.cer" -pfx “C:¥mta¥AzureRDPCert-mtdevcs01.pfx"

> .¥makecert.exe -a sha1 -b 11/01/2013 -len 2048 -n "CN=SSLCert" -pe -r -sky exchange -ss My

“C:¥mta¥SSLCert-mtdevcs01.cer" -sv “C:¥mta¥SSLCert-mtdevcs01.pvk"

> .¥pvk2pfx.exe -pvk “C:¥mta¥SSLCert-mtdevcs01.pvk” -pi “②" -spc “C:¥mta¥SSLCert-mtdevcs01.cer"

-pfx “C:¥mta¥SSLCert-mtdevcs01.pfx"

<Remote Desktop 接続画面>

パスワード設定のポップアップウインドウが表示されます。

①: makecert.exe 実行時に入力したパスワード

②: makecert.exe 実行時に入力したパスワード

Page 30: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

<Remote Desktop 接続画面で、Azure の画面にログインします。>

https://manage.windowsazure.comにアクセスして、ログインしてください。

クラウドサービスの作成で作成した方をクリックします。運用欄が [-]となっている方です。

英語メニューがでてきたときは、ここをクリックし日本語を選択します。

Page 31: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

[証明書] をクリックします。

<Remote Desktop 接続画面>

Page 32: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

[->] をクリックします。

<Remote Desktop 接続画面>

Page 33: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

1) C:¥mta¥AzureRDPCert-mtdevcs01.pfx を選択します。

2) [✔] をクリックします。

3) サムプリントの値をコピーします。

<Remote Desktop 接続画面>

Page 34: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

以下のコマンドを順番に実行します。

> cd 'C:¥Program Files¥Microsoft SDKs¥Windows Azure¥.NET SDK¥v2.3¥bin'> .¥csencrypt.exe Encrypt-Password -CopyToClipboard -Thumbprint ①

<Remote Desktop 接続画面>

MIIBlgYJKoZIhvcNAQcDoIIBhzCCAYMCAQAxggFHMIIBQwIBADArMBcxFTATBgNVBAMTDEF6dXJl

UkRQQ2VydAIQ+6CDcdB/2LJPBfeYHjnvqDANBgkqhkiG9w0BAQEFAASCAQARXgzPfnn5ctc4mnqa

EgNGx7W39oG860UONndS0Xv4DJekH1aTrR6lGq6wGQaymr7g2rYYI2uU0Au7cOksFZVQazoLo7gK

/p24X/BRhl6T8itUSOD4qPac4ELimtjra355eZ3QyIzO09+4Oc7HTf+lK4dHa9W9KOYoFOptif6n

yWSgIbbUnYm+7JAa6PERzRQnmSphMnBlvzJfP0NQhXFvU4StNPttc39vEbvTchKmiymj/tkJE55S

81tFiz8wo+gXqxdMRwGULHwim+YPp1IUvsmhwAyWifGTq1Hr7me7pEpUV0iu8H1xGVrGTC0guTTR

LcZjzLV4ep3UZIWlTXTyMDMGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQImuqiBZ424sCAEFnYVh5D

NFqU0uOj6awyKnw=

暗号化されたパスワードが出力されます(設定したパスワードを忘れないでください)。クリップボードに格納されていますのでペーストしておきます。

Page 35: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

<Remote Desktop 接続画面>

C:¥mta¥mta-handson¥kit にある赤枠で囲ったファイルを編集します。一度お手元の端末にコピー & ペーストして編集することをお勧めします。

編集内容は、下記URL を参照ください。

ServiceDefinition.csdef の修正http://www.movabletype.jp/documentation/mt6/advanced/windows-azure-deploy.html#windowsazure09

ServiceConfiguration.Cloud.cscfg の修正http://www.movabletype.jp/documentation/mt6/advanced/windows-azure-deploy.html#windowsazure10

Page 36: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

以下のコマンドを順番に実行します。

> cd 'C:¥mta¥mta-handson¥kit'

> Save-AzureServiceProjectPackage

<Remote Desktop 接続画面>

Cloud_package.cspkg というファイルが生成されます。

[ダッシュボード] をクリックします。

Page 37: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

<Remote Desktop 接続画面>

[->] をクリックします。

Page 38: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

<Remote Desktop 接続画面>

4) [✔] をクリックします。

1) ラベルを入力します。

2) C:¥mta¥mta-handson¥kit にあります。

3) 上記と同じになるように設定します

Page 39: Microsoft Azure に Movable Type 6 をインストール2014/05/08  · Microsoft Azure に Movable Type 6 をインストール 日本マイクロソフト株式会社 エバンジェリスト

<Remote Desktop 接続画面>

クラウドサービスへの展開が完了しました。