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
540
GitOps環境におけるremote_clusterでの開発
yuzujoe
June 14, 2020
Tweet
Share
More Decks by yuzujoe
See All by yuzujoe
2人のチームでどうやって開発者をkubernetes開発に巻き込んでいくか
yuzujoe
2
440
Other Decks in Programming
See All in Programming
Doma で目指す ORM 最適解
nakamura_to
1
160
Javaのルールをねじ曲げろ!禁断の操作とその代償から学ぶメタプログラミング入門 / A Guide to Metaprogramming: Lessons from Forbidden Techniques and Their Price
nrslib
1
290
〜可視化からアクセス制御まで〜 BigQuery×Looker Studioで コスト管理とデータソース認証制御する方法
cuebic9bic
2
270
少数精鋭エンジニアがフルスタック力を磨く理由 -そしてAI時代へ-
rebase_engineering
0
130
Building an Application with TDD, DDD and Hexagonal Architecture - Isn't it a bit too much?
mufrid
0
370
ワイがおすすめする新潟の食 / 20250530phpconf-niigata-eve
kasacchiful
0
260
JSAI2025 RecSysChallenge2024 優勝報告
unonao
1
380
Proxmoxをまとめて管理できるコンソール作ってみました
karugamo
1
410
Use Perl as Better Shell Script
karupanerura
0
660
💎 My RubyKaigi Effect in 2025: Top Ruby Companies 🌐
yasulab
PRO
1
130
インターフェース設計のコツとツボ
togishima
2
490
複雑なフォームを継続的に開発していくための技術選定・設計・実装 #tskaigi / #tskaigi2025
izumin5210
12
6.4k
Featured
See All Featured
Balancing Empowerment & Direction
lara
1
89
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Agile that works and the tools we love
rasmusluckow
329
21k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Designing for humans not robots
tammielis
253
25k
Speed Design
sergeychernyshev
30
970
YesSQL, Process and Tooling at Scale
rocio
172
14k
Visualization
eitanlees
146
16k
Building an army of robots
kneath
306
45k
Unsuck your backbone
ammeep
671
58k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
19
1.3k
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自体を使ってもらえていないので使って もらえるような活動をしたい
ありがとうございました。