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
PipeCDを使用したBucketeerのGitOps-style CI/CD
Search
muras
January 20, 2021
Technology
0
770
PipeCDを使用したBucketeerのGitOps-style CI/CD
muras
January 20, 2021
Tweet
Share
More Decks by muras
See All by muras
Vim Tips
muras
0
710
Java研修成果発表
muras
0
690
Other Decks in Technology
See All in Technology
GraphQL 成熟度モデルの紹介と、プロダクトに当てはめた事例 / GraphQL maturity model
mh4gf
7
1.3k
Postman v10リリース後を振り返る / Looking back at Postman v10 after release
yokawasa
1
150
自己改善からチームを動かす! 「セルフエンジニアリングマネージャー」のすゝめ
shoota
6
250
継続的な改善 x ⾮連続的な進化
sansantech
PRO
3
140
Oracle Cloud Infrastructure:2024年4月度サービス・アップデート
oracle4engineer
PRO
1
190
コードを書く隙間を見つけて生きていく技術/Findy 思考の現在地
fujiwara3
27
5.8k
コンパウンドスタートアップのためのスケーラブルでセキュアなInfrastructure as Codeパイプラインを考える / Scalable and Secure Infrastructure as Code Pipeline for a Compound Startup
yuyatakeyama
4
4.7k
KubeCon EU 2024 Recap “Kubernetes Policy Time Machine: Where to Next?”
ryysud
0
200
ユーザーストーリーのレビューを自動化したみたの
bun913
1
410
JAWS-UG Bedrock Claude Night
yamahiro
3
540
Hands-on Gemini, the Google DeepMind LLM
meteatamel
1
110
FrontDoorとWebAppsを組み合わせた際のリダイレクト処理の注意点
kenichirokimura
1
490
Featured
See All Featured
Ruby is Unlike a Banana
tanoku
96
10k
A designer walks into a library…
pauljervisheath
200
23k
10 Git Anti Patterns You Should be Aware of
lemiorhan
648
58k
Faster Mobile Websites
deanohume
299
30k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
2
3.4k
The Invisible Side of Design
smashingmag
294
49k
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
Automating Front-end Workflow
addyosmani
1356
200k
Fantastic passwords and where to find them - at NoRuKo
philnash
37
2.5k
Debugging Ruby Performance
tmm1
70
11k
What's new in Ruby 2.0
geeforr
337
31k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
322
20k
Transcript
Developer Productivity Study #1 PipeCDを使用した Bucketeerの GitOps-style CI/CD Seiya Muramatsu
(@mura_s_)
• Seiya Muramatsu • GitHub: mura-s • Twitter: @mura_s_ •
Team: Bucketeer • Role: Backend Engineer
• Bucketeerのアーキテクチャの概要 • バックエンドのCI/CDの概要 • PipeCDを使ったGitOps & Progressive Delivery •
まとめ アジェンダ
Bucketeerのアーキテクチャの概要
• Feature Flag & A/B Testing機能を 提供する社内SaaSプロダクト • GCPプロジェクト ◦
bucketeer-dev-host ◦ bucketeer-prd-host ◦ bucketeer-dev-srv ◦ bucketeer-uat-srv ◦ bucketeer-abematv-srv: 専用prd環境 ◦ bucketeer-media-srv: 共用prd環境 ◦ bucketeer-load-srv • マルチプロジェクト/テナント アーキテクチャ
バックエンドのCI/CDの概要
• GitHubリポジトリ ◦ bucketeer: App Code (Monorepo) ◦ bucketeer-config: App
Config ◦ bucketeer-ops: CI, Terraform, ... • Buildツール ◦ Bazel (GoやPythonをbuild) • CIツール ◦ Argo Events ◦ Argo Workflows • CDツール ◦ PipeCD v0.9.4 • マニフェスト管理 ◦ Helm v3 CI/CDの全体像
• ArgoのCI Workflow ◦ 1a) Build ◦ 1b) Unit test
◦ 2) 変更されたサービスの検出 ◦ 3) GCRにImagesをpush ◦ 4) dev環境用のPR作成, マージ CIについて ◦ 5) pipectlを使ってsync & wait ◦ 6) E2E test ◦ 7a) stage環境用のPR作成, マージ ◦ 7b) prd環境用のPR作成 ◦ 7c) Git Tag, Release Note作成 ◦ 8) Slack通知
CDについて • PipeCDで計198 Appsを管理 • GitOps & Progressive Delivery •
CDの流れ ◦ CIでImageのバージョンアップを行うPR作成 ◦ PRマージ (自動/手動) ◦ カナリアPodデプロイ (prd環境のみ) ◦ 自動デプロイ分析 (prd環境のみ) ◦ 全Podsデプロイ • 詳細は次のセクションで
PipeCDを使った GitOps & Progressive Delivery
PipeCD UIでの設定 • Piped & Environment ◦ GCPプロジェクト単位で作成
PipeCD UIでの設定 • Project & API Key
Pipedの設定 • analysisProviders ◦ Automated Deployment Analysisで使用 ◦ Cluster内のPrometheusを設定 •
notifications ◦ デプロイ失敗時にSlack通知 abematv.yaml
• bucketeer-config repoの設定 (後述) • pipectlを使ったscriptを作成 ◦ Environmentを指定してAppsを一括登録 ◦ EnvironmentとAppを指定して登録
Applicationの登録 ➢ pipectlはCIでも使用 ◦ pipectl application sync --wait-status ...
Applicationの登録 • Appリスト & 詳細ページ
bucketeer-config repoの構成 ディレクトリ構成 • charts, configの下にサービスが並んでいる • Environmentごとのconfigはディレクトリで分割 ◦ デメリットもあるが現状は運用しやすさを優先
◦ cf. ブランチで分割、リポジトリで分割
bucketeer-config repoの構成 ディレクトリ構成 .pipe/analysis-template.yaml • AnalysisTemplateにはgrpc_error_rateのmetricsを設定
bucketeer-config repoの構成 ディレクトリ構成 account/dev/.pipe.yaml account/abematv/.pipe.yaml • prd環境以外はQuickSync • prd環境のみDeploy Pipeline
を設定
dev環境のデプロイ dev環境へのPR + 自動マージ
dev環境のデプロイ QuickSync
prd環境のデプロイ prd環境へのPR + 手動マージ
prd環境のデプロイ Deploy Pipeline
prd環境のデプロイ (Failure) • 自動でRollback • Slack通知
手動Rollback • リリース完了後に何らかの問題 があってRollbackしたいケース • PRをRevertしてマージするだけ
まとめ
• CI/CDの全体像 (再掲) • PipeCDを使ってどのように GitOps & Progressive Delivery を行っているかを紹介した
まとめ
• Pros ◦ PipeCD単体でGitOps, Progressive Deliveryが可能 ◦ 独自のCustom Resourceを使用せず、K8SのDeploymentのまま扱える ◦
ControlPlaneの社内SaaSが提供されている ◦ 身近で開発されているのでやりとりがしやすい • Cons ◦ 競合ツールと比べて若干の機能不足や不安定さを感じることがある ◦ コミュニティの活発さ => 一緒に盛り上げていきましょう! • 要望 ◦ Cascade deleteの実装 ▪ https://github.com/pipe-cd/pipe/issues/1285 PipeCDについての所感
Thanks!