1

I'm deploying an app in Google Cloud that has multiple microservices. For one of them, I wish to use a push queue. I configured my queue.yaml file as follows:

queue:
- name: equeue
  rate: 10/s
  retry_parameters:
  task_retry_limit: 1
  task_age_limit: 2d

I spin up the SDK and the queue is working fine, just as it should. But then I go to push it to my app on Google Cloud using:

gcloud app deploy --project=<projectname> --promote --stop-previous-version

The code all loads correctly, but the queue never gets created. I am getting errors from my code as follows:

API error 1 (taskqueue: UNKNOWN_QUEUE)

And when I look in the console, on https://console.cloud.google.com/appengine/taskqueues, the queue has not been created.

I've read the documentation and it seems to indicate that all I need to do is create the queue.yaml file and deploy the app (and that has worked for me in the past, albeit with an older version of the SDK.)

In case it helps, here are the components I'm running locally:

Google Cloud SDK 164.0.0
app-engine-go
app-engine-python 1.9.57
bq 2.0.24
core 2017.07.25
gcloud
gsutil 4.27

Thanks! Dan

Dan
  • 81
  • 2

1 Answers1

1

The queue.yaml is an app-level configuration file, not a service-specific one. See (marginally related) Why do I need to deploy a "default" app before I can deploy multiple services in GCP?

While in a single service app case deploying the default service might also update one or more of these app-level configs that is not guaranteed in a multi-service app case. Which is why each of these configs also comes with an individual dedicated method of deployment which can be performed independently of and/or without updating any of the app's services.

For queue.yaml in particular deployment can be done using gcloud app deploy:

gcloud app deploy [...] queues.yaml

or, if you're using the GAE SDK, using appcfg.py update_queues:

appcfg.py update_queues -A <app_id>
Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
  • Thanks for this. I tried moving the queue.yaml file to my default service, but it did not work. But when I tried the gcloud deploy [...] queues.yaml command, it did. Only problem is I need to keep a copy of the queue.yaml file in the directory for the service as well or it doesn't work in the SDK. I wonder why Google made queues work this way rather than letting them get set up through the console like everything else? Anyway, thanks for your help. – Dan Aug 10 '17 at 04:33
  • You can sym-link the file to also keep the SDK happy. See an example in https://stackoverflow.com/questions/34110178/can-a-default-service-module-in-a-google-app-engine-app-be-a-sibling-of-a-non-de/34111170#34111170 – Dan Cornilescu Aug 10 '17 at 13:54
  • Console-driven configurations are rather bad: un-friendly for automation, impossible to version-control, a nightmare to get help with on StackOverflow :) etc. – Dan Cornilescu Aug 10 '17 at 14:06