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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
sakajunquality
February 04, 2021
Technology
1.7k
3
Share
Introduction to Cloud Run 2021
https://gdg-tokyo.connpass.com/event/201523/
sakajunquality
February 04, 2021
More Decks by sakajunquality
See All by sakajunquality
DevFest Tokyo 2023: Google Cloudでチームで安全にデプロイをする
sakajunquality
10
2k
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
OCI技術資料 : ロード・バランサ 概要 - FLB・NLB共通
ocise
4
27k
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
バックオフィスPJのPjMをコーポレートITが担うとうまくいく3つの理由
yueda256
1
270
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
5
1.4k
レガシーシステムをどう次世代に受け継ぐか
tachiiri
0
260
「できない」のアウトプット 同人誌『精神を壊してからの』シリーズ出版を 通して得られたこと
comi190327
3
570
Microsoft Fabricで考える非構造データのAI活用
ryomaru0825
0
650
Data Intelligence Engineering Unit 部門と各ポジション紹介
sansantech
PRO
0
120
機能・非機能の学びを一つに!Agent Skillsで月間レポート作成始めてみた / Unifying Bug & Infra Insights — Building Monthly Quality Reports with Agent Skills
bun913
5
2.9k
今年60歳のおっさんCBになる
kentapapa
1
130
第26回FA設備技術勉強会 - Claude/Claude_codeでデータ分析 -
happysamurai294
0
380
Webアクセシビリティは“もしも”に備える設計
tomokusaba
0
160
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
430
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
260
Design in an AI World
tapps
0
190
sira's awesome portfolio website redesign presentation
elsirapls
0
210
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
For a Future-Friendly Web
brad_frost
183
10k
Utilizing Notion as your number one productivity tool
mfonobong
4
280
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
310
Joys of Absence: A Defence of Solitary Play
codingconduct
1
330
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
From π to Pie charts
rasagy
0
160
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
210
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