Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



A Quickstart using our Sample Projects

We suggest that you try out one of the sample apps that we've reconfigured for Managed VMs. Download the sample source code from github, check out what's changed in the configuration file, and deploy the app to a VM.

Download the sample code and the App Engine SDK

The quickstart samples are available in Python, Go, and Java. Follow the link to download the code from GitHub. Click the App Engine SDK link and follow the instructions to download and install the SDK for your particular local development machine.

Python

Download the Python Hello World Quickstart
Download the App Engine Python SDK

Go

Download the Go Hello World Quickstart
Download the App Engine Go SDK

Complete the installation of the Go SDK by running the commands:
import GOPATH=$HOME/go
<sdk_path>/goapp get google.golang.org/appengine



Java

Download the Java Hello World Quickstart
Download the App Engine Java SDK

View the config file

The sample config file will start one instance of an n1-standard machine type. The lines that have been added/edited for managed VMs are in boldface.

Python

File: app.yaml
application: your-application-id
runtime: python27
vm: true
...
manual_scaling:
  instances: 1
vm_settings:
  machine_type: n1-standard-1
...

Go

File: app.yaml
application: your-application-id
runtime: go
vm: true
...
manual_scaling:
  instances: 1
vm_settings:
  machine_type: n1-standard-1
...

Java

File: appengine-web.xml

<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
  <application>your-application-id</application>
...
  <vm>true</vm>
  <vm-settings>
    <setting name="machine_type" value="n1-standard-1"/>
  </vm-settings>
  <manual-scaling>
    <instances>1</instances>
  </manual-scaling>
...
</appengine-web-app>

Deploy your app

Use the update command.

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 <app-directory>
  
Point your browser to http://<your-app-id>.appspot.com and test the app.

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 <app-directory>
  
Point your browser to http://<your-app-id>.appspot.com and test the app.

Java


You have to compile the source code first. Follow the directions in the README file, or use your preferred Java tooling to generate a WAR file to deploy. Then run the update command.

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>
Point your browser to http://<your-app-id>.appspot.com and test the app.

More Samples

Here are some other, more complex sample apps, already configured for deployment to managed VMs. See the README file for instructions on how to build and deploy each sample:

WebSocket chat (Java)
SQLite guestbook (Python)
Zombie Apocalypse Simulator (Python)
Sudoku Solver (Python)


Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.