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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
AI に書かせたその API、 “信頼” できますか?
nagix
0
110
Railsのように考える: See through the Master
snoozer05
PRO
3
940
映像変換サーバーなしで端末内でHLSを生成してライブ配信
hikarusato
0
120
「ピッケル本」日本語版は4.0(第6版)が出版されるべき / pickaxe4-nagoyark05
kakutani
1
160
AIによるクリエイティブ生成を行う上での試行錯誤
plaidtech
PRO
0
150
Slack上でインフラをトラブルシュートする! Agentic Platform Engineeringの第一歩
teru0x1
5
1.7k
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
3
620
HRC_Frontend_Conference_Fukuoka_2026.pdf
ts020
0
730
山手線を徒歩で一周してわかった、 位置情報アプリは「足」が最強のデバッガー
hinakko
0
160
あるけみー式LTスライド作成術
alchemy1115
2
220
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
12k
AI時代の「技術的負債」の変質ー概念の終焉と再解釈、エージェントと共に向かう先
nwiizo
0
2.7k
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
67
58k
Site-Speed That Sticks
csswizardry
13
1.5k
Designing for Performance
lara
611
70k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
Raft: Consensus for Rubyists
vanstee
142
7.7k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
520
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Six Lessons from altMBA
skipperchong
29
4.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
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)
ご清聴 ありがとうございました