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
How to utilize GKE for QA environment
Search
Kenichi Masuda
June 18, 2018
Technology
1.4k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
How to utilize GKE for QA environment
Kenichi Masuda
June 18, 2018
More Decks by Kenichi Masuda
See All by Kenichi Masuda
2022-09-05 「明日から新規事業を作ってみよう(実践編)」トヨタ車体株式会社様ウェビナー
masudak
0
800
2022-08-10「明日から新規事業を作ってみよう」トヨタ車体株式会社様向けウェビナー
masudak
1
620
2022-09-05 「明日から新規事業を作ってみよう(実践編)」トヨタ車体株式会社様ウェビナー
masudak
0
73
2022-06-09「新規事業担当に必要な要素とは」ヤマトシステム開発株式会社様向けウェビナー
masudak
0
870
Development/QA environments and the Go tools in it
masudak
0
7.3k
Introduction of mercari SET team
masudak
0
13k
Recommendation for using your own tools
masudak
1
5.6k
Other Decks in Technology
See All in Technology
synctest時代のhttptest Go 1.27で変わるHTTPサーバテストの裏側 / go conference2026 synctest and httptest
budougumi0617
1
650
ASTを使って影響範囲を特定する
nealle
0
130
Redmine 7.0で私が開発した新機能の狙いと背景
vividtone
1
130
Code4Lib JAPANカンファレンス2026 開会挨拶 / Code4Lib JAPAN Conference 2026: Opening Remarks
ykiyota
0
280
module Synths; end
asonas
1
130
Amazon S3 Tablesに全部任せてみた結果——コンパクション/スナップショット管理は本当に手放せるか
shigeruoda
1
450
V8コントリビュート超入門
riyaamemiya
0
160
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
240
薬剤師(ドメインエキスパート)と一緒に育てる薬局向けAIアシスタント
kakehashi
PRO
2
130
TinyGo 開発サイクルを高速化する:Go で作るエミュレータ入門
zozotech
PRO
1
370
多摩川(.dev)ランニング入門 / Tamagawa.dev#3
fujiwara3
3
440
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
1
220
Featured
See All Featured
The Spectacular Lies of Maps
axbom
PRO
1
980
Utilizing Notion as your number one productivity tool
mfonobong
4
580
Large-scale JavaScript Application Architecture
addyosmani
515
110k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Designing for Performance
lara
611
70k
Product Roadmaps are Hard
iamctodd
55
13k
How to Talk to Developers About Accessibility
jct
2
540
エンジニアに許された特別な時間の終わり
watany
108
250k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Designing for Timeless Needs
cassininazir
1
470
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
410
Transcript
How to utilize GKE for QA environment @masudak GCPUG Tokyo
June 2018
About me • @masudak ますだっくと呼ばれてます • 2016年4月入社 • SET(Software Engineer
in Test) • 最近感動したもの: ルンバ(自動化素晴らし い)
SET (Software Engineer in Test)
About SET • 2011年にGoogleが設立 • 「開発生産性とプロダクト品質の向上」がテー マ • SDET, SWETなど色々な名称ある
• メルカリSETは2016年10月設立 • 2017年春に出るUKアプリがトリガー • 当時作ったもの ◦ ローカル開発環境 ◦ QA環境 ◦ UIテスト自動化
開発フロー
開発フロー • PMが仕様をJIRAでFIX • エンジニア・デザイナーが「ローカル開発環 境」で実装 • PRを他のメンバーにレビューしてもらう • LGTM
• 「QA環境」でQAエンジニアがマニュアルQA • PMがリリース承認 • エンジニアがリリース
QA環境
QA環境 • QAエンジニアやエンジニアがQAするところ • 共通のDBや検索データを持つ • API, Frontend, Admin, Webなどが動く
• 他の人に影響を受けない独立した環境 • 独立したエンドポイント • トピックをデプロイ
QA環境要件 • 自分専用の環境 • 共通のWebUIからデプロイ • スケールしやすい • 可能な限り本番の構成を反映
2017年春
2017年春 • USアプリの刷新をすることに • PHP -> Go • Monolithic ->
Microservices • Kubernetes on GCP • 「いい感じ」でアプリをデプロイしたい
2017年前半 • CircleCIのビルド中にデプロイ • 新しい環境が自動的に • HTTPヘッダを見て、プロキシ
CircleCI • テストだけでなくreviewdogとかカバレッジと か • gcloud SDKやDockerのインストール • 古いpods削除 •
マニフェストファイルのテンプレートを書き換 え $ kubectl get pods --no-headers --selector='app=XXXX-api' | cut -f1 -d' ' | xargs kubectl delete pod そのあと $ make setup-branch-k8s
書き換え setup-branch-k8s: $(eval PR_NUMBER := $(shell basename ${CIRCLE_PULL_REQUEST})) sed -ie
"s/{{ PR_NUMBER }}/$(PR_NUMBER)/gi" ./tools/kubernetes/XXX-branch.tmpl.yml sed -ie "s/{{ BUILD_NUMBER }}/$(CIRCLE_BUILD_NUM)/gi" ./tools/kubernetes/XXX-branch.tmpl.yml /google-cloud-sdk/bin/kubectl apply -f ./tools/kubernetes/
Go reverse proxy director := func(req *http.Request) { xPrNumber :=
req.Header.Get("X-FOOBAR-PR") apisPort := 4000 req.URL.Scheme = "http" if xPrNumber != "" { req.URL.Host = fmt.Sprintf("foobar-api-%s:%d", xPrNumber, apisPort) } else { req.URL.Host = fmt.Sprintf("foobar-api:%d", apisPort) }
2017年後半
Spinnaker • CircleCIからはGCRにイメージをプッシュするだけ • それをトリガーにSpinnakerからデプロイ • オレオレyamlテンプレートがなくなる • とは言え、まだWebUI中心 •
PR podsに対応できてない
2017年後半 • reconciliation loop ◦ In Kubernetes, a controller is
a control loop that watches the shared state of the cluster through the apiserver and makes changes attempting to move the current state towards the desired state. deeeet氏: PRのstateをdesired stateとしよう!
K8s Controller for PR • ループしながら、PRの状況をチェック • Openだったら、既存のRSを複製 • 環境変数などを書き換え
• desired stateを変更 • k8sがそのdesiredに近づけていく • PR用のRS完成 • 必要に応じて、external-dnsでドメイン付与 もしかしたら、kustomizeに置き換わる運命???
終わりに • 開発生産性も品質もまだまだ追求できる • 開発環境だから、QA環境だからで終わらせない • 開発速度を上げるのはすごく大事 • たった一つのVMの時代から2年でここまで来た •
parityなどを考えるとまだまだ課題は多い • 是非情報交換していきましょう
We are hiring!! • ソフトウェアエンジニア(SET: Software Engineer in Test) •
ソフトウェアエンジニア(SET iOS: Software Engineer in Test iOS)
ご清聴 ありがとうございました