Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
GCPでコンテナをデプロイする、一歩手前の話
Search
sakajunquality
October 13, 2018
Technology
220
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
Transcript
43 slides
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
More Decks by sakajunquality
See All by sakajunquality
AIと共生する開発者プラットフォーム:バクラクのモノレポ×マイクロサービス基盤
sakajunquality
3
8.5k
DevFest Tokyo 2023: Google Cloudでチームで安全にデプロイをする
sakajunquality
10
2.1k
Cloud Spanner Monitoring 入門 / Cloud Spanner Monitoring Introduction
sakajunquality
1
1.6k
GKE Overview March 2021: Introducing Autopilot
sakajunquality
1
940
Introduction to Cloud Run 2021
sakajunquality
3
1.7k
Building Reliable Distributed Systems on GCP
sakajunquality
1
340
Istio 1.5 Updates
sakajunquality
4
2.1k
GCP 101: Getting Started through Cloud Run
sakajunquality
6
4k
Seeking Observability, Getting Started with Service Mesh
sakajunquality
0
240
Other Decks in Technology
See All in Technology
サーバーラックは作る時代! 3Dプリンターで作る10インチラックのススメ
jacopen
2
530
SBOM 生成ツールで 2026 Minimum Elements はどこまで満たせるのか
gokken
0
180
Is the Website Dying?
miriamschwab
0
250
品質を積み上げられるようにする
goyoki
5
1.5k
AIエージェントのアーキテクチャ設計
nsatoh
0
590
攻撃と守りは何が変わり、何が変わらないのか~最近の不正アクセスから考える、リスク評価と標準の使いどころ
oidfj
2
370
Platform Engineering をベースとした Agentic Software Factory の実践
110y
3
1k
Kubernetes, Agones, WebRTC, GPU で作る クラウドゲーミング基盤を本番運用に乗せるまで
vivion
1
290
対話 AI プラットフォーム「アイブリー」で実践する自然言語処理と事業開発
ivry_presentationmaterials
0
140
Well, that’s weird…
csswizardry
3
250
専門家に使ってもらうAIプロダクトをつくる - 病院の医事課向けDPCコーディング支援システムの設計と評価
hagino3000
4
1.1k
技術同人誌を作る方法
yoshimura_datam
0
110
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
58k
Producing Creativity
orderedlist
PRO
348
41k
How to Talk to Developers About Accessibility
jct
2
630
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
620
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
590
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.8k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
Automating Front-end Workflow
addyosmani
1370
210k
Raft: Consensus for Rubyists
vanstee
143
7.9k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
We Are The Robots
honzajavorek
0
470