From 858742470679b7666e542fd20c2e13607b992e6e Mon Sep 17 00:00:00 2001 From: Jonathan Simon Date: Wed, 27 Apr 2016 16:58:36 -0700 Subject: [PATCH] Replaced queue.xml with queue.yaml --- .../pull/src/main/webapp/WEB-INF/queue.xml | 10 ---------- .../pull/src/main/webapp/WEB-INF/queue.yaml | 7 +++++++ taskqueue/pull/README.md | 14 ++++++-------- 3 files changed, 13 insertions(+), 18 deletions(-) delete mode 100644 appengine/taskqueue/pull/src/main/webapp/WEB-INF/queue.xml create mode 100644 appengine/taskqueue/pull/src/main/webapp/WEB-INF/queue.yaml diff --git a/appengine/taskqueue/pull/src/main/webapp/WEB-INF/queue.xml b/appengine/taskqueue/pull/src/main/webapp/WEB-INF/queue.xml deleted file mode 100644 index 6653b5ad7c7..00000000000 --- a/appengine/taskqueue/pull/src/main/webapp/WEB-INF/queue.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - pull-queue - pull - - bar@foo.com - bar@foo.com - - - diff --git a/appengine/taskqueue/pull/src/main/webapp/WEB-INF/queue.yaml b/appengine/taskqueue/pull/src/main/webapp/WEB-INF/queue.yaml new file mode 100644 index 00000000000..e0c1aadd10b --- /dev/null +++ b/appengine/taskqueue/pull/src/main/webapp/WEB-INF/queue.yaml @@ -0,0 +1,7 @@ +queue: +- name: pull-queue + mode: pull + acl: + - user_email: bar@foo.com # can list, get, lease, delete, and update tasks + - writer_email: user@gmail.com # can insert tasks + - writer_email: bar@foo.com # can insert tasks, in addition to rights granted by being a user_email above diff --git a/taskqueue/pull/README.md b/taskqueue/pull/README.md index 8abbe8f34ed..9837eed8785 100644 --- a/taskqueue/pull/README.md +++ b/taskqueue/pull/README.md @@ -14,26 +14,24 @@ to create one first and then come back and run this sample. reuse an existing project by clicking on it. 1. Note: You will need to enable billing for the project to use Compute Engine. - 1. Click "Overview" in the left-side navigation menu and copy your Project ID - for use in step 3.3 below. 1. Authentication instructions to run the sample (on your local machine or on a Compute Engine VM): * Running the sample locally on your development machine: 1. Install [Google Cloud SDK](https://cloud.google.com/sdk/) 1. Run the following command to authorize the Cloud SDK and configure your project:
gcloud init
- 1. Add your authenticated email account as <user-email> and <writer-email> elements to the queue.xml file of the App Engine app that created the pull queue task you're trying to access. For more details, please see - [Defining Pull Queues](https://cloud.google.com/appengine/docs/java/config/queue#Defining_Pull_Queues) - on the Task Queue configuration page. + 1. Add your authenticated email account as 'user_email' and 'writer_email' elements to the queue.yaml + file of the App Engine app that created the pull queue task you're trying to access. For more details, please see + [Defining Pull Queues](https://cloud.google.com/appengine/docs/java/taskqueue/overview-pull#Java_Defining_pull_queues). * Running the sample on a Google Compute Engine VM using Default Application Credentials: 1. Create a service account and add it to queue.xml 1. In the API Manager > [Credentials](https://pantheon.corp.google.com/apis/credentials) section click "Create credentials" and choose "Service account key". 1. On the "Create service account key" page, select "Compute Engine default service account" from the "Service Account" drop-down menu. Leave the Key type set to JSON and click the "Create" button. 1. Once the service account is created, click the "Manage service accounts" link and copy the "Service account ID" of the "Compute Engine default service account". - 1. Add the "Service account ID" as <user-email> and <writer-email> elements to the queue.xml file of the App Engine app that created the pull queue task you're trying to access. For more details, please see - [Defining Pull Queues](https://cloud.google.com/appengine/docs/java/config/queue#Defining_Pull_Queues) - on the Task Queue configuration page. + 1. Add the "Service account ID" as 'user_email' and 'writer_email' elements to the queue.yaml file of the + App Engine app that created the pull queue task you're trying to access. For more details, please see + [Defining Pull Queues](https://cloud.google.com/appengine/docs/java/taskqueue/overview-pull#Java_Defining_pull_queues). 1. Create a Compute Engine VM Instance. 1. In the [Cloud Console](https://console.cloud.google.com/project)