SlideShare a Scribd company logo
How to deploy a Java application on Google App Engine
Flexible Environment
About App Engine
● Paas (Platform as a Service)
● Support several languages and frameworks
● Divided into 2 environment: standard and flexible
Flexible vs Standard
FLEXIBLE STANDARD
Run into Docker containers Run in specialized sandbox
Supported languages: Python, Java,
Node.js, Go, Ruby, PHP and .NET or other
programming languages Running custom
runtime in another Docker container
Supported languages: Python 2.7, Java 7,
PHP 5.5, Go 1.6
Paid Free or low cost (Pay as you Go)
Fit for dependencies from other software,
including operating system packages such
as imagemagick, ffmpeg, etc...
Fit for experiences with sudden and
extreme spikes of traffic which require
immediate scaling
Comparing features (1)
FEATURE FLEXIBLE STANDARD
Instance startup time Minutes Milliseconds
Maximum request timeout 60 minutes 60 seconds
Background threads Yes Yes, with restrictions
Background processes Yes No
SSH debugging Yes No
Scaling Manual, Automatic Manual, Basic, Automatic
Comparing features (2)
FEATURE FLEXIBLE STANDARD
Writing to local disk Yes, ephemeral (disk initialized
on each VM startup)
No
Modifying the runtime Yes (through Dockerfile) No
Automatic in-place
security patches
Yes (excludes container image
runtime)
Yes
Network access Yes via App Engine services
Comparing features (3)
FEATURE FLEXIBLE STANDARD
Supports installing
third-party binaries
Yes No
Location North America or Asia Pacific North America, Asia
Pacific, or Europe
Pricing Based on usage of vCPU,
memory, and persistent disks
Based on instance hours
Quickstart
1. Requirements: Java 8, Maven 3.3.9 and git installed
2. Download App Engine SDK for Java
3. Go to App Engine console and create a project
4. From our console run:
git clone https://github.com/GoogleCloudPlatform/getting-started-java
cd getting-started-java/helloworld-servlet
mvn jetty:run-exploded
5. Open browser at:
http://localhost:8080
6. From our console run:
gcloud config set project [YOUR_PROJECT_ID]
mvn appengine:deploy
7. Open browser at:
https://[YOUR_PROJECT_ID].appspot.com
Flex Env overview
Application
Service
Version
Instance
Project structure
overview
Java Controller
App.yaml
Pom.xml
App.yaml
General settings
runtime: java
env: flex
service: service_name
skip_files: regex
handlers:
- url: /.*
script: this field is required, but ignored
App.yaml
Optional runtime config
#Jetty 9 (with servlet 3.1 support)
runtime_config:
jdk: openjdk8
server: jetty9
#Java 8
runtime_config:
jdk: openjdk8
App.yaml
Network settings
network:
instance_tag: TAG_NAME
name: NETWORK_NAME #default default
subnetwork_name: SUBNETWORK_NAME
forwarded_ports:
- PORT
- HOST_PORT:CONTAINER_PORT
- PORT/tcp
- HOST_PORT:CONTAINER_PORT/udp
App.yaml
Resource settings
resources:
cpu: 2
memory_gb: 2.3
disk_size_gb: 10
volumes:
- name: ramdisk1
volume_type: tmpfs
size_gb: 0.5
App.yaml
Health check settings
health_check:
enable_health_check: True
check_interval_sec: 5
timeout_sec: 4
unhealthy_threshold: 2
healthy_threshold: 2
App.yaml
scaling settings
#automatic scaling
automatic_scaling:
min_num_instances: 5
max_num_instances: 20
cool_down_period_sec: 120 # default value
cpu_utilization:
target_utilization: 0.5
#Manual scaling
manual_scaling:
instances: 5
App.yaml
Servlet 3.1 & env
variables settings
#Servlet 3.1
beta_settings:
java_quickstart: true
#environment variables
env_variables:
MY_VAR: 'my value'
Understand VM instance containers
1. Go to VM instance page
2. Open SSH from the drop-down list
3. In the terminal run:
sudo docker ps
sudo docker logs [CONTAINER-NAME]
container_exec [CONTAINER-NAME] /bin/bash
CONTAINER DESCRIPTION
Your container app Container with you app
fluentd_logger Logging alert
memcached_proxy Provide memcache
functionality
nginx_proxy Proxies requests to the
application
Domande?

