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
Shakr - Google Container Engine을 이용한 빠르고 안정적인 서...
Search
Minku Lee
July 06, 2017
Technology
1
1.1k
Shakr - Google Container Engine을 이용한 빠르고 안정적인 서비스 개발 및 배포
Shakr에서 기존 인프라스트럭쳐를 어떻게 Container Engine으로 이전했는지, 새로운 서비스를 빠르게 Container Engine에 배포할 수 있었는지를 소개합니다.
Minku Lee
July 06, 2017
Tweet
Share
More Decks by Minku Lee
See All by Minku Lee
Google Cloud Summit Seoul - GKE @ Shakr
premist
0
630
GCP+GKE Deep Dive Part 1: Initial App Development
premist
0
510
GCP+GKE Deep Dive Part 2: Advanced Cluster Management
premist
0
240
Containers @ Google App Engine
premist
0
250
Container CI/CD with Google Cloud Platform
premist
0
410
쉐이커의 AWS 이용 사례
premist
0
210
Waffle @ Startup Asia
premist
1
230
Waffle @ Youth Venture Summit
premist
1
170
Other Decks in Technology
See All in Technology
React開発にStorybookとCopilotを導入して、爆速でUIを編集・確認する方法
yu_kod
1
280
Geminiとv0による高速プロトタイピング
shinya337
1
270
SEQUENCE object comparison - db tech showcase 2025 LT2
nori_shinoda
0
150
Operating Operator
shhnjk
1
590
OSSのSNSツール「Misskey」をさわってみよう(右下ワイプで私のOSCの20年を振り返ります) / 20250705-osc2025-do
akkiesoft
0
170
IPA&AWSダブル全冠が明かす、人生を変えた勉強法のすべて
iwamot
PRO
2
150
united airlines ™®️ USA Contact Numbers: Complete 2025 Support Guide
flyunitedhelp
1
340
Core Audio tapを使ったリアルタイム音声処理のお話
yuta0306
0
190
fukabori.fm 出張版: 売上高617億円と高稼働率を陰で支えた社内ツール開発のあれこれ話 / 20250704 Yoshimasa Iwase & Tomoo Morikawa
shift_evolve
PRO
2
7.8k
関数型プログラミングで 「脳がバグる」を乗り越える
manabeai
1
190
ビズリーチにおけるリアーキテクティング実践事例 / JJUG CCC 2025 Spring
visional_engineering_and_design
1
130
タイミーのデータモデリング事例と今後のチャレンジ
ttccddtoki
6
2.4k
Featured
See All Featured
How GitHub (no longer) Works
holman
314
140k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Git: the NoSQL Database
bkeepers
PRO
430
65k
The Pragmatic Product Professional
lauravandoore
35
6.7k
Facilitating Awesome Meetings
lara
54
6.4k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Thoughts on Productivity
jonyablonski
69
4.7k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Become a Pro
speakerdeck
PRO
29
5.4k
A Modern Web Designer's Workflow
chriscoyier
695
190k
Transcript
Harder, better, faster, stronger with Google Container Engine ҳӖஶపցূਸࢎਊೠࡅܰҊউੋࢲ࠺झѐߊ߂ߓನ CTO
MINKU LEE
v ⿏࠺٣য়ҟҊ Container icon by Dominic Plag from the Noun
Project ֥ۄب۽рױೠ࠺٣য়ઁݧ࠺٣য়٣ੋೠоٙ
Shakr Infrastructure ⿏֙ஶపցӝ߈ইఃఫ۽ജ ⿏֙($1ࢎਊद ⿏֙ࠗ࠙ஹೊझషܻਗਸ($1۽ $POUBJOFS&OHJOFदद ⿏അࠗ࠙ۄ٘ஹೊসਸ $POUBJOFS&OHJOFীࢲҳز
Topics Kubernetes Container Engine Case Studies
Kubernetes
Why Container? ⿏زੌೞ٘ਝয7.ղীࢲࠁਬোೞѱܻࣗझܳ ҙܻೡࣻ ⿏য٣ࢲաഅоמೠগܻா࣌ҳزജ҃ ⿏7.࠺য়ߡ٘۽ೠѺܻࢿઁҕ١ Container icon by Dominic
Plag from the Noun Project
Kubernetes ⿏ஶపցӝ߈গܻா࣌ਸߓನೞҊ ഛೞҊ ҙܻ೧חदझమ ⿏ҳӖࢎਊೞחஶపցҙܻदझమ ই٣য৬֢ೞܳ҅थೠ۽ં ⿏ܻӝসইצ-JOVY'PVOEBUJPOীࢲೞח $MPVE/BUJWF$PNQVUJOH'PVOEBUJPOীࢲ۽ ંܳҙܻ
Kubernetes ⿏ஶపցӝ߈গܻா࣌झாે݂ ⿏ࢲ࠺झ٣झழߡܻ ⿏۽٘ߖ۠य ⿏ࢸ߂࠺ࠁҙܻ ⿏٣झҙܻ ⿏١١
None
࠺तೠࣗਝয ⿏%PDLFS4XBSN ⿏"NB[PO&$4 ⿏.FTPTQIFSF "QBDIF.FTPT ⿏)BTIJ$PSQ/PNBE
࠺तೠࣗਝয࠺ъ ⿏ஶపցझாે݂ࠗఠ۽٘ߖ۠य ࢸ ٣झҙܻө ߹ببҳহ೧Ѿоמ ⿏($1ղীࢲݻߣܼਵ۽औѱ۞झఠࢤࢿоמ ⿏ৈ۞ۄ٘ઁҕ৬߬যݫఎࢲߡܳഒೞৈ ۞झఠܳҳ୷ೡࣻ $MVTUFS'FEFSBUJPO
⿏4UBUFMFTTೠগܻா࣌ࡺ݅ইצ4UBUFGVMগܻா࣌بҳز ೡࣻח١ৈ۞दաܻয়ীೠ
Kubernetes ҳࢿਃࣗ ⿏1PE ⿏%FQMPZNFOU ⿏4FSWJDF ⿏*OHSFTT ⿏%BFNPO4FU ⿏4FDSFU ⿏$POGJH.BQ ⿏4UBUFGVM4FU
⿏3FQMJDB4FU ⿏$SPO+PC ⿏+PC ⿏1FSTJTUFOU7PMVNF ⿏1FSTJTUFOU7PMVNF$MBJN ⿏FUDj
Kubernetes ҳࢿਃࣗ ⿏1PE ⿏%FQMPZNFOU ⿏4FSWJDF ⿏*OHSFTT ⿏%BFNPO4FU ⿏4FDSFU ⿏$POGJH.BQ ⿏4UBUFGVM4FU
⿏3FQMJDB4FU ⿏$SPO+PC ⿏+PC ⿏1FSTJTUFOU7PMVNF ⿏1FSTJTUFOU7PMVNF$MBJN ⿏FUDj
Case Study: Shakr ӝઓੋۄܳ$POUBJOFS&OHJOFਵ۽ೞӝ
ӝઓইఃఫ Redis Task Queue Fastly CDN Original Media Files Cloud
Storage Processed Media Files Cloud Storage Storage User Uploads Cloud Storage Rendered Segments Cloud Storage CDN Interconnect Upload Processing Worker Compute Engine Multiple Instances Video Processing Worker Compute Engine Multiple Instances Image Processing Worker Compute Engine Multiple Instances Video Rendering Worker Compute Engine Multiple Instances Video Design Processing Worker Compute Engine Multiple Instances Compute Papertrail Logging Datadog Monitoring
೧ѾೞҊर؍ ⿏ਬোೞޅೠஹೊਗഝਊ ೠੋझఢझӒܛ$16ࢎਊܫੌٸҗࠗೞ࢚కੋܲੋझఢझӒܛܳഝਊೡࣻহਸө ⿏ߓನରߣѢ۽ "QQ&OHJOFա)FSPLVэ1BB4ۢಞܻೞѱߓನೡࣻחহਸө ⿏ৈ۞ҳࢿਃࣗܳ߹ѐ۽ҙܻ೧ঠೣ झ ۽Ӓझܻ߁җэҳࢿਃࣗܳಞܻೞѱࢸೡࣻחহਸө
Compute Engine ীࢲ Container Engine ਵ۽ ⿏$POUBJOFS&OHJOF۞झఠࢤࢿ ⿏%FQMPZNFOU4QFDࢿ ⿏ߓನ߂܀݂সؘ ⿏/PEF1PPM୶о߂ઁ
⿏%BUBEPH"HFOUܳాೠݽפఠ݂ ⿏۽Ӓझܻ߁߂
Container Engine ۞झఠ ࢤࢿ
Google Container Engine Kubernetes as a Service
Google Container Engine ⿏,VCFSOFUFTOPEF৬FUDEੋझఢझܳ(PPHMFҙܻ ⿏زਵ۽(PPHMF$PNQVUF&OHJOFੋझఢझࢤࢿ߂ࢸ ⿏زਵ۽ߑച߷ࢸ ⿏زਵ۽۽٘ߖ۠यࢸ
۞झఠࢤࢿ ⿏ਬোೞޅೠஹೊਗഝਊ ೠੋझఢझӒܛ$16ࢎਊܫੌٸҗࠗೞ࢚కੋܲੋझఢझӒ ܛܳഝਊೡࣻহਸө ⿏ߓನରߣѢ۽ "QQ&OHJOFա)FSPLVэ1BB4ۢಞܻೞѱߓನೡࣻਸө ⿏ৈ۞ҳࢿਃࣗܳ߹ѐ۽ҙܻ೧ঠೣ ۽٘ߖ۠ࢲ
झ ۽Ӓझܻ߁җэҳࢿਃࣗܳಞܻೞѱࢸೡ ࣻחহਸө
۞झఠࢤࢿ $ gcloud container clusters create my-awesome-cluster \ --zone asia-northeast1-a
\ --enable-cloud-logging --enable-cloud-monitoring \ --machine-type n1-standard-4 \ —-num-nodes 3 Bash
$ gcloud container clusters get-credentials \ my-awesome-cluster --zone asia-northeast1-a Fetching
cluster endpoint and auth data. kubeconfig entry generated for my-awesome-cluster. $ kubectl proxy Starting to serve on 127.0.0.1:8001 Bash Kubernetes Dashboard
Kubernetes Dashboard
Deployment Spec ࢿ
Pod ↟ оஹೊਬ ↟ ೞաৈ۞ѐஶపց۽ҳࢿ ↟ 1PEউஶపցחҕрҗஶఫझܳҕਬ ↟ ൃߊࢿઙܐदݽؘٚఠਬप ↟
ਃद($4ա1FSTJTUFOU7PMVNFਸࢎਊೞৈؘఠܳࠁઓ
Deployment ⿏ৈ۞ѐ1PEਸߓನೞҊҙܻೞחܻࣗझ ⿏1PEіࣻ SFQMJDB ܳ೧ݶ೧іࣻ݅ఀ زਵ۽୶о߂ઁ ⿏܀݂সؘ৬܀ߔҳഅ 3FQMJDB4FU
yaml deployment.yml apiVersion: apps/v1beta1 kind: Deployment metadata: name: myapp-deployment
yaml deployment.yml apiVersion: apps/v1beta1 kind: Deployment metadata: name: myapp-deployment spec:
replicas: 3
yaml deployment.yml apiVersion: apps/v1beta1 kind: Deployment metadata: name: myapp-deployment spec:
replicas: 3 template: metadata: labels: app: myapp spec: containers: - name: myapp image: gcr.io/my-project/myapp:3.0.0 resources: requests: cpu: 200m memory: 100Mi limits: cpu: "4" memory: 8Gi
yaml deployment.yml apiVersion: apps/v1beta1 kind: Deployment metadata: name: myapp-deployment spec:
replicas: 3 template: metadata: labels: app: myapp spec: containers: - name: myapp image: gcr.io/my-project/myapp:3.0.0 resources: requests: cpu: 200m memory: 100Mi limits: cpu: "4" memory: 8Gi livenessProbe: httpGet: path: / port: 80 readinessProbe: httpGet: path: / port: 80 initialDelaySeconds: 5 periodSeconds: 3
yaml deployment.yml apiVersion: apps/v1beta1 kind: Deployment metadata: name: myapp-deployment spec:
replicas: 3 template: metadata: labels: app: myapp spec: containers: - name: myapp image: gcr.io/my-project/myapp:3.0.0 resources: requests: cpu: 200m memory: 100Mi limits: cpu: "4" memory: 8Gi livenessProbe: httpGet: path: / port: 80 readinessProbe: httpGet: path: / port: 80 initialDelaySeconds: 5 periodSeconds: 3 env: - name: RACK_ENV value: production - name: PORT value: 80 volumeMounts: - name: tmp mountPath: /tmp volumes: - name: tmp emptyDir: {}
ߓನ
Deployment ߓನೞӝ Bash # Get credentials $ gcloud container clusters
get-credentials my-awesome-cluster Fetching cluster endpoint and auth data. kubeconfig entry generated for my-awesome-cluster.
Deployment ߓನೞӝ Bash # Get credentials $ gcloud container clusters
get-credentials my-awesome-cluster Fetching cluster endpoint and auth data. kubeconfig entry generated for my-awesome-cluster. # Deploy! $ kubectl apply -f path/to/deployment.yml deployment "myapp-deployment" created
yaml deployment.yml apiVersion: apps/v1beta1 kind: Deployment metadata: name: myapp-deployment spec:
replicas: 3 template: metadata: labels: app: myapp spec: containers: - name: myapp image: gcr.io/my-project/myapp:3.0.0 resources: requests: cpu: 200m memory: 100Mi limits: cpu: "4" memory: 8Gi livenessProbe: httpGet: path: / port: 80 readinessProbe: httpGet: path: / port: 80 initialDelaySeconds: 5 periodSeconds: 3 env: - name: RACK_ENV value: production - name: PORT value: 80 volumeMounts: - name: tmp mountPath: /tmp volumes: - name: tmp emptyDir: {}
yaml deployment.yml apiVersion: apps/v1beta1 kind: Deployment metadata: name: myapp-deployment spec:
replicas: 30 template: metadata: labels: app: myapp spec: containers: - name: myapp image: gcr.io/my-project/myapp:3.0.0 resources: requests: cpu: 200m memory: 100Mi limits: cpu: "4" memory: 8Gi livenessProbe: httpGet: path: / port: 80 readinessProbe: httpGet: path: / port: 80 initialDelaySeconds: 5 periodSeconds: 3 env: - name: RACK_ENV value: production - name: PORT value: 80 volumeMounts: - name: tmp mountPath: /tmp volumes: - name: tmp emptyDir: {}
yaml deployment.yml apiVersion: apps/v1beta1 kind: Deployment metadata: name: myapp-deployment spec:
replicas: 30 template: metadata: labels: app: myapp spec: containers: - name: myapp image: gcr.io/my-project/myapp:3.1.0 resources: requests: cpu: 200m memory: 100Mi limits: cpu: "4" memory: 8Gi livenessProbe: httpGet: path: / port: 80 readinessProbe: httpGet: path: / port: 80 initialDelaySeconds: 5 periodSeconds: 3 env: - name: RACK_ENV value: production - name: PORT value: 80 volumeMounts: - name: tmp mountPath: /tmp volumes: - name: tmp emptyDir: {}
Deployment ܀݂সؘ Bash kubectl apply -f path/to/deployment.yml deployment "myapp-deployment" updated
Node Pool୶о߂ઁ
Node Pool୶о߂ઁ ⿏ਬোೞޅೠஹೊਗഝਊ ೠੋझఢझӒܛ$16ࢎਊܫੌٸҗࠗೞ࢚కੋܲੋझఢझӒ ܛܳഝਊೡࣻহਸө ⿏ߓನରߣѢ۽ "QQ&OHJOFա)FSPLVэ1BB4ۢಞܻೞѱߓನೡࣻਸө ⿏ৈ۞ҳࢿਃࣗܳ߹ѐ۽ҙܻ೧ঠೣ
۽٘ߖ۠ࢲ झ ۽Ӓझܻ߁җэҳࢿਃࣗܳಞܻೞѱࢸೡ ࣻחহਸө
Node Pool୶о߂ઁ $ gcloud container node-pools create my-new-nodepool \ --cluster
my-awesome-cluster \ --machine-type n1-standard-16 \ --num-nodes 5 Bash
Preemptible Node Pool
Preemptible VM (PVM)
Preemptible VM (PVM)
Preemptible Node Pool $ gcloud beta container node-pools create my-new-nodepool
\ --cluster my-awesome-cluster \ --machine-type n1-standard-16 \ --num-nodes 5 \ --preemptible Bash BETA
PVM with nodeSelector apiVersion: v1 kind: Pod spec: nodeSelector: !cloud.google.com/gke-preemptible
yaml
PVM with nodeAffinity apiVersion: v1 kind: Pod spec: affinity: nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: cloud.google.com/gke-preemptible operator: DoesNotExist yaml BETA
Datadog Agent ܳాೠݽפఠ݂
None
Datadog Agentࢸ $ kubectl create -f dd-agent.yaml daemonset "dd-agent" created
Bash
ChatOps োز
۽Ӓझܻ߁߂
۞झఠࢸ $ gcloud container clusters create my-awesome-cluster \ --zone asia-northeast1-a
\ --enable-cloud-logging --enable-cloud-monitoring \ --machine-type n1-standard-4 \ —-num-nodes 3 Bash
۽Ӓী
Stackdriver Logging ⿏$POUBJOFS&OHJOFਸॵݶਗܼࢸоמ ⿏ఫझ+40/ನݘਗ ⿏पदр۽Ӓझܻ߁ ⿏ޖܐ౭যઁҕ ۽ંೠ׳(# ੌਬ ⿏"84ܻࣗझبݽפఠ݂оמ
⿏$MPVE4UPSBHF #JH2VFSZ 1VC4VCਵ۽۽ӒFYQPSUоמ
Stackdriver Logging
BigQuery Export
റ ⿏ ೠੋझఢझӒܛ$16ࢎਊܫੌٸҗࠗೞ࢚కੋܲੋझఢझӒܛܳഝਊೡࣻহਸө ªৈਗ୭ࣗച ⿏ "QQ&OHJOFա)FSPLVэ1BB4ۢಞܻೞѱߓನೡࣻחহਸө ªLVCFDUMழݔ٘ۄੋبҳ۽एߓನزച ⿏
झ ۽Ӓझܻ߁җэҳࢿਃࣗܳಞܻೞѱࢸೡࣻחহਸө ªࠗ࠙ੋۄҳࢿਃࣗܳऔѱࢸоמ
Case Study: StoriesAds ࢜۽ࢲ࠺झܳ$POUBJOFS&OHJOFী۠டೞӝ
Make Instagram Stories Ads for your brand.
Schedule April 2017 2 9 16 23 30 3 10
17 24 4 11 18 25 5 12 19 26 6 13 20 27 7 14 21 28 8 15 22 29
Schedule April 2017 2 9 16 23 30 3 10
17 24 4 11 18 25 5 12 19 26 6 13 20 27 7 14 21 28 8 15 22 29 ൞ݎ۠டੌ
Schedule April 2017 2 9 16 23 30 3 10
17 24 4 11 18 25 5 12 19 26 6 13 20 27 7 14 21 28 8 15 22 29 ۽షఋೝ ۽ંࣇস ൞ݎ۠டੌ
Schedule April 2017 2 9 16 23 30 3 10
17 24 4 11 18 25 5 12 19 26 6 13 20 27 7 14 21 28 8 15 22 29 ۽షఋೝ ۽ંࣇস ൞ݎ۠டੌ ߔূ٘ۿূ٘ѐߊ $*ജ҃ࣇস
Schedule April 2017 2 9 16 23 30 3 10
17 24 4 11 18 25 5 12 19 26 6 13 20 27 7 14 21 28 8 15 22 29 ۽షఋೝ ۽ંࣇস ൞ݎ۠டੌ ߔূ٘ۿূ٘ѐߊ $*ജ҃ࣇস ۽؋࣌ജ҃ҳ୷
Challenges ⿏ઁೠػੌ ࢜۽بҳٜܳ݅ӝਤ೧ӝഥ࠺ਊਸऔࢎܻೡࣻহח࢚ട ⿏ࣁ҅ࢎਊ࢚ܳਵ۽ೠࢲ࠺झ %BZࠗఠࣁ҅ࢎਊীѱೠࣘبܳઁҕ೧যঠೠ ⿏ஏೞӝ൨ٚߑޙࣻ ѱࢎਊೡٸח҃ઁਵ۽ೞҊ ࢎਊоૐоೣীٮۄਬোೞѱഛೡࣻযঠೠ
Challenges Container Engine
ইఃఫ Container Engine Redis Task Queue Stackdriver Logging Cloud CDN
Container Builder Docker image builds Frontend k8s Deployment Multiple Pods Backend k8s Deployment Multiple Pods Worker k8s Deployment Multiple Pods Datadog Monitoring Cloud Datastore Frontend k8s Service Backend k8s Service StoriesAds k8s Ingress GitHub Source Repository Travis CI Continuous Integration Cloud Load Balancing
Container Builder Container Engine Redis Task Queue Stackdriver Logging Cloud
CDN Container Builder Docker image builds Frontend k8s Deployment Multiple Pods Backend k8s Deployment Multiple Pods Worker k8s Deployment Multiple Pods Datadog Monitoring Cloud Datastore Frontend k8s Service Backend k8s Service StoriesAds k8s Ingress GitHub Source Repository Travis CI Continuous Integration Cloud Load Balancing
Container Builder ⿏$MPVE4PVSDF3FQPTJUPSZ (JU)VC #JUCVDLFUਗ ⿏࠳ےաకӒоੌઑѤীݏਵݶ࠽٘प೯ ⿏۽Ӓपदрഛੋоמ ⿏ޖܐ౭যઁҕ ۽ંೞܖ࠙࠽٘दрઁҕ
⿏ৈ۞ஶపց߽ܳ۳۽ҳزоמ ⿏ݒפ٘ࢲ࠺झ
yaml cloudbuild.yaml steps: - name: 'gcr.io/keynote-demo-project/node:7.9.0' args: ['yarn'] id: 'install-packages'
yaml cloudbuild.yaml steps: - name: 'gcr.io/keynote-demo-project/node:7.9.0' args: ['yarn'] id: 'install-packages'
- name: 'gcr.io/keynote-demo-project/node:7.9.0' args: ['yarn', 'run', 'build'] env: - 'BACKEND=staging' - 'COMMIT_SHA=$COMMIT_SHA' waitFor: ['install-packages'] id: 'staging' - name: 'gcr.io/keynote-demo-project/node:7.9.0' args: ['yarn', 'run', 'build'] env: - 'BACKEND=production' - 'COMMIT_SHA=$COMMIT_SHA' waitFor: ['install-packages'] id: 'production'
yaml cloudbuild.yaml steps: - name: 'gcr.io/keynote-demo-project/node:7.9.0' args: ['yarn'] id: 'install-packages'
- name: 'gcr.io/keynote-demo-project/node:7.9.0' args: ['yarn', 'run', 'build'] env: - 'BACKEND=staging' - 'COMMIT_SHA=$COMMIT_SHA' waitFor: ['install-packages'] id: 'staging' - name: 'gcr.io/keynote-demo-project/node:7.9.0' args: ['yarn', 'run', 'build'] env: - 'BACKEND=production' - 'COMMIT_SHA=$COMMIT_SHA' waitFor: ['install-packages'] id: 'production' - name: 'gcr.io/cloud-builders/docker' args: [ 'build', '-t', 'gcr.io/$PROJECT_ID/frontend:staging-$COMMIT_SHA', '--build-arg', 'backend=staging', '.' ] waitFor: ['staging'] - name: 'gcr.io/cloud-builders/docker' args: [ 'build', '-t', 'gcr.io/$PROJECT_ID/frontend:production-$COMMIT_SHA', '--build-arg', 'backend=production', '.' ] waitFor: ['production']
yaml cloudbuild.yaml steps: - name: 'gcr.io/keynote-demo-project/node:7.9.0' args: ['yarn'] id: 'install-packages'
- name: 'gcr.io/keynote-demo-project/node:7.9.0' args: ['yarn', 'run', 'build'] env: - 'BACKEND=staging' - 'COMMIT_SHA=$COMMIT_SHA' waitFor: ['install-packages'] id: 'staging' - name: 'gcr.io/keynote-demo-project/node:7.9.0' args: ['yarn', 'run', 'build'] env: - 'BACKEND=production' - 'COMMIT_SHA=$COMMIT_SHA' waitFor: ['install-packages'] id: 'production' - name: 'gcr.io/cloud-builders/docker' args: [ 'build', '-t', 'gcr.io/$PROJECT_ID/frontend:staging-$COMMIT_SHA', '--build-arg', 'backend=staging', '.' ] waitFor: ['staging'] - name: 'gcr.io/cloud-builders/docker' args: [ 'build', '-t', 'gcr.io/$PROJECT_ID/frontend:production-$COMMIT_SHA', '--build-arg', 'backend=production', '.' ] waitFor: ['production'] images: [ 'gcr.io/$PROJECT_ID/frontend:staging-$COMMIT_SHA', 'gcr.io/$PROJECT_ID/frontend:production-$COMMIT_SHA' ]
Deployment Container Engine Redis Task Queue Stackdriver Logging Cloud CDN
Container Builder Docker image builds Frontend k8s Deployment Multiple Pods Backend k8s Deployment Multiple Pods Worker k8s Deployment Multiple Pods Datadog Monitoring Cloud Datastore Frontend k8s Service Backend k8s Service StoriesAds k8s Ingress GitHub Source Repository Travis CI Continuous Integration Cloud Load Balancing
yaml deployment-frontend.yaml apiVersion: apps/v1beta1 kind: Deployment metadata: name: frontend-deployment spec:
replicas: 2 template: metadata: labels: app: frontend spec: containers: - name: frontend image: gcr.io/project/frontend:staging-v01 resources: requests: memory: 100Mi ports: - containerPort: 80
yaml deployment-api.yaml apiVersion: apps/v1beta1 kind: Deployment metadata: name: api-deployment spec:
replicas: 3 template: metadata: labels: app: api spec: containers: - name: api image: gcr.io/project/api:v01 resources: requests: memory: 100Mi ports: - containerPort: 80 env: - name: RAILS_ENV value: production - name: RAILS_LOG_TO_STDOUT value: "true" - name: CONFIG_KEY valueFrom: configMapKeyRef: name: my-configs key: CONFIG_KEY - name: SECRET_KEY valueFrom: secretKeyRef: name: my-secrets key: SECRET_KEY
yaml deployment-api.yaml apiVersion: apps/v1beta1 kind: Deployment metadata: name: api-deployment spec:
replicas: 3 template: metadata: labels: app: api spec: containers: - name: api image: gcr.io/project/api:v01 resources: requests: memory: 100Mi ports: - containerPort: 80 env: - name: RAILS_ENV value: production - name: RAILS_LOG_TO_STDOUT value: "true" - name: CONFIG_KEY valueFrom: configMapKeyRef: name: my-configs key: CONFIG_KEY - name: SECRET_KEY valueFrom: secretKeyRef: name: my-secrets key: SECRET_KEY
secret.yaml apiVersion: v1 kind: Secret metadata: name: my-secrets type: Opaque
data: SECRET_KEY: <base64_string> config_map.yaml apiVersion: v1 kind: ConfigMap metadata: name: my-configs type: Opaque data: CONFIG_KEY: <base64_string>
Container Engine Redis Task Queue Stackdriver Logging Cloud CDN Container
Builder Docker image builds Frontend k8s Deployment Multiple Pods Backend k8s Deployment Multiple Pods Worker k8s Deployment Multiple Pods Datadog Monitoring Cloud Datastore Frontend k8s Service Backend k8s Service StoriesAds k8s Ingress GitHub Source Repository Travis CI Continuous Integration Cloud Load Balancing Cloud Datastore
0 6 / 0 7/ 20 1 7, 1 4
*4 5 P ag e 1 of 1 https:/ /cloud.google.com/storage-options/
Cloud Datastore ⿏#JH5BCMFীӝ߈ਸك/P42-ؘఠ߬झ ⿏ࢥ٬ TIBSEJOH җࠂઁ SFQMJDBUJPO ਸزਵ۽ҙܻೞৈਬোೠഛоמ ⿏ੋؙझਗ زࢤࢿ߂ࣻزࢤࢿ
⿏ੋझఢझҗӘইצҗয়ಌۨ࣌җӘ ⿏ޖܐ౭যઁҕ ⿏/JBOUJD 1PL䟖NPO(Pѐߊࢎ ীࢲࢎਊ
https:/ /cloudplatform.googleblog.com/2016/09/bringing-Pokemon-GO-to-life-on-Google-Cloud.html
Service Container Engine Redis Task Queue Stackdriver Logging Cloud CDN
Container Builder Docker image builds Frontend k8s Deployment Multiple Pods Backend k8s Deployment Multiple Pods Worker k8s Deployment Multiple Pods Datadog Monitoring Cloud Datastore Frontend k8s Service Backend k8s Service StoriesAds k8s Ingress GitHub Source Repository Travis CI Continuous Integration Cloud Load Balancing
Service ⿏-BZFS5$16%1-PBE#BMBODJOH ⿏ౠ1PEٜਸ,VCFSOFUFT۞झఠղীࢲ যڌѱӔ೧ঠೞח ⿏,VCFSOFUFTղ4FSWJDF%JTDPWFSZ۽ 1PEղীࢲ4FSWJDFӔоמ
Service Discovery $ kubectl exec -ti debug-pod -- bash root@debug-pod:/#
curl -I http://api-service HTTP/1.1 200 OK X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Content-Type: text/html X-Request-Id: 7b194765-ixz8-1qke-9572-0fa67509e500 X-Runtime: 0.001207 Bash
service-frontend.yaml apiVersion: v1 kind: Service metadata: name: frontend-service labels: app:
frontend spec: ports: - port: 80 protocol: TCP name: http selector: app: frontend type: NodePort service-api.yaml apiVersion: v1 kind: Service metadata: name: api-service labels: app: api spec: ports: - port: 80 protocol: TCP name: http selector: app: api type: NodePort
Ingress Container Engine Redis Task Queue Stackdriver Logging Cloud CDN
Container Builder Docker image builds Frontend k8s Deployment Multiple Pods Backend k8s Deployment Multiple Pods Worker k8s Deployment Multiple Pods Datadog Monitoring Cloud Datastore Frontend k8s Service Backend k8s Service StoriesAds k8s Ingress GitHub Source Repository Travis CI Continuous Integration Cloud Load Balancing
Ingress ⿏-BZFS)551 4 -PBE#BMBODJOH ⿏ഐझܴ߂҃۽ীٮۄౠߔূ٘۽ਃۄоמ ⿏5-45FSNJOBUJPOਗ ⿏(,&ীࢲח$MPVE)551 4 -PBE#BMBODFSܳزਵ۽ࢤࢿ ⿏ఋࢎ-#৬ܰѱQSFXBSNJOHࠛਃ
⿏ਗܼਵ۽$MPVE$%/ࢸоמ BETA
yaml ingress.yml apiVersion: extensions/v1beta1 kind: Ingress metadata: name: storiesads-com-ingress annotations:
kubernetes.io/ingress.global-static-ip-name: "storiesads-com" spec: tls: - secretName: tls-certificate rules: - http: paths: - path: /api/* backend: serviceName: api-service servicePort: 80 - path: /* backend: serviceName: frontend-service servicePort: 80
Cloud Load Balancing & CDN Container Engine Redis Task Queue
Stackdriver Logging Cloud CDN Container Builder Docker image builds Frontend k8s Deployment Multiple Pods Backend k8s Deployment Multiple Pods Worker k8s Deployment Multiple Pods Datadog Monitoring Cloud Datastore Frontend k8s Service Backend k8s Service StoriesAds k8s Ingress GitHub Source Repository Travis CI Continuous Integration Cloud Load Balancing
ইఃఫ Container Engine Redis Task Queue Stackdriver Logging Cloud CDN
Container Builder Docker image builds Frontend k8s Deployment Multiple Pods Backend k8s Deployment Multiple Pods Worker k8s Deployment Multiple Pods Datadog Monitoring Cloud Datastore Frontend k8s Service Backend k8s Service StoriesAds k8s Ingress GitHub Source Repository Travis CI Continuous Integration Cloud Load Balancing
റӝ ⿏ಞܻೠदࠁ٘৬LVCFDUM$-*بҳܳࢎਊೞৈݒࡅܲߓನоמ ⿏ևߧਤदաܻয়ীоמೠনೠܻࣗझઓ ⿏(PPHMF$MPVE1MBUGPSNղܻܲࣗझ৬ো҅оਊ
ਬೡ ⿏۽؋࣌ജ҃ীӂغחੌܻࠗࣗझоই("оইצ߬ఋ࢚క ⿏"84١ৈ۞ۄ٘ܳযݣ౭ۄ٘۞झఠܳೞҊೡٸח FUDE৬NBTUFS XPSLFS֢٘ܳࢸ೧ঠೣ ⿏.JDSPTPGU"[VSFח,VCFSOFUFT֎౭࠳ਗ ⿏$PSF04৬эসী࠺ਊਸࠛೞҊ"84ա߬যݫఎীࢲݒפ٘۽оמ ⿏ӏݽоݒࢲ࠺झ҃ ࢚ݫݽܻয়ߡ٘١ਸҊ۰೮ਸٸࠗೡࣻ
We're Hiring! careers.shakr.com ࠺٣য়݃ாېܳэٜ݅যоप࠙ਸणפ
Thank you! Any questions? MINKU LEE with Shakr dev team