Contenu connexe Similaire à Gae managed vm introduction Similaire à Gae managed vm introduction (20) Plus de KAI CHU CHUNG (13) Gae managed vm introduction4. Cloud Computing
Google Cloud Platform | Compute
PaasIaaS
Application
Data
Runtime
Middleware
OS
Virtualization
Servers
Storage
Networking
Application
Data
Runtime
Middleware
OS
Virtualization
Servers
Storage
Networking
Saas
Application
Data
Runtime
Middleware
OS
Virtualization
Servers
Storage
Networking
Infrastructure as a Service Platform as a Service Service as a Service
You manage Google manage
6. ● Storage
○ Cloud Storage
○ Cloud SQL
○ Cloud Datastore
● Memcache
● Task Queue
● Cloud Endpoints
App Engine APIs
App Engine | overview
Find more https://cloud.google.com/appengine/
7. Google App Engine: Platform as a Service
App Engine | Standard runtime
Python Java Php Go
9. What’s Docker?
Docker | overview
[什麼是 Docker | 《Docker —— 從入門到實踐》正體中文版](http://philipzheng.gitbooks.io/docker_practice/content/introduction/what.html)
10. Why Docker?
docker | overview
Change
Management
Resource
Isolation
File system
Isolation
Network
Isolation
Image
Management
Sharing
Process
Management
[Docker Internals - Google Slides](https://goo.gl/a6Y773)
18. Dockerfile
FROM google/appengine-python27
# Install pandas
RUN apt-get update && apt-get install -y -q --no-install-
recommends python-pandas python-numpy
# Install Google Map APIs, Google Client Library
ADD requirements.txt /app/
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
ADD . /app
Create the App Engine
[Managed VMs - App Engine — Google Cloud Platform](https://goo.gl/4FFSmm)
19. application: waldo-gcp
module: optimal-waypoints
version: 1
runtime: python27
api_version: 1
threadsafe: yes
vm: true
automatic_scaling:
min_num_instances: 1
max_num_instances: 5
cool_down_period_sec: 60
cpu_utilization:
target_utilization: 0.5
Create the App Engine | app.yaml
application: waldo-gcp
module: screenshot
version: 1
runtime: custome
api_version: 1
threadsafe: yes
vm: true
resources:
cpu: .5
memory_gb: 1.3
manual_scaling:
instances: 1
Standard runtime Custom runtime
20. Behind the scenes
gcloud deploy
gcloud build
Your awesome
docker images
your laptop
Google App
Engine
Your awesome
docker images
docker container
private Google
Cloud Storage
bucket
update start
Google Compute
Engine Instance
using
google/docker-registry
container
docker run
using
google/docker-registry
container
docker push
docker pull
21. App Engine for Docker
Simple to manage
Private Registry bucket
APIs and SDK
Loadbalancing
Autoscaling
Use any library
Run any code
Transparency
New runtimes, build your own
Docker for App Engine
23. Managed VMs | architecture
App Engine
Sandbox
App Engine
Managed VMs
...
Python Go
default module
Managed VMs module
or
custom runtimes
24. dispatch.yaml
dispatch:
- url: "*/favicon.ico"
module: default
- url: "qnap-gcp-lab-003.appspot.com/"
module: default
- url: "*/module1/*"
module: module1
- url: "*/*"
module: "default"
Demo Application | architecture
Application hierarchy
[App Engine Modules in Python](https://goo.gl/p3nl48)
[App Engine Modules in Go](https://goo.gl/KpdKpF)
25. dispatch.yaml
Golang
https://qnap-gcp-lab-003.appspot.com (default)
https://1-dot-module1-dot-qnap-gcp-lab-003.appspot.com (module 1) Managed VMs
https://qnap-gcp-lab-003.appspot.com/module1/ (module1) Managed VMs
https://qnap-gcp-lab-003.appspot.com/module1/sayhi (module1 sayhi) Managed VMs
Python
https://qnap-gcp-lab-002.appspot.com/ (default)
https://module1-dot-qnap-gcp-lab-002.appspot.com/ (module1) Managed VMs
https://qnap-gcp-lab-002.appspot.com/module1/ (module1) Managed VMs
https://qnap-gcp-lab-002.appspot.com/module1/income_file (module income_file) Managed VMs
Demo Application | dispatch
[Routing Requests to Modules - Go — Google Cloud Platform](https://goo.gl/CaYpFD)
[Routing Requests to Modules - Python — Google Cloud Platform](https://goo.gl/7P5Qfg)