Download the SDK
The latest App Engine SDKs allow you to deploy applications to managed VMs. Download the SDK for your language:
Google App Engine SDK for Python
Google App Engine SDK for Go
Google App Engine SDK for Java
Special Instructions for Java Developers
Before you can run or deploy a Java app, you must compile the source code. Use your preferred Java tooling to generate a WAR file.
Special Instructions for Go Developers
Before you begin writing code:
-
We recommend that you include a
GOPATH
environment variable in your set up. It makes the go
get command much more useful. Many Go developers include this command in their
.bashrc
files:export GOPATH=$HOME/go
-
You must retrieve the open source managed VM tooling that
goes with the SDK. Run this command:
<path_to_go_sdk>/goapp get google.golang.org/appengine
-
Check your appengine import statements; you should not use
relative paths. Change
appengine
togoogle.golang.org/appengine
,appengine/datastore
togoogle.golang.org/appengine/datastore
, and so forth.
Developing locally
You can test your Java code on your local machine. At this time, the Python and Go SDKs do not include a local development server that can run VM-enabled applications. You must deploy your Python and Go apps to test them.
Python
The Python SDK does not include a local development server that can run VM-enabled applications. You must deploy your Python app to test it.Go
The Go SDK does not include a local development server that can run VM-enabled applications. You must deploy your Go app to test it.Java
To run a VM-enabled Java app locally, start the local Java development server with this command:<java_sdk_path>/dev_appserver.py <project-WAR-directory>
Deploying to production
Use the
update
command to deploy your application to the Google Cloud Platform.
Python
If you have two-step verification enabled on your Google account, add the
--oauth2
flag, otherwise, you will need to provide an application password.
<python_sdk_path>appcfg.py -s preview.appengine.google.com update <project-directory>
Go
If you have two-step verification enabled on your Google account, add the
--oauth2
flag, otherwise, you will need to provide an application password.
<go_sdk_path>appcfg.py -s preview.appengine.google.com update <project-directory>
Java
If you have two-step verification enabled on your Google account, add the
--oauth2
flag, otherwise, you will need to provide an application password.
<java_sdk_path>appcfg.sh -s preview.appengine.google.com update <EAR-or-WAR-directory>