Skip to content

Commit

Permalink
Changed App Identity sample to use Managed VMs.
Browse files Browse the repository at this point in the history
  • Loading branch information
tswast committed Dec 14, 2015
1 parent 580b669 commit a4111dd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
15 changes: 9 additions & 6 deletions appengine/appidentity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,29 @@
This sample demonstrates how to use the App Identity APIs on Google App Engine

## Running locally
$ mvn appengine:devserver
This example uses the
[Maven gcloud plugin](https://cloud.google.com/appengine/docs/java/managed-vms/maven).
To run this sample locally:

$ mvn gcloud:run

## Deploying
In the following command, replace YOUR-PROJECT-ID with your
[Google Cloud Project ID](https://developers.google.com/console/help/new/#projectnumber)
and YOUR-VERSION with a suitable version identifier.

$ mvn appengine:update -Dappengine.appId=YOUR-PROJECT-ID -Dappengine.version=YOUR-VERSION
$ mvn gcloud:deploy -Dversion=YOUR-VERSION -Dgcloud_project=YOUR-PROJECT-ID

## Setup
To save your project settings so that you don't need to enter the
`-Dappengine.appId=YOUR-CLOUD-PROJECT-ID` or
`-Dappengine.version=YOUR-VERSION-NAME` parameters, you can make the following
changes:
`-Dgcloud_project=YOUR-CLOUD-PROJECT-ID` or `-Dversion=YOUR-VERSION-NAME`
parameters, you can make the following changes:

1. Update the <application> tag in src/main/webapp/WEB-INF/appengine-web.xml with your project name
1. Update the <version> tag in src/main/webapp/WEB-INF/appengine-web.xml with your version name

You will now be able to run

$ mvn appengine:update
$ mvn gcloud:deploy

without the need for any additional paramters.
4 changes: 2 additions & 2 deletions appengine/appidentity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ Copyright 2015 Google Inc. All Rights Reserved.
</plugin>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>${appengine.target.version}</version>
<artifactId>gcloud-maven-plugin</artifactId>
<version>2.0.9.90.v20151210</version>
</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
<application>YOUR-PROJECT-ID</application>
<version>YOUR-VERSION-ID</version>
<threadsafe>true</threadsafe>
<vm>true</vm>
</appengine-web-app>

0 comments on commit a4111dd

Please sign in to comment.