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.2k
GKE Overview March 2021: Introducing Autopilot
sakajunquality
1
790
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
15k
Other Decks in Technology
See All in Technology
Platform Engineering for Software Developers and Architects
syntasso
1
510
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
120
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
240
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
ドメイン名の終活について - JPAAWG 7th -
mikit
33
20k
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.3k
Terraform未経験の御様に対してどの ように導⼊を進めていったか
tkikuchi
2
430
The Role of Developer Relations in AI Product Success.
giftojabu1
0
120
DMARC 対応の話 - MIXI CTO オフィスアワー #04
bbqallstars
1
160
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
200
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
290
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
120
Featured
See All Featured
Become a Pro
speakerdeck
PRO
25
5k
Navigating Team Friction
lara
183
14k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
KATA
mclloyd
29
14k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Producing Creativity
orderedlist
PRO
341
39k
Speed Design
sergeychernyshev
24
610
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
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