Slide 1

Slide 1 text

Deploying your web Deploying your web app to Google Cloud app to Google Cloud

Slide 2

Slide 2 text

About Me About Me Co-Founder/CTO Skygarden Co-Founder/CTO Skygarden Google Developer Expert for Cloud. Google Developer Expert for Cloud.

Slide 3

Slide 3 text

App Engine Standard App Engine Flex Google Kubernetes Engine Google Cloud Functions Agenda

Slide 4

Slide 4 text

Title Text Title Text

Slide 5

Slide 5 text

Google's Platform as a Service

Slide 6

Slide 6 text

Google's Platform as a Service Runs on Google's Infrastructure

Slide 7

Slide 7 text

Google's Platform as a Service Runs on Google's Infrastructure Has support for multiple runtimes

Slide 8

Slide 8 text

Google's Platform as a Service Runs on Google's Infrastructure Has support for multiple runtimes No Ops

Slide 9

Slide 9 text

Google's Platform as a Service Runs on Google's Infrastructure Has support for multiple runtimes No Ops Has Standard and Flexible Environments

Slide 10

Slide 10 text

Built-in Services Built-in Services Blob Storage

Slide 11

Slide 11 text

Built-in Services Built-in Services Blob Storage Data Storage

Slide 12

Slide 12 text

Built-in Services Built-in Services Blob Storage Data Storage Task Queueing

Slide 13

Slide 13 text

Built-in Services Built-in Services Blob Storage Data Storage Task Queueing Pub/Sub

Slide 14

Slide 14 text

Built-in Services Built-in Services Blob Storage Data Storage Task Queueing Pub/Sub Email

Slide 15

Slide 15 text

Built-in Services Built-in Services Blob Storage Data Storage Task Queueing Pub/Sub Email Image manipulation

Slide 16

Slide 16 text

Built-in Services Built-in Services Blob Storage Data Storage Task Queueing Pub/Sub Email Image manipulation Caching

Slide 17

Slide 17 text

Built-in Services Built-in Services Blob Storage Data Storage Task Queueing Pub/Sub Email Image manipulation Caching

Slide 18

Slide 18 text

Standard Standard Flexible Flexible

Slide 19

Slide 19 text

Standard Standard - Specified runtimes; Java, Python, Go, Nodejs, PHP - No SSH debugging - Maximum request time 60 seconds - Cannot write to local disk - No background process - Can scale to 0 instances Flex Flex - Packages your app in Docker - Supports SSH debugging - Maximum request time 60 Minutes - You can write to local disk - Supports background process - Cannot scale to zero. Minimum 1 instance

Slide 20

Slide 20 text

Project Structure Project Structure dispatch.yaml service3a.yaml service3b.yaml source files… service3/ service2.yaml source files… service2/ service1.yaml source files… service1/ /

Slide 21

Slide 21 text

service.yaml service.yaml service: my-service runtime: python35 api_version: 1 instance_class: F2 automatic_scaling: target_cpu_utilization: 0.65 min_instances: 5 max_instances: 100 min_pending_latency: 30ms # default max_pending_latency: automatic max_concurrent_requests: 50 handlers:

Slide 22

Slide 22 text

Cloud SDK Cloud SDK The main tool for interacting with Google Cloud Platform gcloud Tool - Auth, Config, Deploy gsutil Tool - Storage bq Tool - Big Query kubectl Tool - Kubernetes https://cloud.google.com/sdk/

Slide 23

Slide 23 text

Demo Demo

Slide 24

Slide 24 text

GKE GKE

Slide 25

Slide 25 text

Google Kubernetes Engine Google Kubernetes Engine Managed, production-ready environment for deploying containerized applications

Slide 26

Slide 26 text

Google Kubernetes Engine Google Kubernetes Engine Managed, production-ready environment for deploying containerized applications Easily get up and running with Kubernetes in no time

Slide 27

Slide 27 text

Google Kubernetes Engine Google Kubernetes Engine Managed, production-ready environment for deploying containerized applications Easily get up and running with Kubernetes in no time No need to install, manage, and operate your own Kubernetes clusters.

Slide 28

Slide 28 text

Google Kubernetes Engine Google Kubernetes Engine Managed, production-ready environment for deploying containerized applications Easily get up and running with Kubernetes in no time No need to install, manage, and operate your own Kubernetes clusters. Scale effortlessly to thousands of machines

