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
telepresence で始める k8s 時代のローカル開発
Search
shiro16
March 29, 2019
Technology
10
5.6k
telepresence で始める k8s 時代のローカル開発
2019.03.29 Cloud Native Meetup Tokyo #7
shiro16
March 29, 2019
Tweet
Share
More Decks by shiro16
See All by shiro16
minne のアーキテクチャの進化とこれから
shiro16
1
3.1k
minne の開発環境の変革と今後
shiro16
0
1k
Rails6 upgrade タイムアタック
shiro16
2
2.4k
minne での検索改善の歴史
shiro16
1
2.2k
minne でのハイブリッドクラウド運用
shiro16
1
1.7k
マイクロサービス事始め@技術編
shiro16
0
1.1k
Other Decks in Technology
See All in Technology
社内の学びの場・コミュニティ形成とエンジニア同士のリレーションシップ構築/devreljapan2024
nishiuma
3
280
サプライチェーン攻撃に備える
ryunen344
0
270
リアルお遍路+SORACOM IoT
ozk009
1
130
AIで変わるテスト自動化:最新ツールの多様なアプローチ/ 20240910 Takahiro Kaneyama
shift_evolve
0
210
2024年のナビゲーション・フォーカス対応:Composeでキーボード・ナビゲーションをサポートしよう
tahia910
0
110
四国クラウドお遍路 2024 in 高知 エンディング
yukataoka
0
200
ロリポップ! for Gamersを支えるインフラ/lolipop for gamers infrastructure
takumakume
0
130
Next.js のページ遷移を全力で止める
ypresto
3
1.6k
突撃! 隣のAmazon Bedrockユーザー 〜YouはどうしてAWSで?〜
minorun365
PRO
3
380
テスト”ケース”駆動開発 で手戻りをなくそう
ryohma0510
0
290
Analytics-Backed App Widget Development - Served with Jetpack Glance
miyabigouji
0
550
言葉は感情の近似値である。その感情と言葉の誤差を最小化しよう ~コミュニケーションにおけるアナログ/デジタル変換の課題に立ち向かう~
nktamago
0
190
Featured
See All Featured
KATA
mclloyd
27
13k
Automating Front-end Workflow
addyosmani
1365
200k
Optimizing for Happiness
mojombo
375
69k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
The Straight Up "How To Draw Better" Workshop
denniskardys
230
130k
Debugging Ruby Performance
tmm1
72
12k
Faster Mobile Websites
deanohume
304
30k
Teambox: Starting and Learning
jrom
131
8.7k
Large-scale JavaScript Application Architecture
addyosmani
508
110k
Code Review Best Practice
trishagee
62
16k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.4k
Designing the Hi-DPI Web
ddemaree
278
34k
Transcript
ޙ౻རത(.01FQBCP *OD $MPVE/BUJWF.FFUVQ5PLZP UFMFQSFTFODFͰ࢝ΊΔ LT࣌ͷϩʔΧϧ։ൃ
νʔϑςΫχΧϧϦʔυ 5PTIJIJSP(PUP!@TIJSP NJOOFࣄۀ෦!(.0ϖύϘ
None
ຊͷ͓ͷ༰ wUFMFQSFTFODFͱ wUFMFQSFTFODFͷ͍ํ wUFMFQSFTFODFΛಋೖ͢ΔࡍͷϋϚΓϙΠϯτ wUFMFQSFTFODFͷॲཧͷྲྀΕ
ຊ͞ͳ͍༰ wLVCFSOFUFTDMVTUFSͷ͓ wLVCFSOFUFTͷجຊతͳ͓ wEPDLFSͷ͍ํ w3BJMTʹ͍ͭͯ wTTIʹ͍ͭͯ
UFMFQSFTFODFͱ
UFMFQSFTFODFͱ w୯ҰͷαʔϏεΛϦϞʔτͷ,VCFSOFUFTΫϥελʹଓ͠ͳ͕Βɺ ͦͷαʔϏεΛϩʔΧϧͰ࣮ߦ͢Δ͜ͱ͕ՄೳʹͳΔ wͦͷαʔϏε͕ΫϥελͷଞͷαʔϏεʹґଘ͍ͯ͠Δ߹Ͱɺ ୯ҰͷαʔϏεͷਝͳϩʔΧϧ։ൃΛߦ͏͜ͱ͕ՄೳʹͳΔ wϩʔΧϧͷ։ൃϚγϯΛ,VCFSOFUFTΫϥελͷҰ෦ͷΑ͏ʹಈ࡞͞ ͤΔ͜ͱ͕ՄೳʹͳΔ
LVCFSOFUFTDMVTUFS NBD
LVCFSOFUFTDMVTUFS UFMFQSFTFODF NBD
Ͳ͏͍͏͕ղܾͰ͖Δ͔ʁ
ղܾͰ͖Δ wJNBHFCVJMEQVTIQPEͷJNBHFߋ৽ͷखؒΛল͘͜ͱ͕Մೳ wϦϞʔτͷ,VCFSOFUFTΫϥελʹଓ͠ͳ͕Β։ൃͰ͖ΔΑ͏ʹͳ ΔͷͰɺϩʔΧϧ͔ΒଞͷαʔϏε ϚΠΫϩαʔϏεతͳଞͷαʔ Ϗε%# ʹଓ͕ՄೳʹͳΔ wLVCFSOFUFTͷαʔϏεͷҰ෦ͱͯ͠ػೳ͢ΔͷͰɺΞΫηεͨ͠ ࡍͷωοτϫʔΫܦ࿏͕΄΅ಉ͡ʹͳΔ
ͭ·Γշదʹ։ൃ͕Ͱ͖Δ
UFMFQSFTFODFͷ͍ํ
લఏ wIUUQ T ͰΞΫηε͕Ͱ͖ΔQPE͕͋Δ wDPOUBJOFS1PSUͰΛ։͚͍ͯΔ w͜Ε3BJMTTFSWFSͷσϑΥϧτͷQPSU͕ͦ͏ͳ͚ͩͰมߋͯ͠ ͳ͍
·ͣJOTUBMM # homebrew Λ͏ $ brew cask install osxfuse $
brew install datawire/blackbird/telepresence # ιʔε͔Β $ git clone
[email protected]
:telepresenceio/telepresence.git $ cd telepresence $ PREFIX=/path/to/install ./install.sh # bin/ ʹͰ͖Δ
UFMFQSFTFODFͷ͍ํͦͷᶃ
ϩʔΧϧͰىಈͨ͠TFSWFSʹ ΞΫηεΛྲྀ͢
ϩʔΧϧTFSWFS # k8s-deployment-name ஔ͖͍͑ͨ deployment ͷ໊લ $ telepresence --swap-deployment k8s-deployment-name
\ --run bundle exec rails s
UFMFQSFTFODFͷ͍ํͦͷᶄ
ϩʔΧϧͰىಈͨ͠EPDLFS্Ͱ ىಈ͍ͯ͠ΔTFSWFSʹΞΫηεΛྲྀ͢
ϩʔΧϧEPDLFS # k8s-deployment-name ஔ͖͍͑ͨ deployment ͷ໊લ $ telepresence --swap-deployment k8s-deployment-name
\ --docker-run --rm -it test-image:0.0.1 bundle exec rails s
ͦͷଞͷ͍ํ
ͦͷଞͷ͍ํ wࠓճհͨͭ͠Ҏ֎ʹLVCFSOFUFTDMVTUFSʹଓͯ͠৭ʑͰ ͖Δ wྫ͑UFMFQSFTFODFSVODVSMIUUQNZTFSWJDFͱΔͱQPE ্ཱ͕͕ͪΓNZTFSWJDFʹΞΫηεͨ݁͠Ռ͕ฦͬͯདྷͨΓ wIUUQTXXXUFMFQSFTFODFJPIPXUPʹશͯ ʁ ॻ͍ͯ͋Δ
ϋϚΓϙΠϯτ
QPSUΛ͍ͬͯΔ߹
QPSUΛ͍ͬͯΔ߹ wUFMFQSFTFODFΛىಈ͢ΔͱରͷQPEͷEFGBVMUͷDPOUBJOFS ͕ஔ͖ΘΔ wஔ͖ΘͬͨDPOUBJOFSͰطʹQPSUΛ༻͍ͯ͠Δҝ DPOUBJOFS1PSUͰΞΫηεΛड͚͍ͯͯͦΕΛϩʔΧϧʹྲྀͦ͏ ͱࢥͬͯग़དྷͳ͍
ղܾํ๏ w͓ͦΒ͘ݱঢ়ແ͍ͷͰҎ֎Λ͏͔͠ͳ͍
QPEʹෳίϯςφ
QPEʹෳίϯςφΛؚΊΔ߹ wUFMFQSFTFODFΛىಈ͢ΔͱରͷQPEͷEFGBVMUͷDPOUBJOFS ͕ஔ͖ΘΔ wͳͷͰEFGBVMUDPOUBJOFSҎ֎ͰDPOUBJOFS1PSUΛͬͯͦͷ QPSUͷ௨৴ΛϩʔΧϧʹஔ͖͑Δͱ͔Ζ͏ͱࢥͬͯग़དྷͳ͍
ղܾํ๏ wૉʹEFGBVMUΛ͍·͠ΐ͏ wTXBQEFQMPZNFOULTEFQMPZNFOUOBNFUBSHFUDPOUBJOFSͷ ܗࣜͰࢦఆՄೳ
EPDLFSΛ͏߹
EPDLFSΛ͏߹ wUFMFQSFTFODFͱ͍͏ΑΓશʹEPDLFSͷ wجຊతʹEPDLFSSVOͷPQUJPOͦͷ··͑Δ wͳͷͰWͱ͔ͰNPVOU͍ͨ͠ w͔͠͠EPDLFSͷNPVOU͍ NPVOU͢ΔTJ[FʹΑΔ
ղܾํ๏ wEPDLFSTZODΛ͏ wDBDIFEPQUJPOΛ͏ wEPDLFSͷϝϞϦׂΓͯΛ૿͢
UFMFQSFTFODFͷॲཧͷྲྀΕ
UFMFQSFTFODFͷॲཧͷྲྀΕᶃ wLVCFDUMWFSTJPODPOpHΛۦͯ͠ઃఆΛऔಘ͢Δ wLVCFDUMDPOUFYUA্هͰऔಘͨ͠DVSSFOUDPOUFYUPSBSHTͷDPOUFYUAHFU OTEFGBVMUͰLTDMVTUFSͱͷૄ௨֬ೝ w˞ҎԼग़ͯ͘ΔLVCFDUMͷPQUJPOʹશͯADPOUFYUIPHF OBNFTQBDFEFGBVMUA͕ண͕͍͘ͷͰলུ wLVCFDUMHFUEFQMPZNFOUPKTPOFYQPSUABSHTͷEFQMPZNFOUAͰ EFQMPZNFOUͷใΛऔಘ
UFMFQSFTFODFͷॲཧͷྲྀΕᶄ wऔಘͯ͠อ࣋ͨ͠EFQMPZNFOUͷEFGBVMUDPOUBJOFSͷใΛॻ͖͑Δ wPQUJPOͰDPOUBJOFSΛࢦఆͨ͠߹ࢦఆ͞ΕͨDPOUBJOFS wॻ͖͑ͨ༰ͰLVCFDUMBQQMZGΛߦ͍ஔ͖͑ΔQPEΛ࡞ wLVCFDUMTDBMFEFQMPZNFOUATXBQEFQMPZFNFOUͷEFQMPZNFOUA SFQMJDBTͰطଘͷQPEΛআ wLVCFDUMQPSUGPSXBSEAஔ͖͑ͨQPEOBNFA w͜ΕͰQPEͷDPOUBJOFSʹTTIͰ͖ΔΑ͏ʹͳΔ
͜͜·ͰઌͰઆ໌ͨ͠ ύλʔϯͷ͍ํͰڞ௨
·ͣϩʔΧϧͰىಈͨ͠ TFSWFSΛ͏߹
ϩʔΧϧTFSWFSΛ͏߹ᶃ wTTI Ұ෦ུ /QUFMFQSFTFODF!3 wTTI Ұ෦ུ /QUFMFQSFTFODF! -3
w্هΛߦ͏͜ͱͰQPEͱͷํͷΞΫηεΛՄೳʹ͍ͯ͠Δ
ϩʔΧϧTFSWFSΛ͏߹ᶄ wߋʹTTIVUUMFUFMFQSFTFODFͱ͍͏πʔϧ TTIVUUMFΛ UFMFQSFTFODF༻ʹΧελϚΠζͨ͠ͷ ΛͬͯLVCFSOFUFT্ ͷଞͷαʔϏεͷΞΫηεΛՄೳʹ͍ͯ͠Δ
࣍ʹϩʔΧϧͰىಈͨ͠ EPDLFSΛ͏߹
ϩʔΧϧEPDLFSΛ͏߹ᶃ wTTI Ұ෦ུ /QUFMFQSFTFODF! -3 wEPDLFSSVOͰEBUBXJSFUFMFQSFTFODFMPDBMΛͬͯEPDLFS DPOUBJOFSΛ্ཱͪ͛Δ w͜ͷDPOUBJOFSQSPYZ༻Ͱ͜ͷޙʹىಈ͢ΔDPOUBJOFSͱQPE Λͭͳׂ͙Λ͍ͯ͠ΔΑ͏Ͱ͢ɻ
ϩʔΧϧEPDLFSΛ͏߹ᶄ wTTI Ұ෦ུ /QSPPU!3 wTTI Ұ෦ུ /QUFMFQSFTFODF!3
wEPDLFSSVOҎ߱ͷΦϓγϣϯΛࢦఆͯ͠࠷ऴతʹΞΫηεΛྲྀ͢ EPDLFSDPOUBJOFSΛىಈ͢Δ
࠷ޙʹ
ͱΓ͋͑ͣͲΜͳײ͔͡ࢼ͍ͨ͠ਓ͚
ͱΓ͋͑ͣࢼ͍ͨ͠ wIUUQTHJUIVCDPNUFMFQSFTFODFJPUFMFQSFTFODFUSFF NBTUFSFYBNQMFTHVFTUCPPL w্هʹ(,&༻ͷॾʑ͕͋ΔͷͰࢼͤͦ͏ ˞ࣗ(,&ͬͯͳ ͍ͷͰࢼͯ͠ͳ͍ wIUUQTHJUIVCDPNTIJSPUFMFQSFTFODFFYBNQMFT wͪ͜ΒͰ͓खܰʹ͓ࢼ͍͚ͨͩ͠·͢ɻ
Ҏ্UFMFQSFTFODFͷհͰͨ͠
͋Γ͕ͱ͏͍͟͝·ͨ͠