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
450
GitOps環境におけるremote_clusterでの開発
yuzujoe
June 14, 2020
Tweet
Share
More Decks by yuzujoe
See All by yuzujoe
2人のチームでどうやって開発者をkubernetes開発に巻き込んでいくか
yuzujoe
2
360
Other Decks in Programming
See All in Programming
AWS Application Composerで始める、 サーバーレスなデータ基盤構築 / 20240406-jawsug-hokuriku-shinkansen
kasacchiful
1
260
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
340
Rethinking UI building strategies @ SFI 2024
letelete
0
270
チーム力を高めるスクラム実践法:カンバン公開と課題攻略について - ニフティのスクラムトーク Vol. 2 - NIFTY Tech Talk #18
niftycorp
PRO
1
110
GitHub Actionsで泣かないためにやっておきたい設定 / Recommended GHA settings to avoid crying
pinkumohikan
3
520
入門 AWS Amplify Gen2 / Introduction to AWS Amplify Gen2
genkiogasawara
1
320
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
8
3.9k
try! Swift Tokyo 2024のLT枠に採択されたプロポーザルを出すときに考えていたこと
ski
0
350
ONE WEDGE_company_guide
1wedge_one
0
430
二郎系ラーメンのコールで学ぶ AST 解析
memory1994
PRO
7
1.7k
MicrosoftのPlatform Engineeringガイドを読んで実際になにかやってみた
ymd65536
1
220
Java 22 Overview
kishida
1
180
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
7
2.3k
Fireside Chat
paigeccino
20
2.6k
Web development in the modern age
philhawksworth
202
10k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
243
20k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
321
20k
How STYLIGHT went responsive
nonsquared
92
4.8k
Designing the Hi-DPI Web
ddemaree
276
33k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
The Brand Is Dead. Long Live the Brand.
mthomps
48
28k
Making Projects Easy
brettharned
108
5.5k
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自体を使ってもらえていないので使って もらえるような活動をしたい
ありがとうございました。