Stay organized with collections Save and categorize content based on your preferences.
Deploy your app to upload and run it on App Engine. When you deploy your apps, you create versions of those apps and their corresponding services in App Engine. You can deploy entire apps, including all the source code and configuration files, or you can deploy and update individual versions or configuration files.
To programmatically deploy your apps, use the Admin API.
Before you beginBefore you can deploy your app:
The Owner of the Google Cloud project must create the App Engine application.
Ensure that your user account includes the required privileges.
Give Cloud Build permission to deploy apps in your project. When you deploy your app, App Engine uses Cloud Build to build the app into a container and deploy the container to the runtime in the app's region. Cloud Build does not have permission to deploy Java 8 apps by default, so you need to give permission before you can deploy apps.
To deploy your app using the Maven build tool, you must set up your project to use the Maven plugin for App Engine.
app-engine-java
component, and log in.To deploy your app with the gcloud CLI, you must download, install, and initialize the gcloud CLI.
If you already have the gcloud CLI installed and want to configure it to use a Google Cloud project ID other than the one that you initialized it to, see Managing gcloud CLI Configurations.
Using a proxyIf you are running the deployment command from a system which uses an HTTP or HTTPS proxy, you must configure the tool so that it can communicate via the proxy.
Run the following commands to configure the gcloud CLI:
gcloud config set proxy/type [PROXY_TYPE]
gcloud config set proxy/address [PROXY_ADDRESS]
gcloud config set proxy/port [PROXY_PORT]
You can also set a username
and password
for the proxy. For more information, see gcloud config.
To deploy your app to App Engine, use either the Maven build tool (recommended) or the gcloud app deploy
command from within the root directory of your application.
To deploy your app with the Maven build tool, run the following command from your project's top level directory, where the pom.xml
file is located:
mvn package appengine:deploy -Dapp.deploy.projectId=PROJECT_ID
Replace PROJECT_ID with the ID of your Google Cloud project. If your pom.xml
file already specifies your project ID, you don't need to include the -Dapp.deploy.projectId
property in the command you run.
.jar
files that do not define an App Engine service. The deployment command iterates through the root directory to deploy your services and will fail when configuration files are not found. Using gcloud command line
gcloud app deploy [CONFIGURATION_FILES]
Replace [CONFIGURATION_FILES]
with the path to one or more configuration files. Use a single white space to separate pathnames.
Optional flags:
--version
: Specifies a custom version ID. If you don't specify a version ID, App Engine generates one.--no-promote
: Deploys your app without automatically routing all traffic to that version. By default, each version that you deploy is automatically configured to receive 100% of traffic.--project
: Specifies an alternate Google Cloud project ID to what you initialized as the default in the gcloud CLI.For more information, see the gcloud app deploy
reference or run gcloud help
from the command line.
For manually-scaled instances, the ID of your version should begin with a letter to distinguish them from numeric instance IDs. This ensures that requests are routed to the correct destination and avoids the ambiguity with URL patterns like
123-dot-my-service.[REGION_ID].r.appspot.com
, which can be interpreted two ways:
123
exists, the request is routed to version 123
of the my-service
service.123
does not exist, the request is instead routed to instance ID 123
where the versions of the my-service
service are running.You can name your versions however you like for instances that are configured for auto scaling or basic scaling because targeting those instances is not supported.
Deploying multiple service applicationsWhen your application is factored into multiple services, you can deploy and update individually targeted services or all the services simultaneously. Deploying updates to services can include updating individual configuration files or updating the source code in the corresponding versions.
For example, you can deploy and create two versions in App Engine, where each version runs in their own service. The first version serves as the frontend service and the other as the backend of your app. You can then deploy individual configuration files to update only the settings of a service. You can also choose to deploy a new version to a service in order to update the source code of the frontend, backend, or both simultaneously.
Requirements for multiple servicesYou use the same deployment commands for deploying and updating the multiple services of your application with the following requirements:
You must initially deploy a version of your app to the default
service before you can create and deploy subsequent services.
You must specify the ID of your service in the appengine-web.xml
configuration file of the corresponding version. To specify the service ID, you include the module: [YOUR_SERVICE_ID]
element definition in each configuration file. By default, excluding this element definition from your configuration file deploys the version to the default
service.
You must specify all the corresponding appengine-web.xml
configuration files in your deployment command to simultaneously deploy multiple services. The default
service must be listed first.
From the root directory of the application where the configuration files are located, you run the deployment command and specify the relative paths and file names for each service's appengine-web.xml
file.
If the root directory of your project contains only your services, you can deploy all those services with a single Maven command.
The Maven deployment command iterates through each of your project's services to locate their configuration files and then deploy each service.
Important: If your project's root directory includes other Maven modules, EAR packages, or.jar
files that do not define an App Engine service, the command will fail when configuration files are not found.
To deploy multiple services using the Maven plugin:
pom.xml
file.Run the following command:
mvn package appengine:deploy -Dapp.deploy.projectId=PROJECT_ID
Replace PROJECT_ID with the ID of your Google Cloud project. If your pom.xml
file already specifies your project ID, you don't need to include the -Dapp.deploy.projectId
property in the command you run.
gcloud app deploy [CONFIGURATION_FILES]
Replace [CONFIGURATION_FILES]
with the path to one or more configuration files. Use a single white space to separate pathnames.
You will receive verification via the command line as each service is successfully deployed.
Viewing build logsCloud Build streams build and deploy logs that are viewable in the Cloud Build history section of the Google Cloud console. To view builds in the app's region, use the Region drop-down menu at the top of the page to choose the region you would like to filter by.
Updating indexesTo create or update the indexes that your apps use, upload the datastore-indexes.xml
configuration file to Datastore. Indexes that don't exist yet are created after that configuration file is uploaded.
It can take a while for Datastore to create all the indexes and therefore, those indexes won't be immediately available to App Engine. If your app is already configured to receive traffic, then exceptions can occur for queries that require an index which is still in the process of being built.
To avoid exceptions, you must allow time for all the indexes to build, for example:
Upload the index.xml
configuration file to Datastore before you deploy your version:
Upload the index.xml
file to Datastore:
gcloud datastore indexes create index.yamlFor information, see the
gcloud datastore
reference.Use the Google Cloud console to monitor the status of all your indexes:
After all your indexes are built, deploy the new version to App Engine.
Build your indexes before migrating or splitting traffic to your version:
appengine-web.xml
file.For more information about indexes, see Configuring Datastore Indexes.
TroubleshootingThe following are common error messages that you might encounter:
PERMISSION_DENIED: Operation not allowed
The "appengine.applications.create" permission is required.
gcloud app deploy
command can fail when it tries to run the gcloud app create
command. Only accounts with Owner role have the necessary permissions to create App Engine applications.
Command not found
Import Error
[400] The first service (module) you upload to a new application must be the 'default' service (module)
default
service. For details about how to deploy a version to the default
service, see Deploying multiple service applications.
Too Many Versions (403)
You do not have permission to modify this app (403)
appengine-web.xml
. Check your application ID is accurate and matches the value of your Google Cloud console project ID. Next, check the project permissions in the console and verify that your account is listed with a sufficient permission level to allow for deploying apps.
[13] An internal error occurred while creating a Cloud Storage bucket.
App Engine creates a default Cloud Storage multi-regional bucket on your behalf, on the same region where your application is created. This bucket is required to store the contents of your application. This error is returned when this bucket cannot be created, in the following scenarios:
The default App Engine service account is not present in your project. If your account was removed before 30 days elapsed since its deletion, you can restore it.
Your project is under an organization enforcing the constraints/gcp.resourceLocations
policy, and the organization is not allowing the creation of resources on the same region where your App Engine was created. You will need to override the enforced constraints/gcp.resourceLocations
policy for your project, and allow the multi-region locations on the same region where your App Engine app is created.
europe-west
region, even though the region maps to the europe-west1
locations, you will have to modify the constraint to allow resources in the in:eu-locations
, which includes all the EU
regional. If your App Engine application is created on US
and ASIA
regions, you would have to allow in:us-locations
or in:asia-locations
, respectively.
[13] An internal error occurred
This error can occur if the App Engine's app.yaml
configuration file contains an invalid resource name
under the vpc_access_connector
key. Make sure that the name
field contains the correct project and region where your Serverless VPC Access connector is created.
If the issue persists after ensuring your app.yaml
configuration is valid, use the Google Cloud SDK to re-deploy your service, adding the --verbosity=debug
flag, and contact Cloud Support by providing the command's output.
If your deployment fails, make sure the Cloud Build API is enabled in your project. App Engine enables this API automatically the first time you deploy an app, but if someone has since disabled the API, deployments will fail.
gcloud app deploy
command line arguments and flags.Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["Deploying apps to App Engine involves creating versions and services, with options to deploy entire apps or update individual components like versions or configuration files."],["Before deploying, the Google Cloud project owner must create the App Engine application, ensure user privileges are set, and grant Cloud Build permission to deploy the app."],["The recommended way to deploy apps is using the Maven build tool, which requires project setup with the Maven plugin for App Engine and includes installation of the gcloud CLI and its app-engine-java component."],["Apps can also be deployed with the gcloud CLI, where you can set up proxy configurations if necessary, using the `gcloud app deploy` command with optional flags to specify version IDs, control traffic routing, or specify an alternate project ID."],["Deploying applications with multiple services requires initially deploying a version to the `default` service, specifying service IDs in `appengine-web.xml`, and including all corresponding configuration files in the deployment command, where Maven can deploy all services in a project with a single command."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4