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
GCPでコンテナをデプロイする、一歩手前の話
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
sakajunquality
October 13, 2018
Technology
210
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GCPでコンテナをデプロイする、一歩手前の話
https://okipug.connpass.com/event/100512/
sakajunquality
October 13, 2018
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
910
Introduction to Cloud Run 2021
sakajunquality
3
1.7k
Building Reliable Distributed Systems on GCP
sakajunquality
1
310
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
200
Fastly Yamagoya Meetup: Leveraging Cloud Portability with Fastly
sakajunquality
0
16k
Other Decks in Technology
See All in Technology
エラーバジェットのアラートのタイミングを考える.pdf
kairim0
0
170
[AWS Summit Japan 2026]迷っているあなたへ_小さな一歩が、やがて自分を助けてくれる
sh_fk2
1
130
Android の公式 Skill / Android skills
yanzm
0
160
When Platform Engineering Meets GenAI
sucitw
0
120
現地で盛り上がった WWDC26 Keynote
zozotech
PRO
1
260
SONiCの統計情報を取得したい
sonic
0
220
Kiroで書いた 設計書 が AI レビューの 採点基準 になる
ezaki
0
130
気軽に使える"情報のハブ"としてのNotion活用 〜フロー情報の集積点 と、 Claude Code × Notion AI〜
syucream
1
150
2026 TECHFRESH 畢業分享會 - 開發日常大解密!從領域驅動到企業級上線
line_developers_tw
PRO
0
1.3k
Agent Skills設計で柔軟性と硬さのバランスが難しい話
nassy20
0
140
入門!AWS Blocks
ysuzuki
1
150
AI駆動開発を通して感じた、 AI時代のデザイナーの役割変化
whisaiyo
4
2.3k
Featured
See All Featured
Visualization
eitanlees
152
17k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
560
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
The Language of Interfaces
destraynor
162
27k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
320
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
390
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
Amusing Abliteration
ianozsvald
1
210
Un-Boring Meetings
codingconduct
0
320
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
Transcript
GCPでコンテナをデプロイす る、一歩手前の話 #gcpug #okinawa #6 #LT @sakajunquality
- Google Developers Experts (最近) - Software Engineer, SRE @
Ubie株式会社 (最近) - 初沖縄! - 最近やってること #docker #kubernetes - 好きなこと #coffee #beer - 好きなGCPサービス #BigQuery #GKE #Cloud Build @sakajunquality
Next’18 SF
Next’18 Tokyo @sakajunquality https://www.youtube.com/watch?v=sz9mnwMCHIU
番宣: 11/1 GKEハンズオンやります https://gcpug-bt.connpass.com/event/104533/
Today’s Topic
Today’s Topic - Steps to Deploy Container - Google Container
Registry - Google Cloud Build
- GCP 123 - Container ABC - Docker hoge hoge
- Kubernetes foo bar Not Today’s Topic
Steps to Deploy Container
Steps to Deploy Container Application Source Code Container Image Container
Running Environment
Steps to Deploy Container Application Source Code Container Image Container
Running Environment Today’s topic
Steps to Deploy Container in GCP Application Source Code Container
Image Container Running Environment Cloud Source Repositories Github Container Registry Compute Engine App Engine Kubernetes Engine
Steps to Deploy Container in GCP Application Source Code Container
Image Container Running Environment Cloud Source Repositories Github Container Registry Compute Engine App Engine Kubernetes Engine
Steps to Deploy Container in GCP Application Source Code Container
Image Container Running Environment Cloud Source Repositories Github Container Registry Compute Engine App Engine Kubernetes Engine Cloud Build
Steps to Deploy Container in GCP Application Source Code Container
Image Container Running Environment Cloud Source Repositories Github Container Registry Compute Engine App Engine Kubernetes Engine Cloud Build
Steps to Deploy Container in GCP Application Source Code Container
Image Container Running Environment Cloud Source Repositories Github Container Registry Compute Engine App Engine Kubernetes Engine Cloud Build Cloud Build
Google Container Registry
Google Container Registry (GCR) - Private Container Registry - https://cloud.google.com/container-registry/
- Native Docker Support - Vulnerabilities Analysis
Google Container Registry (GCR) - Private Container Registry - https://cloud.google.com/container-registry/
- Native Docker Support - Vulnerabilities Analysis beta (Next’18 Tokyo)
Vulnerabilities Analysis: Config 1 gcloud services enable containeranalysis.googleapis.com
Vulnerabilities Analysis: Config 2
Vulnerabilities Analysis: Example みんな大好きglibc...
Vulnerabilities Analysis: Integration - Analysis events are published to Cloud
Pub/Sub Topic - container-analysis-occurrences-v1beta1 - Usage example - Slack Notification - JIRA ticket - etc.
GCR for Multi Project - Common Private Repository for Multiple
Clusters GCR (Project A) Dev GKE (Project B) Prod GKE (Project C)
GCR for Multi Project - Push Application Container to GCR
GCR (Project A) Dev GKE (Project B) Prod GKE (Project C) my-app:v1
GCR for Multi Project - Use the image in Dev
Cluster GCR (Project A) Dev GKE (Project B) Prod GKE (Project C) my-app:v1 my-app:v1
GCR for Multi Project - Use the same image in
Prod GCR (Project A) Dev GKE (Project B) Prod GKE (Project C) my-app:v1 my-app:v1 my-app:v1
GCR for Multi Project - Allow roles/storage.objectViewer to Compute SA
of each project GCR (Project A) Dev GKE (Project B) Prod GKE (Project C)
GCR for Multi Project
Google Cloud Build
Google Cloud Build - Full-managed CI - https://cloud.google.com/cloud-build/ - Formanly
Container Builder in GCR - Configuration - Dockerfile - cloudbuild.yaml
Configuration: cloudbuild.yaml Building Docker Image and Push to GCR //
cloudbuild.yaml steps: # build - name: 'gcr.io/cloud-builders/docker' args: [ 'build', '-t', 'gcr.io/$PROJECT_ID/my-app:$REVISION_ID', '.' ] # push images: ["push", "gcr.io/$PROJECT_ID/my-app:$REVISION_ID"]
Configuration: Adding Test Building Docker Image and Push to GCR
// cloudbuild.yaml steps: # build - name: 'gcr.io/cloud-builders/docker' args: [ 'build', '-t', 'gcr.io/$PROJECT_ID/my-nginx:$REVISION_ID', '.' ] # test - name: 'gcr.io/cloud-builders/docker' args: [ 'run', '--rm', 'gcr.io/$PROJECT_ID/my-nginx:$REVISION_ID', 'nginx', '-t' ] # push images: ["push", "gcr.io/$PROJECT_ID/my-nginx:$REVISION_ID"]
Build Images - https://github.com/GoogleCloudPlatform/cloud-builders - Images Provided by Google -
e.g. - gcr.io/cloud-builders/docker - gcr.io/cloud-builders/bash - gcr.io/cloud-builders/gcloud
Images for Deployment - gcr.io/cloud-builders/kubectl
- Community Images - Build on you own - Kubernetes
Tools like kustomize, helm etc. - e.g. - gcr.io/my-cool-project/kustomize - https://github.com/GoogleCloudPlatform/cloud-builders-community Community Image
Start Build - Create Triggered by Git tag or branch
- Manually Submit Submit
Start Build: Trigger by Git tag or branch
Manually Submit Build gcloud builds submit --config cloudbuild.yaml --project my-supper-project
.
Notification / Integration - Build steps events are published to
Cloud Pub/Sub Topic - cloud-builds - e.g. Slack Notification via Cloud Functions
Conclusion
Conclusion - GCRとCloudBuildの組み合わせよい!
Thank you