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
リージョンの壁を越える、 ちょっと変わったAWSサービスの話
falken
PRO
0
270
Multica × 長期記憶:40個のミニプロジェクト管理
eiei114
0
190
AIエージェントの開発・提供におけるセキュリティリスクの論点と対策
flatt_security
2
600
PfEingのアプローチで働こう
rindrics
0
190
Self Healing Rollouts: Automating Production Fixes with Agentic AI
kdubois
0
160
Azure App Service / Container Apps の組み込み認証
kuniteru
0
210
enechainの内製セルフサービスプラットフォーム
hiyosi
0
130
From Vanilla Kubernetes to a Batteries-Included Platform: Developer Experience at 1,300+ Clusters
yosshi_
0
610
薬剤師(ドメインエキスパート)と一緒に育てる薬局向けAIアシスタント
kakehashi
PRO
2
120
Oracle Cloud Infrastructure IaaS 新機能アップデート 2026/6 - 2026/8
oracle4engineer
PRO
0
120
Guerilla InnerSource in enterprises, during the AI hype
onenashev
PRO
0
150
KPIだけでは評価できないプロダクトが考えるべき Evalsという第二の評価系 / Beyond KPIs: Evals as a Second Evaluation Framework for Products #PdEConf
aki_iinuma
4
3.7k
Featured
See All Featured
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
670
The browser strikes back
jonoalderson
0
1.6k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
530
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
710
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
For a Future-Friendly Web
brad_frost
183
10k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
820
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 です
ご清聴ありがとうございました