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
520
GitOps環境におけるremote_clusterでの開発
yuzujoe
June 14, 2020
Tweet
Share
More Decks by yuzujoe
See All by yuzujoe
2人のチームでどうやって開発者をkubernetes開発に巻き込んでいくか
yuzujoe
2
410
Other Decks in Programming
See All in Programming
データベースのオペレーターであるCloudNativePGがStatefulSetを使わない理由に迫る
nnaka2992
0
240
Better Code Design in PHP
afilina
0
180
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
1
630
PRレビューのお供にDanger
stoticdev
1
240
Introduction to kotlinx.rpc
arawn
0
770
LINE messaging APIを使ってGoogleカレンダーと連携した予約ツールを作ってみた
takumakoike
0
120
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
1.2k
ファインディLT_ポケモン対戦の定量的分析
fufufukakaka
0
940
バッチを作らなきゃとなったときに考えること
irof
2
540
読まないコードリーディング術
hisaju
0
110
Amazon Bedrockマルチエージェントコラボレーションを諦めてLangGraphに入門してみた
akihisaikeda
1
150
仕様変更に耐えるための"今の"DRY原則を考える
mkmk884
9
3.2k
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Building Your Own Lightsaber
phodgson
104
6.2k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
Become a Pro
speakerdeck
PRO
26
5.2k
What's in a price? How to price your products and services
michaelherold
244
12k
We Have a Design System, Now What?
morganepeng
51
7.4k
Designing Experiences People Love
moore
140
23k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Site-Speed That Sticks
csswizardry
4
410
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自体を使ってもらえていないので使って もらえるような活動をしたい
ありがとうございました。