Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'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?

like image 872
Xinlin Feng Avatar asked Apr 20 '17 07:04

Xinlin Feng


People also ask

How does gcloud app deploy work?

App Engine provides the gcloud app deploy command, which builds an image with your source code and deploys that image on App Engine. You can use the cloud-sdk image as a build step in your config file to invoke gcloud commands within the image.

What is the deploy command of Google cloud?

Deploy your application to App Engine using the gcloud app deploy command. This command automatically builds a container image by using the Cloud Build service and then deploys that image to the App Engine flexible environment.

How long does gcloud app deploy take?

When firing of gcloud preview app deploy the whole process takes ~8 minutes, most of which is "updating service".


3 Answers

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.

like image 194
Xinlin Feng Avatar answered Oct 26 '22 10:10

Xinlin Feng


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"
like image 44
makkasi Avatar answered Oct 26 '22 09:10

makkasi


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
like image 1
jainashish Avatar answered Oct 26 '22 09:10

jainashish