Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction to Cloud Run 2021
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
sakajunquality
February 04, 2021
Technology
3
1.7k
Introduction to Cloud Run 2021
https://gdg-tokyo.connpass.com/event/201523/
sakajunquality
February 04, 2021
Tweet
Share
More Decks by sakajunquality
See All by sakajunquality
DevFest Tokyo 2023: Google Cloudでチームで安全にデプロイをする
sakajunquality
10
1.9k
Cloud Spanner Monitoring 入門 / Cloud Spanner Monitoring Introduction
sakajunquality
1
1.5k
GKE Overview March 2021: Introducing Autopilot
sakajunquality
1
890
Building Reliable Distributed Systems on GCP
sakajunquality
1
300
Istio 1.5 Updates
sakajunquality
4
2.1k
GCP 101: Getting Started through Cloud Run
sakajunquality
6
3.9k
Seeking Observability, Getting Started with Service Mesh
sakajunquality
0
190
Fastly Yamagoya Meetup: Leveraging Cloud Portability with Fastly
sakajunquality
0
16k
GCLB Traffic Management: envoy inside
sakajunquality
0
700
Other Decks in Technology
See All in Technology
プラットフォームエンジニアリングはAI時代の開発者をどう救うのか
jacopen
7
3.8k
めちゃくちゃ開発するQAエンジニアになって感じたメリットとこれからの課題感
ryuhei0000yamamoto
0
120
Windows ファイル共有(SMB)を再確認する
murachiakira
PRO
0
120
AI駆動AI普及活動 ~ 社内AI活用の「何から始めれば?」をAIで突破する
oracle4engineer
PRO
1
110
AI時代の「本当の」ハイブリッドクラウド — エージェントが実現した、あの頃の夢
ebibibi
0
150
Yahoo!ショッピングのレコメンデーション・システムにおけるML実践の一例
lycorptech_jp
PRO
1
220
JAWSDAYS2026_A-6_現場SEが語る 回せるセキュリティ運用~設計で可視化、AIで加速する「楽に回る」運用設計のコツ~
shoki_hata
0
3k
WebアクセシビリティをCI/CDで担保する ― axe DevTools × Playwright C#実践ガイド
tomokusaba
2
170
最強のAIエージェントを諦めたら品質が上がった話 / how quality improved after giving up on the strongest AI agent
kt2mikan
0
190
Lambda Web AdapterでLambdaをWEBフレームワーク利用する
sahou909
0
170
A Casual Introduction to RISC-V
omasanori
0
330
AWS CDK「読めるけど書けない」を脱却するファーストステップ
smt7174
3
170
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Skip the Path - Find Your Career Trail
mkilby
1
84
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Rails Girls Zürich Keynote
gr2m
96
14k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Facilitating Awesome Meetings
lara
57
6.8k
Code Reviewing Like a Champion
maltzj
528
40k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.4k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
78
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
130
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Transcript
Jun Sakata Google Developers Expert, Cloud @sakajunquality Cloud Run 入門
2021.02.04 #gdgtokyo GDG Tokyo New Year LT大会 2021
アジェンダ Cloud Run - Cloud Runとは - 使い方 - 他のプロダクトとの比較
- まとめ
Cloud Runとは コンテナを秒単位で本番環境にデプロイ
Cloud Run - フルマネージドのサーバーレスのプラットフォーム - 時間課金 / Scale to 0
- 任意コンテナイメージをデプロイ - HTTP / gRPC / WebSocket
Cloud Run - サーバーレスのアプリケーション - 任意コンテナイメージをデプロイ - HTTP / gRPC
/ WebSocket Cloud Run HTTP
Cloud Run - サーバーレスのアプリケーション - 任意コンテナイメージをデプロイ - HTTP / gRPC
/ WebSocket Cloud Run gRPC
使い方
Containers? - i.e. Docker Image
コンテナのリリース ソースコード コンテナ イメージ 実行環境
コンテナのリリース ソースコード コンテナ イメージ 実行環境 ビルド デプロイ
Dockerfile?
// 書く vim Dockerfile // ビルド gcloud builds submit --tag
[image] . // デプロイ gcloud run deploy --image [image]
Dockerfile書きたくない?
Google Cloud buildpacks - Dockerfileなしにコンテナイメージを作成 - CNCFのBuildpacksをベースとしたOSS - https://github.com/GoogleCloudPlatform/buildpacks
// けす rm Dockerfile // ビルド gcloud builds submit --pack
image=[image] // デプロイ gcloud run deploy --image [image]
1コマンドで?
// いらない rm Dockerfile // ビルドとデプロイ gcloud beta run deploy
--source .
コンテナのリリース(buildpacks) ソースコード コンテナ イメージ 実行環境
Dockerfileそれでも書いた ほうがいい場合も?
Cloud Runのリソース
Cloud Run リソース - CPU: 1,2,4 vCPU - Memory: max
8GB - 最大のリクエスト: 15m (GA), 60m (Preview) - インスタンス数: 0-1000 (最小も指定可能に) - インスタンスあたりの同時リクエスト: 1-250 - Custom Domain/Custom TLS Certificate - Cloud Traceとの連携
Cloud Run 簡易CIも - GitHubやCloud Source Repositiriesのソースコードに対してCloud Runに 対するデプロイのパイプラインをGUIで設定可能 -
https://cloud.google.com/run/docs/continuous-deployment-with-clo ud-build
Cloud Run w/ GitHub Actions - GitHub Actionsのヘルパーも公式で用意されている - https://github.com/google-github-actions/setup-gcloud
Cloud Runの連携 - Cloud Workflow - Cloud API Gateway -
Eventarc - etc...
Cloud Run Eventarc - Event driven trigger via Audit Logging
- https://cloud.google.com/blog/topics/developers-practitioners/event arc-unified-eventing-experience-google-cloud
他のGCPのプロダクト と比較?
v.s. App Engine (GAE) - 対応言語やバージョンの縛りがなくなる - Service Account が柔軟(複数サービス展開時)
- App Engineのがいいことも - Static Contents Server / Cloud CDN - Cloud IAP - (GAEの内部でも buildpack 使われてる)
v.s. Cloud Functions (GCF) - Runは各インスタンスが同時に複数リクエスト受けることができる - 主要言語に Functions フレームワークも提供しているのでRunをFaaSのよ
うな利用でも利用可能 - https://cloud.google.com/functions/docs/functions-framework?hl= en
v.s. Kubernetes Engine (GKE) - クラスター課金ではなくリクエストベースの課金 - クラスターが管理不要なので気軽に始められる - GKEのほうが柔軟性はある
- プロトコル, 実行時間の縛り, サイドカー, ローカルのディスクなど
まとめ Cloud Runはいいぞ!
まとめ - Cloud Runはフルマネージドのサーバーレスランタイム - BuildpacksによりDockerfileを書かなくてもよい - 日々アップデートされており柔軟なワークロードに対応 - リリースノート
- https://cloud.google.com/run/docs/release-notes?hl=en
Thank You! Jun Sakata Google Developers Expert, Cloud @sakajunquality