Applications that run in the Managed VM environment use the same configuration
files and syntax as applications that run in the sandbox. Python and Go
apps use an
app.yaml
file, and Java apps use an
appengine-web.xml
file.
When designing your app, you can factor work into one or more modules. Each module can be independently configured to run within the App Engine hosting environment or the Managed VM hosting environment. All the instances of a module will use the same environment. You can mix and match your modules' environments according to the needs of each module in your app.
You must configure the VM hosting environment separately for each module that uses managed VMs. Two new configuration sections exist specifically for VMs: VM settings and health checking.
Hosting Environment and Runtime
Python
The
vm
and
runtime
keys are required:
vm: true runtime: python27
Go
The
vm
and
runtime
keys are required:
vm: true runtime: go
Java
The
<vm>
element is required (no runtime is needed since the xml config file implies Java):
<vm>true</vm>
Scaling
Python
You must specify manual scaling and the initial number of instances in the configuration file. Auto-scaling is currently not available within the Managed VM hosting environment (but will be supported in a future release).
manual_scaling: instances: 1
Go
You must specify manual scaling and the initial number of instances in the configuration file. Auto-scaling is currently not available within the Managed VM hosting environment (but will be supported in a future release).
manual_scaling: instances: 1
Java
You must specify manual scaling and the initial number of instances in the configuration file. Auto-scaling is currently not available within the Managed VM hosting environment (but will be supported in a future release).
<manual-scaling> <instances>1</instances> </manual-scaling>
VM Settings
The VM Settings section of the config file applies to the underlying VM.
Python
You can specify any of the standard GCE machine types . (However, the shared-core f1-micro and g1-small types are not allowed).
You can add additional third party software packages by using the
apt_get_install
key. The value is a space-delimited list of packages that
you want to install on the VM.
vm_settings: machine_type: n1-standard apt_get_install: redis-server vim