Para implantar seu app no App Engine, você precisa criar um Google Cloud projeto, que é um contêiner de nível superior que contém os recursos do aplicativo do App Engine e outros recursos do Google Cloud .
Nesta tarefa, você vai criar um projeto do Google Cloud e um aplicativo do App Engine para armazenar configurações, recursos de computação, credenciais e metadados para seu app.
Se você já tem um projeto do Google Cloud com o App Engine e a API Cloud Build ativada, passe para Como gravar um serviço da Web.
Crie um projeto do Google Cloud .
- Faça login na sua conta do Google Cloud . Se você começou a usar o Google Cloudagora, crie uma conta para avaliar o desempenho dos nossos produtos em situações reais. Clientes novos também recebem US $300 em créditos para executar, testar e implantar cargas de trabalho.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Cloud Build API, if it is not already enabled.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.-
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.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Cloud Build API, if it is not already enabled.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.-
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 Crie um aplicativo do App Engine para seu projeto Google Cloud no console Google Cloud .
Selecione a região em que você quer que os recursos de computação do aplicativo estejam localizados.
- Devido a mudanças no comportamento padrão de como o Cloud Build usa contas de serviço em novos projetos e mudanças na política da organização "seguro por padrão", talvez seja necessário conceder outros papéis à conta de serviço de implantação. Para mais informações sobre como conceder papéis específicos, consulte o guia de solução de problemas.
Próximas etapas
Agora que seu projeto Google Cloud está configurado, você pode gravar um serviço da Web básico com o Java.