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

What's hot (20)

PDF
Composer
Naseer Ahmad
 
PPTX
Devopstore
Farkhad Badalov
 
PDF
Continuous Integration
Joerg Henning
 
PPT
Dockerizing BDD : Ruby-Cucumber Example
Shashikant Jagtap
 
PDF
Serverless Preview Environments @ Boston DevOps
Joseph Lust
 
PDF
Configuration Management - Finding the tool to fit your needs
SaltStack
 
PPTX
Prometheus and Grafana
Lhouceine OUHAMZA
 
PPTX
Lightning branches at RedMart (Js conf Asia 2014 Talk)
Ritesh Angural
 
PDF
perlbrew yapcasia 2010
Kang-min Liu
 
PPTX
RedMart Migrating from EC2 to VPC with Chef
Ritesh Angural
 
PDF
Continuous Integration for your Android projects
Sergii Zhuk
 
PDF
GraalVM Overview Compact version
scalaconfjp
 
PDF
Vagrant up-and-running
Joe Ferguson
 
PDF
Composer and Git in Magento
SWIFTotter Solutions
 
PDF
Automated android testing using jenkins ci
sveinungkb
 
PPTX
Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
Udaya Kiran
 
PPTX
Pipeline as code using Jenkins -Ministry of Testing
Swapnil Jadhav
 
KEY
RoR app screencast
Ashish Sharma
 
PDF
Linux Kernel Selftest Framework - Quality Control for New Releases
Samsung Open Source Group
 
PDF
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)
Igalia
 
Composer
Naseer Ahmad
 
Devopstore
Farkhad Badalov
 
Continuous Integration
Joerg Henning
 
Dockerizing BDD : Ruby-Cucumber Example
Shashikant Jagtap
 
Serverless Preview Environments @ Boston DevOps
Joseph Lust
 
Configuration Management - Finding the tool to fit your needs
SaltStack
 
Prometheus and Grafana
Lhouceine OUHAMZA
 
Lightning branches at RedMart (Js conf Asia 2014 Talk)
Ritesh Angural
 
perlbrew yapcasia 2010
Kang-min Liu
 
RedMart Migrating from EC2 to VPC with Chef
Ritesh Angural
 
Continuous Integration for your Android projects
Sergii Zhuk
 
GraalVM Overview Compact version
scalaconfjp
 
Vagrant up-and-running
Joe Ferguson
 
Composer and Git in Magento
SWIFTotter Solutions
 
Automated android testing using jenkins ci
sveinungkb
 
Behavioural Testing Ruby/Rails Apps @ Scale - Rspec & Cucumber
Udaya Kiran
 
Pipeline as code using Jenkins -Ministry of Testing
Swapnil Jadhav
 
RoR app screencast
Ashish Sharma
 
Linux Kernel Selftest Framework - Quality Control for New Releases
Samsung Open Source Group
 
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)
Igalia
 

Viewers also liked (18)

PDF
Open street map
Michelantonio Trizio
 
PPTX
Write less code: use Firebase (Auth and Notifications)!
Paolo Rotolo
 
PDF
Startup weekend bootcamp
Michelantonio Trizio
 
PPTX
Lição 5 - A Evangelização Urbana e suas Estratégias
I.A.D.F.J - SAMAMABAIA SUL
 
PPT
Presentazione Assetto - Forum PA 2014
Apulian ICT Living Labs
 
PPTX
mMap SDK Geospatial Presentation Engine 2014 Release
Olav Sylthe
 
PDF
Introduction to Functional Programming
Francesco Bruni
 
PDF
Best Way to Write SQL in Java
Gerger
 
PDF
Rethink programming: a functional approach
Francesco Bruni
 
PDF
Play Framework on Google App Engine
Fred Lin
 
ODP
Java 9 - кратко о новом
Леонид Ставила
 
PDF
Serverless computing with AWS Lambda
Apigee | Google Cloud
 
PDF
Basic NLP with Python and NLTK
Francesco Bruni
 
PDF
슬로우캠퍼스 - 안드로이드 개발자들이여 Firebase로 날아보자 :)
마이캠퍼스
 
PDF
Continuous Integration/Deployment with Docker and Jenkins
Francesco Bruni
 
