

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# ステップ 6: PhotoApp をデプロイおよび実行する
<a name="using-s3-run"></a>

**重要**  
この AWS OpsWorks Stacks サービスは 2024 年 5 月 26 日にサポート終了となり、新規および既存のお客様の両方で無効になっています。できるだけ早くワークロードを他のソリューションに移行することを強くお勧めします。移行についてご質問がある場合は、[AWS re:Post](https://repost.aws/) または[AWS プレミアムサポート](https://aws.amazon.com/support)を通じて AWS サポート チームにお問い合わせください。

この例では、アプリケーションもすでに実装されており、[GitHub のパブリックリポジトリ](https://github.com/amazonwebservices/opsworks-demo-php-photo-share-app)に保存されています。必要な処理は、アプリケーションをスタックに追加し、アプリケーションサーバーにデプロイして実行することだけです。

**アプリケーションをスタックに追加してアプリケーションサーバーにデプロイするには**

1. [**Apps**] ページを開き、[**Add an app**] を選択します。

1. [**Add App**] ページで、次のように設定します。
   + [**Name**] を [**PhotoApp**] に設定します。
   + [**App type**] を [**PHP**] に設定します。
   + [**Document root**] を [**web**] に設定します。
   + [**Repository type**] を [**Git**] に設定します。
   + **Repository URL** を **git://github.com/awslabs/opsworks-demo-php-photo-share-app.git** に設定します。
   + [**Add App**] を選択し、その他の設定はデフォルト値を受け入れます。  
![\[Form to add an app with fields for name, type, document root, and repository details.\]](http://docs.aws.amazon.com/ja_jp/opsworks/latest/userguide/images/photoapp_walkthrough_app.png)

1. [**Apps**] ページで、PhotoApp アプリケーションの [**Actions**] 列で [**deploy**] を選択します。  
![\[Apps page showing PhotoApp with deploy, edit, and delete options in the Actions column.\]](http://docs.aws.amazon.com/ja_jp/opsworks/latest/userguide/images/photoapp_walkthrough_deploy.png)

1. デフォルト値を受け入れ、[**Deploy**] を選択してアプリケーションをサーバーにデプロイします。

PhotoApp を実行するには、**[Instances]** (インスタンス) ページに移動して PHP アプリケーションサーバー インスタンスのパブリック IP アドレスを選択します。

![\[PHP App Server instance details showing hostname, status, and public IP address.\]](http://docs.aws.amazon.com/ja_jp/opsworks/latest/userguide/images/photoapp_walkthrough_run.png)


次のようなユーザーインターフェイスが表示されます。Amazon S3 バケットに写真を保存し、バックエンドデータストアにメタデータを保存するには、**[Add a Photo]** (写真を追加) を選択します。

![\[User interface section titled "My Photos" with an "Add a Photo" button.\]](http://docs.aws.amazon.com/ja_jp/opsworks/latest/userguide/images/photoapp_walkthrough_ui.png)
