xiaodelaoshi
xiaodelaoshi

Reputation: 631

'gcloud app deploy' command not working

I have a python version google app engine installed and I have created a new project in console. I followed the instruction in my terminal I use command gcloud app deploy in my working directory then I got this error:

ERROR: The [application] field is specified in file 
[/Users/fengxinlin/project/app.yaml]. This field is not used by 
gcloud and must be removed. Project name should instead be specified 
either by `gcloud config set project MY_PROJECT` or by setting the `-
-project` flag on individual command executions.
ERROR: (gcloud.app.deploy) Errors occurred while parsing the App 
Engine app configuration.

then I tried gcloud config set project [one of my project] after that I gcloud app deploy again, I got same error, is there any thing wrong with my command?

Upvotes: 7

Views: 14859

Answers (3)

makkasi
makkasi

Reputation: 7328

For me this was the command I needed:

gcloud app deploy --project project_name --version preprod --verbosity=info app.yaml index.yaml

My point of adding this answer is to note that using appcfg will work with the parameters : application and version, inside the app.yaml but appcfg won't work with the parameters to set other instance class and scaling (below). So be careful if you return to appcfg just to have these parameters (version and application) working

instance_class: F2
automatic_scaling:
  min_idle_instances: automatic
  max_idle_instances: automatic
  min_pending_latency: 30ms
  max_pending_latency: automatic
  max_concurrent_requests: 50

I had to update the ssl to :

- name: ssl
  version: "2.7.11"

Because clearly there is app engine bug and it doesn't work with

- name: ssl
      version: "latest"

Upvotes: 5

jainashish
jainashish

Reputation: 5203

Run the below command before : gcloud app deloy : to get rid of the internal bug frustrating a lot of users like you and me.

gcloud config set app/use_deprecated_preparation True

Upvotes: 1

xiaodelaoshi
xiaodelaoshi

Reputation: 631

Now I solved this problem, The answer is just in the error message: in my app.yaml file, remove the application and version lines from the yaml file. then there will be no such errors.

Upvotes: 17

Related Questions