This document describes how to deploy an App Engine application to the App Engine flexible environment from within IntelliJ IDEA.
Before you begin
Follow the Create an App guide to install and set up Cloud Code as well as create an App Engine app for the flexible environment. Be sure to add App Engine flexible framework support.
If you don't have an application but still want to try these deployment procedures, download the sample app:
Clone the Spring Boot sample app to your local machine:
git clone https://github.com/spring-guides/gs-spring-boot
In IntelliJ, choose File > Open to open the file selector.
Navigate to
/gs-spring-boot/
.Select the
/complete/
directory.Click OK.
Creating the deployment configuration
Choose Tools > Cloud Code > App Engine > Deploy to App Engine.
Confirm the server configuration:
Click the ellipsis (...) next to the Server field.
In the dialog, verify that the Name field displays Google App Engine.
Click OK.
Select the Deployment source.
Cloud Code for IntelliJ supports deploying from a Maven artifact, an IntelliJ-specific artifact, or a filesystem JAR or WAR file.
- If you select a filesystem JAR or WAR file as your deployment source, click the ellipsis (...) next to the Deployment archive field to navigate to the deployment archive.
Select a project in the Project field.
The first time you configure the deployment, you will be prompted to sign in to the account associated with the Google Cloud console project that you want to deploy.
In the App Engine Flexible Configuration section, select a valid
app.yaml
file.- If you don't see a valid
app.yaml
file in the drop-down menu, click Edit to select a file. See the Update the App Engine flexible configurations section for more information.
- If you don't see a valid
Fill in other fields as needed to configure the deployment.
Click Run to build and deploy your app.
In the Application Servers window, click the name of your project to monitor its deployment progress. If the window is not displaying, click View > Tool Windows > Application Servers.
After deployment completes, you can view your app's URL in the console output.
Deploying to a custom runtime
You can modify your app.yaml
file to deploy your app to a custom runtime
using a Docker file.
In your
app.yaml
file, set your runtime to custom.As you complete the creating the deployment configuration steps, the App Engine Flexible Configuration section displays the path to your
app.yaml
and Docker file.Click Edit to select valid
app.yaml
and Docker files.Click the ellipsis (...) next to the
app.yaml
and the Dockerfile Directory fields to navigate to the appropriate files.Click OK.
Update the App Engine flexible configurations
After creating the initial deployment configuration, you can make changes to those configurations as needed by your application.
Select File > Project Structure.
The Project Structure dialog displays.
Under Project Settings, select Facets.
Select the App Engine flexible facet.
To select an
app.yaml
file, click the ellipsis (...) next to the app.yaml field to navigate to the location of a valid file.If you deploy to a custom runtime, click the ellipsis (...) next to the Dockerfile directory field to navigate to the location of a valid file.
Click OK.
Deleting the server
If you ever want to delete the server you configured for your project, you can do so as follows:
Choose File > Settings > Build, Execution, Deployment > Clouds.
On macOS, this is IntelliJ IDEA > Preferences > Build, Execution, Deployment > Clouds.
Select your server (App Engine) and click the minus sign (-) at the top of the window to remove it.
Click OK.
What's next
- You can add your project to Cloud Source Repositories if you haven't done so already.
Get support
To submit feedback or report an issue in your IntelliJ IDE, go to Tools > Cloud Code > Help / About > Submit feedback or report an issue to report an issue on GitHub.