App Engine にアプリをデプロイするには、App Engine アプリケーションのリソースと他の Google Cloud リソースを保持する最上位コンテナとなる Google Cloud プロジェクトを作成する必要があります。
このタスクでは、Google Cloud プロジェクトと App Engine アプリケーションを作成して、アプリの設定、コンピューティング リソース、認証情報、メタデータを保存します。
App Engine の Google Cloud プロジェクトがすでに存在し、Cloud Build API を有効にしている場合は、ウェブサービスの作成に進みます。
Google Cloud プロジェクトを作成する
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
Enable the Cloud Build API.
-
Install the Google Cloud CLI.
-
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
-
To initialize the gcloud CLI, run the following command:
gcloud init
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
Enable the Cloud Build API.
-
Install the Google Cloud CLI.
-
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
-
To initialize the gcloud CLI, run the following command:
gcloud init
Google Cloud コンソールで、Google Cloud プロジェクトの App Engine アプリケーションを作成します。
アプリのコンピューティングリソースを配置するリージョンを選択します。
- 新しいプロジェクトで Cloud Build がサービス アカウントを使用する方法のデフォルトの動作が変更され、「デフォルトで保護」の組織ポリシーが変更されたため、デプロイするサービス アカウントに追加のロールを付与することが必要になる場合があります。特定のロールを付与する方法については、トラブルシューティング ガイドをご覧ください。
次のステップ
これで Google Cloud プロジェクトが設定され、Node.js で基本的なウェブサービスを作成する準備が整いました