More Related Content

PDF
How to write a Dockerfile
PDF
Sep Nasiri "Upwork PHP Architecture"
PDF
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
PPTX
Gulp and bower Implementation
PPTX
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
PPTX
Drupal 8 - Improving your development workflow
PPTX
Composer
KEY
Perlbrew
How to write a Dockerfile
Sep Nasiri "Upwork PHP Architecture"
Александр Махомет "Feature Flags. Уменьшаем риски при выпуске изменений"
Gulp and bower Implementation
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
Drupal 8 - Improving your development workflow
Composer
Perlbrew

What's hot (20)

PDF
Composer
PPTX
Devopstore
PDF
Continuous Integration
PPT
Dockerizing BDD : Ruby-Cucumber Example
PDF
Serverless Preview Environments @ Boston DevOps
PDF
Configuration Management - Finding the tool to fit your needs
PPTX
Prometheus and Grafana
PPTX
Lightning branches at RedMart (Js conf Asia 2014 Talk)
PDF
perlbrew yapcasia 2010
PPTX
RedMart Migrating from EC2 to VPC with Chef
PDF
Continuous Integration for your Android projects
PDF
GraalVM Overview Compact version
PDF
Vagrant up-and-running
PDF
Composer and Git in Magento
PDF
Automated android testing using jenkins ci
PPTX
Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
PPTX
Pipeline as code using Jenkins -Ministry of Testing
KEY
RoR app screencast
PDF
Linux Kernel Selftest Framework - Quality Control for New Releases
PDF
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)
Composer
Devopstore
Continuous Integration
Dockerizing BDD : Ruby-Cucumber Example
Serverless Preview Environments @ Boston DevOps
Configuration Management - Finding the tool to fit your needs
Prometheus and Grafana
Lightning branches at RedMart (Js conf Asia 2014 Talk)
perlbrew yapcasia 2010
RedMart Migrating from EC2 to VPC with Chef
Continuous Integration for your Android projects
GraalVM Overview Compact version
Vagrant up-and-running
Composer and Git in Magento
Automated android testing using jenkins ci
Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
Pipeline as code using Jenkins -Ministry of Testing
RoR app screencast
Linux Kernel Selftest Framework - Quality Control for New Releases
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)
Ad

Viewers also liked (18)

PDF
Open street map
PPTX
Write less code: use Firebase (Auth and Notifications)!
PDF
Startup weekend bootcamp
PPTX
Lição 5 - A Evangelização Urbana e suas Estratégias
PPT
Presentazione Assetto - Forum PA 2014
PPTX
mMap SDK Geospatial Presentation Engine 2014 Release
PDF
Introduction to Functional Programming
PDF
Best Way to Write SQL in Java
PDF
Rethink programming: a functional approach
PDF
Play Framework on Google App Engine
ODP
Java 9 - кратко о новом
PDF
Serverless computing with AWS Lambda
PDF
Basic NLP with Python and NLTK
PDF
슬로우캠퍼스 - 안드로이드 개발자들이여 Firebase로 날아보자 :)
PDF
Continuous Integration/Deployment with Docker and Jenkins
PDF
시에프와 타이포 피티 최종
PPTX
Canada
PDF
Angular 4 for Java Developers
Open street map
Write less code: use Firebase (Auth and Notifications)!
Startup weekend bootcamp
Lição 5 - A Evangelização Urbana e suas Estratégias
Presentazione Assetto - Forum PA 2014
mMap SDK Geospatial Presentation Engine 2014 Release
Introduction to Functional Programming
Best Way to Write SQL in Java
Rethink programming: a functional approach
Play Framework on Google App Engine
Java 9 - кратко о новом
Serverless computing with AWS Lambda
Basic NLP with Python and NLTK
슬로우캠퍼스 - 안드로이드 개발자들이여 Firebase로 날아보자 :)
Continuous Integration/Deployment with Docker and Jenkins
시에프와 타이포 피티 최종
Canada
Angular 4 for Java Developers
Ad

