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
GoogleContainerBuilderOverview
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
sakajunquality
April 27, 2018
Technology
1.4k
3
Share
GoogleContainerBuilderOverview
#cndjp5
https://cnd.connpass.com/event/84310/
sakajunquality
April 27, 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
900
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
脅威をエンジニアリングの糧にして:恐怖を乗り越えた先にあったもの / Turn threats into fuel for engineering: what lay beyond overcoming fear
nrslib
1
270
Generative UI × A2UI で AI エージェントを作った話 AI-DLC も使ってみた!
kmiya84377
1
160
AIが変えた"品質の守り方"
kkakizaki
7
2.3k
責任あるソフトウェアエンジニアリングの紹介4章・5章 / RSE_Ch4-5
ido_kara_deru
0
330
Python開発環境にハーネス適用を検討する
yuuka51
1
510
管理アカウント単一運用からAWS Organizationsに移行するの大変で滅
hiramax
0
230
エンジニアは生成AIと どのように向き合うべきか? ことばの意味という観点から
verypluming
2
190
EdgeプロファイルでAWSアカウントを安全に使い分ける
jhashimoto
0
100
コーポレートサイトのアクセシビリティ改善とJIS準拠への実践
lycorptech_jp
PRO
2
140
自称宇宙最速で不合格となったAIP-C01にリベンジを果たすべくAIで問題集アプリを作ってみた。
yama3133
0
140
なぜハノーバーメッセに行くべきなのか 〜初参加だから語れること〜
tanakaseiya
0
110
AI時代から振り返るTerraform drift運用の歴史 / AI Age Reflections on the History of Terraform Drift Operations
aeonpeople
0
340
Featured
See All Featured
Chasing Engaging Ingredients in Design
codingconduct
0
200
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Designing for humans not robots
tammielis
254
26k
WENDY [Excerpt]
tessaabrams
10
37k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Tell your own story through comics
letsgokoyo
1
930
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Producing Creativity
orderedlist
PRO
348
40k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
180
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Transcript
#cndjp5 @sakajunquality Google Container Builder
Overview
- GCP Full-Managed CI - Build and Push Docker Image
- Build and Upload Artifact Tarball Overview Container Builder Container Registry Source Code CI Registry/Storage Trigger Cloud Storage Upload Push
- Also works as CI/CD Pipeline Overview Container Builder Container
Registry Source Code CI Registry Compute Engine Kubernetes Engine Runtime Deployment
- Version (as of 26 April 2018) 17.05? Docker
Basic Usage & Configuration
Configuration: GCP Console
Configuration: cloudbuild.yaml // cloudbuild.yaml steps: # build - name: 'gcr.io/cloud-builders/docker'
args: [ 'build', '-t', 'gcr.io/$PROJECT_ID/my-app:$REVISION_ID', '.' ] # push - name: 'gcr.io/cloud-builders/docker' args: ["push", "gcr.io/$PROJECT_ID/my-app:$REVISION_ID"] List build steps
- Supported Build Steps - https://github.com/GoogleCloudPlatform/cloud-builders - bash is also
available - - name: 'gcr.io/cloud-builders/gcloud' - entrypoint: 'bash' - Custom Build Steps - https://cloud.google.com/container-builder/docs/create-custom-build-steps?hl=ja Steps
Supported Builder Images
Notification
Notification - Every event is pushed to Cloud Pub/Sub topic
- Topic: cloud-builds - https://cloud.google.com/container-builder/docs/pubsub?hl=ja Container Builder Cloud Functions Cloud Pub/Sub Event Subscribe
Event Message Payload 1 { "id": "xxxxxxxx-yyyy-zzzz-aaaa-bbbbbbbbbbbb", "projectId": "my-project", "status":
"SUCCESS", "source": { "repoSource": { "projectId": "my-project", "repoName": "github-sakajunquality-my-app", "branchName": "master" } }, // ... }
Event Message Payload 2 { // ... "steps": [ {
"name": "gcr.io/cloud-builders/docker", "args": [ "build", "-t", "gcr.io/my-project/my-repo:hashhash", "." ] }, { "name": "gcr.io/cloud-builders/docker", "args": [ "push", "gcr.io/my-project/my-repo:hashhash"] }, // ... ] // ... }
Event Message Payload 3 { // ... "createTime": "2018-04-06T09:17:45.069621980Z", "startTime":
"2018-04-06T09:17:46.231838575Z", "finishTime": "2018-04-06T09:19:03.547323Z", "sourceProvenance": { "resolvedRepoSource": { "projectId": "my-project", "repoName": "github-sakajunquality-my-app", "commitSha": "88e07c6db8a03653598884dc94ad4e8910c0fd51" } }, // ... }
Cloud Function deploy // deploy cloud function gcloud beta functions
deploy cloudbuild-notify \ --entry-point subscribe \ --trigger-event providers/cloud.pubsub/eventTypes/topic.publish \ --trigger-resource cloud-builds \ --region us-central1 \ --stage-bucket [your bucket]
Slack Notification Sample
Logging & Debugging
Logging & Debugging - Container Builder Console - Stackdriver Logging
Logging: Container Builder
Logging: Stackdriver
Deployment
Deployment // cloudbuild.yaml Steps: // build & push - name:
'gcr.io/cloud-builders/kubectl' args: - set - image - deployment - [DEPLOYMENT-NAME] - [CONTAINER]=gcr.io/[PROJECT-ID]/[IMAGE]:[TAG] // see also https://cloud.google.com/container-builder/docs/configuring-builds/build-test-deploy-artifacts?hl=ja
Online Resources
- Official Document - https://cloud.google.com/container-builder/docs/?hl=ja - Speeding-up - https://cloud.google.com/container-builder/docs/speeding-up-builds?hl=ja#using_a _cached_docker_image
Online Resources
Thank you