PDF
시에프와 타이포 피티 최종
Young Ok Joeng
 
PPTX
Canada
Denial Lee
 
PDF
Angular 4 for Java Developers
Yakov Fain
 
Open street map
Michelantonio Trizio
 
Write less code: use Firebase (Auth and Notifications)!
Paolo Rotolo
 
Startup weekend bootcamp
Michelantonio Trizio
 
Lição 5 - A Evangelização Urbana e suas Estratégias
I.A.D.F.J - SAMAMABAIA SUL
 
Presentazione Assetto - Forum PA 2014
Apulian ICT Living Labs
 
mMap SDK Geospatial Presentation Engine 2014 Release
Olav Sylthe
 
Introduction to Functional Programming
Francesco Bruni
 
Best Way to Write SQL in Java
Gerger
 
Rethink programming: a functional approach
Francesco Bruni
 
Play Framework on Google App Engine
Fred Lin
 
Java 9 - кратко о новом
Леонид Ставила
 
Serverless computing with AWS Lambda
Apigee | Google Cloud
 
Basic NLP with Python and NLTK
Francesco Bruni
 
슬로우캠퍼스 - 안드로이드 개발자들이여 Firebase로 날아보자 :)
마이캠퍼스
 
Continuous Integration/Deployment with Docker and Jenkins
Francesco Bruni
 
시에프와 타이포 피티 최종
Young Ok Joeng
 
Canada
Denial Lee
 
Angular 4 for Java Developers
Yakov Fain
 
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
Institut Teknologi Sepuluh Nopember Surabaya
 
PPTX
Google Cloud Platform
Francesco Marchitelli
 
PPTX
Unit 5.pptx
ssuserbb23da
 
PDF
Google App Engine for Java
Lars Vogel
 
PPT
Google App Engine for Java
Lars Vogel
 
PPTX
Deploying applications to Cloud with Google App Engine
Alexander Zamkovyi
 
PPTX
10 Reasons Why You Should Consider Google App Engine (GAE) for Your Next Project
Abeer R
 
PDF
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
wesley chun
 
PDF
Google App Engine
Software Park Thailand
 
PDF
Serverless Computing with Google Cloud
wesley chun
 
PDF
GCP overview
Chandan Kumar Rana
 
PDF
Javaedge 2010-cschalk
Chris Schalk
 
PPT
Introduction to Google App Engine
rajdeep
 
PDF
Google app engine
Pawandeep Singh
 
PDF
What's new in App Engine and intro to App Engine for Business
Chris Schalk
 
PPTX
Introduction to Google Cloud Services / Platforms
Nilanchal
 
PPT
App_Engine_PPT..........................
HassamShahid2
 
PPT
App_Engine_PPT.ppt
Pikachu925105
 
PPT
APP engine regarding Google app engine presentation
soundharya59
 
How to deploy your Apps in serverless-way using App Engine.pptx
Institut Teknologi Sepuluh Nopember Surabaya
 
Google Cloud Platform
Francesco Marchitelli
 
Unit 5.pptx
ssuserbb23da
 
Google App Engine for Java
Lars Vogel
 
Google App Engine for Java
Lars Vogel
 
Deploying applications to Cloud with Google App Engine
Alexander Zamkovyi
 
10 Reasons Why You Should Consider Google App Engine (GAE) for Your Next Project
Abeer R
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
wesley chun
 
Google App Engine
Software Park Thailand
 
Serverless Computing with Google Cloud
wesley chun
 
GCP overview
Chandan Kumar Rana
 
Javaedge 2010-cschalk
Chris Schalk
 
Introduction to Google App Engine
rajdeep
 
Google app engine
Pawandeep Singh
 
What's new in App Engine and intro to App Engine for Business
Chris Schalk
 
Introduction to Google Cloud Services / Platforms
Nilanchal
 
App_Engine_PPT..........................
HassamShahid2
 
App_Engine_PPT.ppt
Pikachu925105
 
APP engine regarding Google app engine presentation
soundharya59
 
Ad

More from Michelantonio Trizio (7)

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

Recently uploaded (20)

PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
PPTX
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PPTX
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Tally software_Introduction_Presentation
AditiBansal54083
 
Human Resources Information System (HRIS)
Amity University, Patna
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 

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