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
sakajunquality
April 27, 2018
Technology
3
1.4k
GoogleContainerBuilderOverview
#cndjp5
https://cnd.connpass.com/event/84310/
sakajunquality
April 27, 2018
Tweet
Share
More Decks by sakajunquality
See All by sakajunquality
DevFest Tokyo 2023: Google Cloudでチームで安全にデプロイをする
sakajunquality
10
1.8k
Cloud Spanner Monitoring 入門 / Cloud Spanner Monitoring Introduction
sakajunquality
1
1.3k
GKE Overview March 2021: Introducing Autopilot
sakajunquality
1
810
Introduction to Cloud Run 2021
sakajunquality
3
1.5k
Building Reliable Distributed Systems on GCP
sakajunquality
1
230
Istio 1.5 Updates
sakajunquality
4
1.9k
GCP 101: Getting Started through Cloud Run
sakajunquality
6
3.6k
Seeking Observability, Getting Started with Service Mesh
sakajunquality
0
140
Fastly Yamagoya Meetup: Leveraging Cloud Portability with Fastly
sakajunquality
0
16k
Other Decks in Technology
See All in Technology
インフラをつくるとはどういうことなのか、 あるいはPlatform Engineeringについて
nwiizo
5
2.4k
2024.02.19 W&B AIエージェントLT会 / AIエージェントが業務を代行するための計画と実行 / Algomatic 宮脇
smiyawaki0820
10
1.5k
明日からできる!技術的負債の返済を加速するための実践ガイド~『ホットペッパービューティー』の事例をもとに~
recruitengineers
PRO
3
290
TAMとre:Capセキュリティ編 〜拡張脅威検出デモを添えて〜
fujiihda
1
180
SA Night #2 FinatextのSA思想/SA Night #2 Finatext session
satoshiimai
1
130
サーバーレスアーキテクチャと生成AIの融合 / Serverless Meets Generative AI
_kensh
12
3.1k
Googleマップ/Earthが一般化した 地図タイルのイマ
mapconcierge4agu
1
200
モノレポ開発のエラー、誰が見る?Datadog で実現する適切なトリアージとエスカレーション
biwashi
6
790
現場の種を事業の芽にする - エンジニア主導のイノベーションを事業戦略に装着する方法 -
kzkmaeda
2
1.8k
スクラムのイテレーションを導入してチームの雰囲気がより良くなった話
eccyun
0
110
個人開発から公式機能へ: PlaywrightとRailsをつなげた3年の軌跡
yusukeiwaki
11
2.9k
一度 Expo の採用を断念したけど、 再度 Expo の導入を検討している話
ichiki1023
1
160
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Fireside Chat
paigeccino
34
3.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
99
18k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
GraphQLとの向き合い方2022年版
quramy
44
13k
We Have a Design System, Now What?
morganepeng
51
7.4k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
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