Similar to How to deploy a Java application on Google App engine Flexible environment (20)

PPTX
How to deploy your Apps in serverless-way using App Engine.pptx
PPTX
Google Cloud Platform
PPTX
Unit 5.pptx
PDF
Google App Engine for Java
PPT
Google App Engine for Java
PPTX
Deploying applications to Cloud with Google App Engine
PPTX
10 Reasons Why You Should Consider Google App Engine (GAE) for Your Next Project
PDF
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
PDF
Google App Engine
PDF
Serverless Computing with Google Cloud
PDF
GCP overview
PDF
Javaedge 2010-cschalk
PPT
Introduction to Google App Engine
PDF
Google app engine
PDF
What's new in App Engine and intro to App Engine for Business
PPTX
Introduction to Google Cloud Services / Platforms
PPT
App_Engine_PPT..........................
PPT
App_Engine_PPT.ppt
PPT
APP engine regarding Google app engine presentation
PPT
App_Engine_PPT.ppt
How to deploy your Apps in serverless-way using App Engine.pptx
Google Cloud Platform
Unit 5.pptx
Google App Engine for Java
Google App Engine for Java
Deploying applications to Cloud with Google App Engine
10 Reasons Why You Should Consider Google App Engine (GAE) for Your Next Project
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Google App Engine
Serverless Computing with Google Cloud
GCP overview
Javaedge 2010-cschalk
Introduction to Google App Engine
Google app engine
What's new in App Engine and intro to App Engine for Business
Introduction to Google Cloud Services / Platforms
App_Engine_PPT..........................
App_Engine_PPT.ppt
APP engine regarding Google app engine presentation
App_Engine_PPT.ppt

More from Michelantonio Trizio (7)

PDF
[App devcon 18] Brace yourself with Android Architecture Components
PDF
Android Architecture components
PDF
Primi passi con Project Tango
PDF
Droidcon Turin 2015 - Android wear sdk introduction
PDF
Fonti informative sugli Open Data
PDF
About open data
PDF
20131123 open bsk@open
[App devcon 18] Brace yourself with Android Architecture Components
Android Architecture components
Primi passi con Project Tango
Droidcon Turin 2015 - Android wear sdk introduction
Fonti informative sugli Open Data
About open data
20131123 open bsk@open

Recently uploaded (20)

PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
System and Network Administration Chapter 2
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
history of c programming in notes for students .pptx
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Nekopoi APK 2025 free lastest update
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
medical staffing services at VALiNTRY
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Odoo Companies in India – Driving Business Transformation.pdf
System and Network Administration Chapter 2
Design an Analysis of Algorithms I-SECS-1021-03
history of c programming in notes for students .pptx
Operating system designcfffgfgggggggvggggggggg
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
How to Choose the Right IT Partner for Your Business in Malaysia
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Design an Analysis of Algorithms II-SECS-1021-03
Odoo POS Development Services by CandidRoot Solutions
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Wondershare Filmora 15 Crack With Activation Key [2025
Nekopoi APK 2025 free lastest update
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
medical staffing services at VALiNTRY
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Internet Downloader Manager (IDM) Crack 6.42 Build 41

How to deploy a Java application on Google App engine Flexible environment

  • 1. How to deploy a Java application on Google App Engine Flexible Environment
  • 2. About App Engine ● Paas (Platform as a Service) ● Support several languages and frameworks ● Divided into 2 environment: standard and flexible
  • 3. Flexible vs Standard FLEXIBLE STANDARD Run into Docker containers Run in specialized sandbox Supported languages: Python, Java, Node.js, Go, Ruby, PHP and .NET or other programming languages Running custom runtime in another Docker container Supported languages: Python 2.7, Java 7, PHP 5.5, Go 1.6 Paid Free or low cost (Pay as you Go) Fit for dependencies from other software, including operating system packages such as imagemagick, ffmpeg, etc... Fit for experiences with sudden and extreme spikes of traffic which require immediate scaling
  • 4. Comparing features (1) FEATURE FLEXIBLE STANDARD Instance startup time Minutes Milliseconds Maximum request timeout 60 minutes 60 seconds Background threads Yes Yes, with restrictions Background processes Yes No SSH debugging Yes No Scaling Manual, Automatic Manual, Basic, Automatic
  • 5. Comparing features (2) FEATURE FLEXIBLE STANDARD Writing to local disk Yes, ephemeral (disk initialized on each VM startup) No Modifying the runtime Yes (through Dockerfile) No Automatic in-place security patches Yes (excludes container image runtime) Yes Network access Yes via App Engine services
  • 6. Comparing features (3) FEATURE FLEXIBLE STANDARD Supports installing third-party binaries Yes No Location North America or Asia Pacific North America, Asia Pacific, or Europe Pricing Based on usage of vCPU, memory, and persistent disks Based on instance hours
  • 7. Quickstart 1. Requirements: Java 8, Maven 3.3.9 and git installed 2. Download App Engine SDK for Java 3. Go to App Engine console and create a project 4. From our console run: git clone https://github.com/GoogleCloudPlatform/getting-started-java cd getting-started-java/helloworld-servlet mvn jetty:run-exploded 5. Open browser at: http://localhost:8080 6. From our console run: gcloud config set project [YOUR_PROJECT_ID] mvn appengine:deploy 7. Open browser at: https://[YOUR_PROJECT_ID].appspot.com
  • 10. App.yaml General settings runtime: java env: flex service: service_name skip_files: regex handlers: - url: /.* script: this field is required, but ignored
  • 11. App.yaml Optional runtime config #Jetty 9 (with servlet 3.1 support) runtime_config: jdk: openjdk8 server: jetty9 #Java 8 runtime_config: jdk: openjdk8
  • 12. App.yaml Network settings network: instance_tag: TAG_NAME name: NETWORK_NAME #default default subnetwork_name: SUBNETWORK_NAME forwarded_ports: - PORT - HOST_PORT:CONTAINER_PORT - PORT/tcp - HOST_PORT:CONTAINER_PORT/udp
  • 13. App.yaml Resource settings resources: cpu: 2 memory_gb: 2.3 disk_size_gb: 10 volumes: - name: ramdisk1 volume_type: tmpfs size_gb: 0.5
  • 14. App.yaml Health check settings health_check: enable_health_check: True check_interval_sec: 5 timeout_sec: 4 unhealthy_threshold: 2 healthy_threshold: 2
  • 15. App.yaml scaling settings #automatic scaling automatic_scaling: min_num_instances: 5 max_num_instances: 20 cool_down_period_sec: 120 # default value cpu_utilization: target_utilization: 0.5 #Manual scaling manual_scaling: instances: 5
  • 16. App.yaml Servlet 3.1 & env variables settings #Servlet 3.1 beta_settings: java_quickstart: true #environment variables env_variables: MY_VAR: 'my value'
  • 17. Understand VM instance containers 1. Go to VM instance page 2. Open SSH from the drop-down list 3. In the terminal run: sudo docker ps sudo docker logs [CONTAINER-NAME] container_exec [CONTAINER-NAME] /bin/bash CONTAINER DESCRIPTION Your container app Container with you app fluentd_logger Logging alert memcached_proxy Provide memcache functionality nginx_proxy Proxies requests to the application