Uso o Windows, após baixar e instalar o Google App Engine para PHP, não encontrei o Laucher, para seguir acessei a pasta \performance-web\dist pelo terminal do programa da Google e executei o seguinte comando para fazer o deploy, recebendo erro:
C:\Users\ricardo.uehlein\Documents\Alura\performance-web\dist>gcloud app deploy
ERROR: (gcloud.app.deploy) The required property [project] is not currently set.
You may set it for your current workspace by running:
$ gcloud config set project VALUE
or it can be set temporarily by the environment variable [CLOUDSDK_CORE_PROJECT]
então configurei o projeto:
C:\Users\ricardo.uehlein\Documents\Alura\performance-web\dist>gcloud config set project performance-web-301018
Updated property [core/project].
Updates are available for some Cloud SDK components. To install them,
please run:
$ gcloud components update
C:\Users\ricardo.uehlein\Documents\Alura\performance-web\dist>gcloud components update
Beginning update. This process may take several minutes.].
Executando o deploy ocorreu outro erro:
C:\Users\ricardo.uehlein\Documents\Alura\performance-web\dist>gcloud app deploy
ERROR: (gcloud.app.deploy) The [version] field is specified in file [C:\Users\ricardo.uehlein\Documents\Alura\performance-web\dist\app.yaml]. This field is not used by gcloud and must be removed. Versions are generated automatically by default but can also be manually specified by setting the `--version` flag on individual command executions.
Descobri no stackoverflow que é necessário editar o arquivo app.yaml removendo o application e version: https://stackoverflow.com/questions/43512630/gcloud-app-deploy-command-not-working
runtime: php55
api_version: 1
handlers:
- url: /
static_files: index.html
upload: index.html
- url: /assets
static_dir: assets
Após isso executei o comando de novo, configurei a região para 13 ( [13] southamerica-east1) e recebi outro erro:
C:\Users\ricardo.uehlein\Documents\Alura\performance-web\dist>gcloud app deploy
You are creating an app for project [performance-web-301018].
WARNING: Creating an App Engine application for a project is irreversible and the region
cannot be changed. More information about regions is at
<https://cloud.google.com/appengine/docs/locations>.
Please choose the region where you want your App Engine application
located:
[...]
File upload done.
WARNING: You will be unable to deploy applications after November 30, 2019 without adding a billing instrument to your project. Please add one at https://console.cloud.google.com/billing/linkedaccount?performance-web-301018
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [7] Access Not Configured. Cloud Build has not been used in project performance-web-301018 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudbuild.googleapis.com/overview?project=performance-web-301018 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
C:\Users\ricardo.uehlein\Documents\Alura\performance-web\dist>gcloud config set app/use_deprecated_preparation True
ERROR: (gcloud.config.set) Section [app] has no property [use_deprecated_preparation].
Parece que para usar essa ferramenta é necessário ativar a Cloud Build API no link a seguir cadastrando uma conta de faturamento podendu usar esse recurso gratuitamente por 90 dias:
https://console.developers.google.com/apis/library/cloudbuild.googleapis.com?project=NOME_DO_PROJETO
Como preferi não seguir adiante com o cadastro não tenho mais informações se haverá mais erros.
Este post foi só para informação ara outros alunos que tiverem erro no deploy já que esse processo mudou desde 30/11/2019.