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
Kubernetes Casual Talk - CyberAgent における Prow の...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Mizuki Urushida
December 07, 2021
Technology
350
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Kubernetes Casual Talk - CyberAgent における Prow の運用事例 / Kubernetes Casual Talk 2 CyberAgent
こちらで発表した資料です。
https://mercari.connpass.com/event/227362/
Mizuki Urushida
December 07, 2021
More Decks by Mizuki Urushida
See All by Mizuki Urushida
Kubernetes で実現する最先端 AI プラットフォームへの挑戦 / Challenges for advanced AI Platform by Kubernetes
zuiurs
1
1.1k
CA 1Day Youth Boot Camp コンテナ技術入門編 / CA 1Day Youth Boot Camp - Introduction to Container technology
zuiurs
2
320
Kubernetes で始める ML 基盤ハンズオン / ML Platform Hands-on with Kubernetes
zuiurs
1
1.1k
Implementation of Intelligent HPA
zuiurs
3
5.9k
Kubernetes Cluster Autoscaler Deep Dive
zuiurs
8
2.5k
Kubernetes 上で KVS をマネージドっぽく使いたい! / Managed KVS on Kubernetes
zuiurs
3
2.2k
Other Decks in Technology
See All in Technology
公式ドキュメントの歩き方etc
coco_se
1
120
Terraform共通モジュールをチーム横断で“変えられる”運用へ ― リリースと適用の分離
kekke_n
1
3.4k
LLMやAIエージェントをソフトウェアに組み込むプラクティス
shibuiwilliam
2
430
最適な自走を最小限の支援で — M&Aで拡大する組織で少人数SREが挑んだ1年 / SRE NEXT 2026
genda
0
1.5k
穢れた技術選定について
watany
17
5.6k
オブザーバビリティ、本当に活用できてる? 〜API連携×生成AIで成熟度を自動評価〜
dmmsre
1
3.6k
AIとハーネスで育てるトランスコンパイラ / 20260722 Yasushi Katayama
shift_evolve
PRO
0
100
ゴールデンパスは敷いただけでは道にならない ─ 企画部門のエンジニアが技術標準を事業価値に変えるまで
mhrtech
1
230
「AIに依存している」と 「AIを使いこなしている」の違い
k8yasuma
0
120
企業でAWS Organizationsを動かすための組織設計の考え方
nrinetcom
PRO
1
110
型は壁、Rustでもバグを直すな、表現できなくせよ
nwiizo
14
2.1k
プロダクト開発組織の現在地(Ver.2026/07) / product-organization
kaonavi
0
120
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.8k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Making the Leap to Tech Lead
cromwellryan
135
10k
Producing Creativity
orderedlist
PRO
348
40k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Exploring anti-patterns in Rails
aemeredith
3
440
So, you think you're a good person
axbom
PRO
2
2.1k
Claude Code のすすめ
schroneko
67
230k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
210
ラッコキーワード サービス紹介資料
rakko
1
3.9M
Believing is Seeing
oripsolob
1
170
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Transcript
CyberAgent における Prow の運用事例 @zuiurs Kubernetes Casual Talk #2 CyberAgent,
Inc.
漆田 瑞樹 (Urushida Mizuki) • CyberAgent, Inc. ◦ 2018 年度
新卒入社 ◦ 全社横断インフラ組織 CIU • インフラ & ソフトウェアエンジニア ◦ 機械学習・推論基盤の開発 ◦ Kubernetes 基盤の開発 (AKE) • 趣味 ◦ タイピング、筋トレ (と書きたい)
Prow • Kubernetes ベースの CI/CD システム ◦ Kubernetes のコミュニティで開発・使用されている ◦
/lgtm のような ChatOps による様々な Automation を提供 • 最近 GitHub App での運用が推奨になった ◦ リポジトリの追加が圧倒的に楽に ◦ 従来の Bot 用アカウントでの運用も可能
None
None
presubmits: - name: test-sample rerun_command: "/test-sample" always_run: true agent: kubernetes
decorate: true clone_uri: "
[email protected]
:<org>/<repo>.git" spec: containers: - image: golang:1.17 command: - "sh" - "-c" - "cd ./sample; go test ./... -v"
CyberAgent CIU での 運用ポイントを 4 つ紹介
① Inrepoconfig をメインで利用
Inrepoconfig をメインで利用 • Prow のジョブ定義の方法は 3 つ
• Inrepoconfig により各リポジトリにジョブ定義を移譲 ◦ 他の CI/CD システムと似ている(.circle, .github) ◦ 開発・CI/CD リポジトリの行ったり来たりがなくなる • ただし Periodic(定期実行)が使えない点は注意 タイプ 管理場所 説明 Prow Config Prow 設定管理 Repo Prow の設定と一緒に書けるもの Job Config 1 つの自由な Repo Kubernetes Org のジョブはこれで管理 Inrepoconfig ジョブを実行したい Repo .prow.config or .prow/ に定義可能
② 複雑なジョブは Tekton Pipeline で
複雑なジョブは Tekton Pipeline で • ジョブの実行方式を定義する Agent という概念が存在
◦ それぞれの Agent 用のコントローラーをデプロイする必要あり • 依存関係などが複雑なジョブは Tekton Pipeline を利用 ◦ Prow にはジョブ間の依存関係を定義することができない Agent 説明 kubernetes Pod でジョブを実行 jenkins Jenkins X でジョブを実行 tekton-pipeline Tekton Pipeline でジョブを実行
③ Hook と Deck の Ingress は分ける
Hook と Deck の Ingress は分ける • Prow のマニフェストは外部公開向けに作られている ◦
Deck (WebUI) と Hook (Webhook 受信・処理) の Ingress が同じ • 社内向けに運用するためには Ingress を分割する必要がある ◦ Deck は内部に、Hook は外部に公開 ◦ 外部・内部用の Controller (IngressClass) を用意して分割 Deck Ingress Hook Ingress Deck Hook Internal IP External IP Ingress Deck Hook External IP
④ GitHub App とリポジトリ Webhook のハ イブリッド
GitHub App とリポジトリ Webhook のハイブリッド • GitHub App になったのは便利だがセキュリティ的に心配 ◦
個人なら良いが Organization に入れるためには公開が必要 ◦ インストールされてしまうとそのリポジトリの Webhook が飛んでくる ▪ まあまあ気持ち悪い • リポジトリの Webhook も利用したハイブリッド構成 ◦ GitHub App は投稿 Bot としての役割のみに ◦ Webhook を送るには従来通りリポジトリに Webhook を追加 Repo Prow Event Chat GitHub App Repo Prow Event (Directly) Chat GitHub App
1 年半ほど使ってみて感じたメリデメ • メリット ◦ ChatOps や Prow の Automation
によるレビュー文化のさらなる浸透 ◦ Kubernetes ベースなのでスケールが容易・デバッグがしやすい • デメリット ◦ CI/CD の記述がいまいち ◦ リリースがないのでアップデートが大変(Master ブランチしかない) ◦ ドキュメントの整備状況的にコードを読む覚悟が必要
ChatOps は最高なので使っていこう! ChatOps 付き CI/CD ではなく CI/CD 付き ChatOps です
ご清聴ありがとうございました