Slide 29

Slide 29 text

Concepts Concepts

Slide 30

Slide 30 text

Docker Docker

Slide 31

Slide 31 text

Container Registry Container Registry

Slide 32

Slide 32 text

Kubernetes Kubernetes

Slide 33

Slide 33 text

Kubernetes Cluster

Slide 34

Slide 34 text

Pods Basic building blocks of Kubernetes.

Slide 35

Slide 35 text

Pods Basic building blocks of Kubernetes. A pod is a collection of containers, storage and options dictating how the pod should run.

Slide 36

Slide 36 text

Pods Basic building blocks of Kubernetes. A pod is a collection of containers, storage and options dictating how the pod should run. Pods are mortal and are expected to die in order to rebalance the cluster or to upgrade them.

Slide 37

Slide 37 text

Pods Basic building blocks of Kubernetes. A pod is a collection of containers, storage and options dictating how the pod should run. Pods are mortal and are expected to die in order to rebalance the cluster or to upgrade them. Each pod has a unique IP in the cluster and can listen on any ports required for your application.

Slide 38

Slide 38 text

Deployment Deployment A Deployment is a copy of a replica set and pods.

Slide 39

Slide 39 text

Deployment Deployment A Deployment is a copy of a replica set and pods. If a deployment changes, the cluster will automatically create a new replica set with the new version and will automatically live to upgrade your pods.

Slide 40

Slide 40 text

Deployment Deployment A Deployment is a copy of a replica set and pods. If a deployment changes, the cluster will automatically create a new replica set with the new version and will automatically live to upgrade your pods. A deployment can also be rolled back to a previous version if there is an error.

Slide 41

Slide 41 text

Services Services Services enable discoverability of your pods from within and outside your cluster

Slide 42

Slide 42 text

Services Services Services enable discoverability of your pods from within and outside your cluster A service uses a combination of labels and selectors to match the pods that it’s responsible for and then will balance over the to.

Slide 43

Slide 43 text

Services Services Services enable discoverability of your pods from within and outside your cluster A service uses a combination of labels and selectors to match the pods that it’s responsible for and then will balance over the to. Services can load balance inside a cluster using a service of type ‘ClusterIP’ or expose it to the outside world using a ‘NodePort’

Slide 44

Slide 44 text

Services Services Services enable discoverability of your pods from within and outside your cluster A service uses a combination of labels and selectors to match the pods that it’s responsible for and then will balance over the to. Services can load balance inside a cluster using a service of type ‘ClusterIP’ or expose it to the outside world using a ‘NodePort’ Creating a service automatically creates a DNS entry, which allows for service discovery inside the cluster.

Slide 45

Slide 45 text

Demo Demo

Slide 46

Slide 46 text

Cloud Functions Cloud Functions

Slide 47

Slide 47 text

Event-driven serverless computing What are What are cloud cloud functions? functions?

Slide 48

Slide 48 text

Event-driven serverless computing The simplest way to run your code in the cloud What are What are cloud cloud functions? functions?

Slide 49

Slide 49 text

Event-driven serverless computing The simplest way to run your code in the cloud Automatically scales, highly available and fault tolerant What are What are cloud cloud functions? functions?

Slide 50

Slide 50 text

Event-driven serverless computing The simplest way to run your code in the cloud Automatically scales, highly available and fault tolerant No servers to provision, manage, patch or update What are What are cloud cloud functions? functions?

Slide 51

Slide 51 text

Event-driven serverless computing The simplest way to run your code in the cloud Automatically scales, highly available and fault tolerant No servers to provision, manage, patch or update Pay only while your code runs What are What are cloud cloud functions? functions?

Slide 52

Slide 52 text

How they work How they work Responds to events Cloud Services Emit events Writes back Invokes other services Other APIs Cloud Functions

Slide 53

Slide 53 text

Example Use cases Example Use cases HTTP Triggers Cloud Storage Triggers Cloud Pub/Sub Triggers Firebase Triggers

Slide 54

Slide 54 text

Python3.7 Node.js 6 Node.js 8 Support Support

Slide 55

Slide 55 text

Demo Demo

Slide 56

Slide 56 text

@jmwai @jmwai