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
mrubyをプロダクションに 投入する / hosting-on-mruby
Search
KONDO Uchio
July 07, 2018
Technology
4
1.5k
mrubyをプロダクションに 投入する / hosting-on-mruby
Rubyアソシエーション開発助成成果報告会
https://rubyassociation.doorkeeper.jp/events/74355
KONDO Uchio
July 07, 2018
Tweet
Share
More Decks by KONDO Uchio
See All by KONDO Uchio
大規模レガシーテストを 倒すための CI基盤の作り方 / #CICD2023
udzura
5
2.2k
Ruby x BPF in Action / RubyKaigi 2022
udzura
0
180
Narrative of Ruby & Rust
udzura
0
160
開発者生産性指標の可視化 / pepabo-four-keys
udzura
3
1.5k
Talk of RBS
udzura
0
380
Re: みなさん最近どうですか? / FGN tech meetup in 2021
udzura
0
690
Dockerとやわらかい仮想化 - ProSec-IT/SECKUN 2021 edition -
udzura
2
660
Device access filtering in cgroup v2
udzura
1
750
"Story of Rucy" on RubyKaigi takeout 2021
udzura
0
690
Other Decks in Technology
See All in Technology
Kubernetes Meetup Tokyo #67 - KEP-3619: Fine-grained SupplementalGroups Control / k8sjp67-kep-3619
everpeace
0
160
Azure Verified Moduleを触って分かった注目ポイント/azure-verified-module-begin
mhrtech
1
500
スタサプ ForSCHOOLアプリのシンプルな設計
recruitengineers
PRO
3
700
小さな勉強会の始め方、広げ方、あるいは友達の作り方 / How to Start, Grow, and Build Connections with Small Study Groups
ar_tama
6
3k
不要なリソースを自動で定期的に整理する方法 ~Sandboxアカウントのコストを削減しよう!~
amixedcolor
3
130
普通の Web エンジニアのための様相論理入門 #yapcjapan / YAPC Hakodate 2024
ytaka23
7
1.6k
OPENLOGI Company Profile
hr01
0
54k
エムスリー全チーム紹介資料 / Introduction of M3 All Teams
m3_engineering
1
330
組織デバイスのための効率的なアプリケーション更新戦略
kenchan0130
0
340
Binary Hacks Rebooted 私選ハック集
nullpo_head
1
300
Microsoft 365 でデータセキュリティを強化しよう
sophiakunii
2
330
YAPC::Hakodateの映像記録を支える技術
godan
4
390
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
11
1.5k
Atom: Resistance is Futile
akmur
261
25k
Learning to Love Humans: Emotional Interface Design
aarron
272
40k
Making the Leap to Tech Lead
cromwellryan
131
8.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
25
660
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.6k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.5k
Mobile First: as difficult as doing things right
swwweet
222
8.8k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Optimizing for Happiness
mojombo
375
69k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.7k
Making Projects Easy
brettharned
115
5.9k
Transcript
8FCϗεςΟϯάج൫ར༻Ͱͷ࣮ূ࣮ݧɾ։ൃͷใࠂ ۙ౻Ӊஐ࿕(.01FQBCP *OD 3VCZΞιγΤʔγϣϯ։ൃॿՌใࠂձ NSVCZΛϓϩμΫγϣϯʹ ೖ͢Δ
γχΞɾϓϦϯγύϧΤϯδχΞ ۙ౻ Ӊஐ࿕ / @udzura https://blog.udzura.jp/ Uchio Kondo ٕज़෦ ٕज़ج൫νʔϜ
#PPLT
1SPEVDUT
$PNNVOJUZ Fukuoka.rb
IUUQTNDMPMJQPQKQ
େنϗεςΟϯά ࣮ূ࣮ݧ
ϗεςΟϯά࣮ূ࣮ݧ wίϯςφΛ༻͍ͨ8FCϗεςΟϯάͷγεςϜʹؔͯ͠ɺύϒϦοΫ Ϋϥυେ͖ͳϦιʔεΛ༻͍ͯ௨ৗͷڥͰ࣮ࢪ͠ʹ͍͘Α͏ ͳ༰ͷ࣮ݧΛߦͬͨɻ wߴෛՙ࣌ͷڍಈɺඇৗʹूੵ͕ߴ·ͬͨ߹ͷڍಈͷ֬ೝͳͲ
ͳͥ ϗεςΟϯάͰ
ϗεςΟϯάݻ༗ͷٕज़త՝ wҰൠతͳ8FCαʔϏεʹൺͯɺϓϥοτϑΥʔϜΛఏڙ͢Δϗε ςΟϯάαʔϏεͰҎԼͷΑ͏ͳ՝͕ݦஶʹͳΔ wγεςϜύϑΥʔϚϯεͷ wߴूੵੑͷ wηΩϡϦςΟͷ w͍ͣΕɺΞϓϦέʔγϣϯͷΈͳΒγεςϜྖҬͰͷ։ൃ͕ඞਢͱ ͳΔɻͦͷͷྖҬʹɺγεςϜϓϩάϥϛϯάʹڧ͍NSVCZ ϑΟοτ͢Δ
͓ޓ͍ͷվળؔ͠߹͏ NSVCZΛར༻ͨ͠ ϛυϧΣΞͷվળ NSVCZͷվળ ϗεςΟϯά ج൫ͷվળ
NSVCZΛར༻ͨ͠ ϛυϧΣΞͷվળ
ୡͰ͖ͨՌͷ͏ͪ ओͨΔͷΛհ
OHY@NSVCZ
OHY@NSVCZ wߴੑೳͳ8FCαʔό࣮/HJOYͷڍಈΛɺNSVCZͰ੍ޚͰ͖ΔΑ͏ʹ ͢Δ֦ு wϩʔυόϥϯγϯά44-ূ໌ॻͷಈతཧ͕؆ܿͳίʔυͰ࣮ݱ wࠓྲྀߦͷ4FSWJDF.FTIͰߦͳ͍ͬͯΔػೳͷઌۦ͚తଘࡏʁ
OHY@NSVCZWͷϦϦʔε wࠓճͷॿʹΑΔ࣮ݧ༰Λड͚ɺઌόʔδϣϯͷϦϦʔε wଟ͘ͷՃػೳΛ࣮
ϦΫΤετϋϯυϥͷඇಉظԽ
ϦΫΤετϋϯυϥͷඇಉظԽ wWҎલɺϫʔΧʔ͝ͱʹNSVCZͰͷॲཧϒϩοΫ͍ͯͨ͠ɻ wඇৗͳߴෛՙ࣌ɺNSVCZͰ*0όΠϯυͳॲཧΛ͍ͯ͠Δ߹ʹ εϧʔϓοτॲཧϦΫΤετͷ͕ى͜Δ͜ͱ͕͋ͬͨɻ w͜ͷରԠͷҰͱͯ͠ɺNSVCZͷϋϯυϥॲཧΛ'JCFSΛϕʔεʹඇ ಉظԽ͢Δ͜ͱʹޭͨ͠ w/HJOYࣗମͷΞʔΩςΫνϟʹ߹͍ͬͯΔ
ࠓ·Ͱͷϋϯυϥͷڍಈ 3FR 3FT NSVCZ
Wʹ͓͚Δϋϯυϥͷڍಈ 3FR 3FT NSVCZ *OJUNSC@TUBUF
'JCFSͷར༻ 'JCFSGPSFBDIIBOEMFS "XPSLFSQSPDFTT
ϕϯνϚʔΫ IUUQTICNBUTVNPUPSKQFOUSZ
େنϗεςΟϯάʹ͓͚ΔӨڹ wେنϗεςΟϯάͷҎԼͷՕॴͰOHY@NSVCZΛར༻ w֎෦%#Λ༻͍ͨಈతͳϩʔυόϥϯγϯά wϦΫΤετܖػͰͷίϯςφىಈʢ'BTU$POUBJOFSʣ w͜ͷΑ͏ʹϋϯυϥͰ֎෦"1*ͷΞΫηεɺ%#ͷΞΫηεͷΑ ͏ʹҰఆͷ*0͕ͪىͬͯ͜͠·͏ύλʔϯʹ͓͍ͯεϧʔϓοτͷ ͕͋ͬͨɻݱࡏOHY@NSVCZWͷಋೖΛྃ
ࠓޙͷ՝ wવ·ͩར༻࣮͕গͳ͘ɺΤοδέʔεͰͷόάଘࡏ͠͏ΔͷͰɺ ͦ͏ݴͬͨͷʹରॲ͍ͯ͘͠ඞཁ͕͋Δ w5$1TUSFBNͰͷϋϯυϥͳͲҰ෦·ͩ'JCFSԽ͞Ε͍ͯͳ͍ɻ ՃͰ։ൃ͍ͯ͘͠
)BDPOJXB
)BDPOJXB wNSVCZʹΑΓɺ༷ʑͳઃఆΛهड़Ͱ͖ΔίϯςφϥϯλΠϜ wҎԼͷػೳΛϓϩάϥϜͰΈ߹ΘͤΔ͜ͱ͕Ͱ͖Δ w-JOVYͷϦιʔεʢ-JOVY/BNFTQBDFͳͲʣɺϦιʔε੍ݶ ʢDHSPVQͳͲʣɺݖݶ੍ޚʢ-JOVY$BQBCJMJUZɺ4FDDPNQͳͲʣͷ ֤छίϯςφػೳ wίϯςφͷΠϕϯτʢىಈɺఀࢭɺྫ֎΄͔ʣɺىಈޙͷܦա࣌ؒ ʹ߹ΘͤͨϑοΫॲཧɺγάφϧϋϯυϥ
'BTU$POUBJOFS wίϯςφΛඞཁͳ࣌ʹॳΊͯىಈ͠ɺ·ͨఆظతͳίϯςφͷೖΕସ ͑Λ͢Δ͜ͱͰίϯςφͷཧίετͱϦιʔεޮΛ্ͤ͞Δ ίϯςφཧͷΞʔΩςΫνϟ wݱࡏɺOHY@NSVCZ )BDPOJXBͰ࣮ͯ͠ɺαʔϏεͰͷӡ༻ʹ ͍ͤͯΔ
1JDUVSFPG'BTU$POUBJOFS Web Proxy Web Request Dispatcher FastContainer Runtime CMDB ❌
FastContainer Killed 1. Check 2. Boot 3. Forward 4. Terminate
ىಈΦʔόʔϔουΛݮ͍ͨ͠ wࠓճͷେنϗεςΟϯάͰɺ'BTU$POUBJOFSΞʔΩςΫνϟΛ࠾ ༻͠ɺίϯςφཧͱϦιʔεͷར༻ޮͷ࠷େԽΛਤ͍ͬͯΔ wʮඞཁͳ࣌ͷΈىಈ͢Δෆཁͳ࣌ίϯςφΛ࡞Βͳ͍ʯͱ͍͏Ξʔ ΩςΫνϟΛ࣮ݱ͢Δʹසൟͳ࠶ىಈ͕ඞཁʹͳΓɺϢʔβମݧͱ ͍͏؍ͰΞϓϦέʔγϣϯʹΑΓىಈ࣌ͷΦʔόʔϔουΛແࢹ Ͱ͖ͳ͍
ઓུ wίϯςφͷىಈܧଓ࣌ؒΛ͘͢Δ ˠ૬ରతͳͪ࣌ؒͷׂ߹͕ݮΔͨΊɺϢʔβମݧ্͢Δ ىಈ த ϦΫΤετՄೳ
ίϯςφͷಉ࣌ىಈ w࣮ݧʹͯɺίϯςφͷಉ࣌ىಈʹؔ͢ΔݕূΛߦͬͨɻ w݁Ռͱͯ͠ɺγεςϜతͳͰ࠷ऴతʹϗετͷϝϞϦ͚ͩͷى ಈͤ͞ΒΕΔ͜ͱ͕͔͕ͬͨɺ͜ΕϋʔυΣΞతͳ্ݶͰ ͋Γɺಉ࣌ىಈΛͳΔ͘খ͘͞อͯΔͱ·͍͠ w'BTU$POUBJOFSతʹɺىಈܧଓ࣌ؒΛͳΔ͘͘ɺਫ਼៛ʹϦιʔ είϯτϩʔϧ͕Ͱ͖ΔͱϕλʔͳγεςϜʹͳΔ
ઓུ wىಈʹඞཁͳ࣌ؒࣗମΛ͘͢Δ wͦͦͷ͕ͪ࣌ؒҰఆҎ্খ͘͞ͳΕɺϨεϙϯελΠϜશମ ͷϘτϧωοΫΛΞϓϦέʔγϣϯʹҠ͢͜ͱ͕Ͱ͖Δ #PPUVQ "QQ -PHJD
NSVCZͱ $3*6ͷ࿈ܞ
$IFDLQPJOU3FTUPSF wϓϩηεͷ֤छଐੑϝϞϦঢ়ଶΛΠϝʔδʹμϯϓ͠ $IFDLQPJOU ɺ ͦΕΛݩʹϓϩηεΛߴʹ࠶ੜ͢Δ 3FTUPSF ٕज़ wίϯςφϓϩηεͰ͋Δ™ͨΊɺίϯςφͷঢ়ଶμϯϓͱɺμϯϓ Πϝʔδ͔ΒͷىಈʹԠ༻Ͱ͖Δ wදతͳ࣮ͱͯ͠$3*6
$IFDLQJOU3FTUPSF*O6TFSTQBDF ͕ ΒΕ͍ͯΔ
$3*6 w-JOVYʹ͓͚Δ$IFDLQPJOU3FTUPSFͷ࣮ wQSPDͷԼͷใΛऩू͠ɺϓϩηεͷϝϞϦͷঢ়ଶ֤छଐੑɺ ಛʹ/BNFTQBDFDHSPVQɺϑΝΠϧهड़ࢠͷঢ়ଶΛอଘ͢Δ wDSJVࣗମαʔϏεԽ͢Δ͜ͱՄೳͰɺMJCDSJVͱ͍͏"1*ϥούʔ ͷ$࣮͕ఏڙ͞Ε͍ͯΔ w%PDLFSͷDIFDLQPJOUSFTUPSF࣮ʹΘΕΔ
ϗεςΟϯάͰͷ՝ wίϯςφͷνΣοΫϙΠϯτΛ࡞͢ΔλΠϛϯά wϢʔβʔΞϓϦέʔγϣϯʹͲͷΑ͏ͳͷ͕Δ͔Θ͔Βͳ͍ͨ ΊɺՄೳͰ͋ΕͳΔ͘อ͍࣋ͯ͠Δใ͕গͳ͍λΠϛϯάɺྫ ͑ϛυϧΣΞͷઃఆ͕ϝϞϦʹΓϙʔτΛϦεϯ͢Δલɺͷ Α͏ͳ໘ͰνΣοΫϙΠϯτΛ࡞Γ͍ͨ w͜ͷࡍɺҙͷγεςϜίʔϧͳͲΛϑοΫʹνΣοΫϙΠϯτॲཧ ΛΒ͍ͤͨ
4FDDPNQͷ׆༻
4FDDPNQʹΑΔγεςϜίʔϧϑοΫ wTFDDPNQͱɺಛఆͷϓϩάϥϜʹΑΔγεςϜίʔϧͷݺͼग़͠Λ ࢹɺϑΟϧλϦϯά͢Δ-JOVYΧʔωϧͷػೳ wྫ͑ɺݺͼग़͠ͷېࢭڐՄɺݺͼग़͠ͷτϥοϓɺϩΪϯάͳͲ͕ ՄೳͱͳΔ w࡞NSVCZTFDDPNQʹΑΓNSVCZͰ੍ޚͰ͖Δ
4FDDPNQˠ$3*6ͷ࿈ܞ wྫ͑ϛυϧΣΞ͕ىಈ͠ɺϙʔτΛϦεϯ͢ΔλΠϛϯά·Ͱʹ ༷ʑͳιέοτૢ࡞ͷγεςϜίʔϧ͕Δ wͦΕΒΛܖػͱͯ͠νΣοΫϙΠϯτΛ࡞͢ΕɺىಈͷΦʔόʔ ϔουΛࣦͭͭ҆͘͠શʹϓϩηεΛ࠶ੜͰ͖Δ w)BDPOJXBͷΑ͏ͳ࣮Ͱ͋ΕɺͦΕΒͷϥΠϒϥϦΛNSVCZͰϥο ϓ͠ɺ%4-ʹΑΓରγεςϜίʔϧͷࢦఆ͕Մೳ
4FDDPNQˠ$3*6ͷ࿈ܞ IBDPOJXBDIFDLQPJOU IBDPOJXBSFTUPSF $3*6JNBHFpMFT ♻
)BDPOJXBPO$3*6 %&.0
্࣮ͷ՝ wݱࡏɺʮ$3*6͕ϓϩηεΛఀࢭ͢Δॲཧʯͱʮ4FDDPNQ͕ϓϩηε Λఀࢭ͢Δॲཧʯ͕όοςΟϯάͯ͠͠·͏͕͋Δ wҰॠσλον͢Δ͜ͱͰճආ͍ͯ͠Δ͕ɺਖ਼֬ͳλΠϛϯάΛ੍ޚ͠ ͍ͨ w$3*6ଆͰʢ͢Ͱʹࢭ·͍ͬͯΔͷͰʣఀࢭ͠ͳ͍Α͏ͳΦϓγϣ ϯΛύονͰ࣮͢ΔɺΛݕ౼
·ͱΊͱల
Ռͷ·ͱΊɾల wେنϗεςΟϯάڥͰNSVCZΛར༻͠ɺҎԼͷϛυϧΣΞվળ wOHY@NSVCZͷ'JCFSԽ w)BDPOJXBͱ$3*6ͷ࿈ܞʢ࣮վળதʣ wࠓޙNSVCZར༻ՌΛΦʔϓϯʹ͍ͨ͠ wใࠂ্ະୡͰ͋ΔΦʔέετϨʔγϣϯͷ࣮ެ։ɺίϯς φͷվળͱͱʹਐΊ͍͖ͯͨ
ँࣙͳͲ
େنΫϥυ࣮ݧ!/** wࠓճͷݚڀͰɺࠃཱใֶݚڀॴʢ/**ʣΫϥυ࣮ূ࣮ݧʹΑΓ ఏڙ͞ΕͨΫϥυڥΛར༻͍ͯ͠·ͨ͠ IUUQTQFQBCPDPNOFXTQSFTT
͝ڠྗɾ͝ࢦಋ͍͍ͨͩͨօ༷ wϖύϘͷಉ྅ͷํʑʢࢁԼ͞Μɺాதྒհ͞Μʣ wϖύϘݚڀॴ٬һݚڀһɹDIJLVXB@*5͞Μ