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
GitOps環境におけるremote_clusterでの開発
Search
yuzujoe
June 14, 2020
Programming
0
550
GitOps環境におけるremote_clusterでの開発
yuzujoe
June 14, 2020
Tweet
Share
More Decks by yuzujoe
See All by yuzujoe
2人のチームでどうやって開発者をkubernetes開発に巻き込んでいくか
yuzujoe
2
450
Other Decks in Programming
See All in Programming
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
300
Enterprise Web App. Development (2): Version Control Tool Training Ver. 5.1
knakagawa
1
120
都市をデータで見るってこういうこと PLATEAU属性情報入門
nokonoko1203
1
580
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
48
31k
エラーって何種類あるの?
kajitack
5
320
ニーリーにおけるプロダクトエンジニア
nealle
0
590
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
230
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
150
Benchmark
sysong
0
270
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
460
Node-RED を(HTTP で)つなげる MCP サーバーを作ってみた
highu
0
110
エンジニア向け採用ピッチ資料
inusan
0
170
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Building Applications with DynamoDB
mza
95
6.5k
Why Our Code Smells
bkeepers
PRO
337
57k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
The Straight Up "How To Draw Better" Workshop
denniskardys
234
140k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Gamification - CAS2011
davidbonilla
81
5.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Designing Experiences People Love
moore
142
24k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Transcript
GitOps環境におけるremote clusterでの開発 大平 譲 / Ohira Yuzuru joe (@joe_yuzupi) bellface株式会社
Agenda ・GitOpsの導入 ・remote開発環境(feature環境と呼びます) ・telepresenceを用いたremote開発
dev prod CIOps
prod dev GitOps
feature環境 feature-hoge docker build ~~ docker push ~~.ecr.~~ kubectl create
namespace ~~~~ ~~~~ ~~~~ feature-hoge feature-huga feature-test deploy-a deploy-b deploy-b deploy-b deploy-a deploy-a feature−hoge.bellface.~~
・開発者がローカルに環境を用意することなく remoteのclusterで動作検証できる ・それぞれブランチ毎の環境なので他の開発者の変更を気にする必要がない ・PRの際にレビュワーもそのまま見れるので便利 メリット
・pushの度に全てのアプリのimageがECRに積み上がるのでそれをなるべく防ぎたかった - 変更のないものも新しくimageを作成していた ・モノレポのCIOpsからGitOpsにしてリポジトリも分けた - 今までのような環境作成・検証はできない 問題・課題
・リモートのクラスタにローカルから接続できる ・クラスタのDeploymentとローカルのdocker imageを置き換えることができる - 自分のローカルでの変更の確認を remoteのクラスタで行える ・置き換えの際に環境変数や Secretなどをクラスタに設定してあるものを使える 参照 telepresence.io
Telepresence
環境の作成は今まで通りにcircleciに任せる。 circleciのマジックコメントで環境を作成できるようにする git commit -m “[depoy] ~~” circleci上でmanifestをclone kustomizeで構成管理しているのでkustomize editでnamespaceの書き換えしてdeploy
作成した環境に対してtelepresenceを使用してデバックしていく telepresence --namespace feature-hoge --swap-deployment fuga-deployment How to
feature-hoge kubectl create namespace ~~~~ ~~~~ ~~~~ kustomize ~~ |
kubectl ~~ feature-hoge feature-huga feature-test service-a service-b service-b service-b service-a service-a feature−hoge.bellface.~~ telepresence --swap-deployment
よかった点 ・pushしないと変更内容を検証できない点が telepresenceで容易にデバックできるようになった → バグなどの検証にも役にたった ・ECRにimageをpushしなくなったので管理するレジストリが減った。 ・telepresence自体の起動コマンドが冗長だったがメンバーの協力でスクリプト化でコマンド1発で ローカルのdocker buildからtelepresenceの実行まで行えたので楽になった
つまづいたところや課題点 ・EKS on Fargateを使用していたがfargate-profileの制約との相性が悪かった managed node groupで作成する方向に切り替えた ・本来のnamespaceの使い方ではない+microserviceに進んでてこのままだと きついので他の方法に切り替えたい microserviceではないけどkubernetes運用しているチームにはおすすめ
・kubernetes自体の経験がないと抵抗でtelepresence自体を使ってもらえていないので使って もらえるような活動をしたい
ありがとうございました。