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
Using Heroku on entrusted development
Search
Kusamao Abe
June 22, 2017
Technology
0
1.1k
Using Heroku on entrusted development
2017/6/22 Heroku Meetup #17 Heroku Strikeでお話させていただきました。受託案件でのHeroku運用についてです
Kusamao Abe
June 22, 2017
Tweet
Share
More Decks by Kusamao Abe
See All by Kusamao Abe
Vue builds
kusamao
1
450
Javascript in the past and now
kusamao
1
160
The Essence of UI Design
kusamao
1
1.9k
Make good (better) form
kusamao
0
230
Making mock-up in web application
kusamao
0
73
Keep a distance from jQuery
kusamao
0
100
Other Decks in Technology
See All in Technology
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
370
OS 標準のデザインシステムを超えて - より柔軟な Flutter テーマ管理 | FlutterKaigi 2024
ronnnnn
1
300
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
540
複雑なState管理からの脱却
sansantech
PRO
1
160
強いチームと開発生産性
onk
PRO
35
12k
The Role of Developer Relations in AI Product Success.
giftojabu1
1
150
LINEヤフーにおけるPrerender技術の導入とその効果
narirou
1
140
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
930
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
260
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
190
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.4k
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
222
8.9k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Fireside Chat
paigeccino
34
3k
Designing the Hi-DPI Web
ddemaree
280
34k
Site-Speed That Sticks
csswizardry
0
33
RailsConf 2023
tenderlove
29
900
Become a Pro
speakerdeck
PRO
25
5k
Happy Clients
brianwarren
98
6.7k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Scaling GitHub
holman
458
140k
Adopting Sorbet at Scale
ufuk
73
9.1k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Transcript
डୗҊ݅Ͱͷ Herokuӡ༻ 2017/06/22 Heroku Meetup #17 Heroku Strike at Global
Business Hub Tokyo
גࣜձࣾλϯόϦϯWebΤϯδχΞ ҆෦ຑੜʢKusamao Abeʣ 8FCαΠτɾ8FCΞϓϦέʔγϣϯͷϚʔΫΞοϓɺ 41"8PSE1SFTTʢͭΒ͍ʣΛओʹ୲ɻϫΠϠʔ ϑϨʔϜͱ͔σβΠϯΧϯϓʹԆʑͱένΛ͚͕ͭ ͪɻઃܭͱ͔ΠϯϑϥʹटΛಥͬࠐΜͰࣗͷट ΛకΊΔͷ͕ੜۀͰ͢ɻ ࣗݾհ
λϯόϦϯ͜Μͳ੍࡞ձࣾͰ͢ w Πϯϑϥઐۀ͕͍ͳ͍ w ࣾ֎ͷύʔτφʔ͞ΜͱҰॹʹ੍ ࡞͢Δ͜ͱ͕ଟ͍ w Ҋ͔͚͕݅ͪଟ͍ w ৽نӡ༻͢Δ
w εςʔΫϗϧμʔϓϩμΫτϚ ωʔδϟʔ֎ʹ͍Δ͜ͱ͕ଟ͍
ࠓ͓͢Δ͜ͱ w ͜ͷػೳͰ͜͏มΘΓ·ͨ͠ w ͜Μͳӡ༻ͯ͠·͢
ࢦ͢͜ͱ Έͳ͞Μ͕όϯόϯ)FSPLVΛͬͯ ݟΛڞ༗ͯ͘͠ΕΔ͜ͱ
Herokuͱ ϞοΫΞοϓ 01
ϞοΫΞοϓ੍࡞ɺ Α͘Γ·͢
ैདྷ ࣾςετ ڥ master ࣗಈө ࣾςετ ڥ 4'51
ैདྷ ࣾςετ ڥ master ࣗಈө ࣾςετ ڥ 4'51 ˒ ϨϏϡʔͰ͖ͳ͍
˒ ίϯύΠϧͨ͠ίʔυΛόʔδϣϯ ཧ͢Δࠈ ˒ SFWFSUͩΔ͍
ैདྷ ࣾςετ ڥ master ࣗಈө ࣾςετ ڥ 4'51 ˒ ϨϏϡʔͰ͖ͳ͍
˒ ίϯύΠϧͨ͠ίʔυΛόʔδϣϯ ཧ͢Δࠈ ˒ SFWFSUͩΔ͍ ͜ͷੈͷऴΘΓ
ϞοΫΞοϓ੍࡞ w σβΠϯΧϯϓͱ༷ɾઃܭॻ͔Βʮঢ়ଶʯ Λ૾ͨ͠ΓσβΠφʔʹ֬ೝͨ͠Γ͠ͳ͕ Β੍࡞ w ݟ͕ͨΧϯϓ௨ΓͰ͠ΐ͏͕ͳ͍ w ҙ֎ͱ༷ॻಡΈࠐΉ͜ͱʹͳΔ w
͜ͷ͋ͱΈࠐΈΛ͢Δਓͱίϛϡχέʔ γϣϯΛͱΔ w େنͩͱҰਓͰ࡞Γ͖Εͳ͍͜ͱ͋Δ w Ͳ͏͍͏نɾํͰ࡞Δʁ w ୭ʹͲ͜Λ͓ئ͍͢Δʁ w ΫΦϦςΟνΣοΫʁ
Heroku Pipelines IUUQTEFWDFOUFSIFSPLVDPNBSUJDMFTQJQFMJOFT
Heroku Pipelines IUUQTEFWDFOUFSIFSPLVDPNBSUJDMFTQJQFMJOFT
ίʔυϕʔεΛมߋ͢Δͷʹ1VMM3FRVFTUΛग़͢ 13ʹج͍ͯ)FSPLV͕ࣗಈతʹ"QQΛ࡞ͯ͠ɺ มߋΛςετͰ͖ΔΑ͏ʹͳΔ มߋʹ͕ͳ͚ΕNBTUFSϒϥϯνʹϚʔδ͞ ΕΔ NBTUFSϒϥϯνࣗಈతʹεςʔδϯάڥʹ
ө͞Εͯɺߋʹݕূ͞ΕΔ ४උ͕ສશͳΒຊ൪ڥʹQSPNPUFʢঢ֨ʣ͠ ͯɺΤϯυϢʔβʔʹͬͯΒ͏
Heroku Review Apps master feature App: my-mockup AutoDeploy: master
Heroku Review Apps master feature App: my-mockup AutoDeploy: master
Heroku Review Apps master feature App: my-mockup AutoDeploy: master
Heroku Review Apps master feature App: my-mockup AutoDeploy: master App:
my-mockup-pr765 ParentApp: my-mockup
Heroku Review Apps master feature App: my-mockup AutoDeploy: master App:
my-mockup-pr765 ParentApp: my-mockup
Heroku Review Apps master feature App: my-mockup AutoDeploy: master App:
my-mockup-pr765 ParentApp: my-mockup App: my-mockup-pr766 ParentApp: my-mockup
w ίʔυϕʔεϨϏϡʔ(JU)VCͰ w ݟͨΠϯλϥΫγϣϯͷ ϨϏϡʔ3FWJFX"QQͰ
w ΄͔ʹ୭͕࡞ۀͯ͠Δͷ͔ؾʹ͠ ͳͯ͘ྑ͍ w (JU)VCͰNBTUFSϒϥϯνΛ QSPUFDU͢Δ͜ͱͰϨϏϡʔ͢Γൈ ͚NBTUFSQVTIͳͲͷ࣏҆ͷѱ ͍ߦҝΛېࢭͰ͖Δ w ݟͨͷࠩҟΛ֬ೝ͍͢͠
Herokuͱ ϦϦʔε 02
ܧଓతʹʜʜ w ػೳՃ w จݴௐ w ෆ۩߹मਖ਼ w ϦϦʔεࣄނͷϩʔϧόοΫ ˠ͘͘͞͞ϦϦʔε͍ͨ͠
ͱ͋Δ"84Ҋ݅ w εςʔδϯάͱຊ൪͕ଘࡏ w (JU)VCར༻ w ϦϦʔε44)Ͱೖͬͯ $ git pull
origin master
εςʔδϯάʁʁʁ w CSBODIΛΓସ͑ͯ֬ೝ͍ͯ͠Δ w NBTUFSͰͳ͍ϒϥϯνʹ͍Δ࣌ʹ Ͳ͏ͳͬͯΔͷ͔Θ͔Βͳ͍ʢ֬ ೝதʁ͠Εʁʣ w ֬ೝதʹόάमਖ਼ͨͯ͘͠ϫνϟ ϫνϟ
֬ೝڥͨΓͳ͍ʜ
શ෦·ͱΊͯ֬ೝ
ා͍ʂ
ϦϦʔεΛා͕Βͣʹߦ͏ʹʁ w ͪΌΜͱςετͯ֬͠ೝͰ͖Ε ා͘ͳ͍ w ਓඞͣϛεΛ͢Δɻى͜͞ͳ͍ ͷ͕Ұ൪͚ͩͲɺىͬͨ࣌͜ʹ͢ ͙ʹରॲͰ͖ΔΈ͕ඞཁ w ҰճʹυΧοͱΔͱࢮ͕ݦݱ
͔͠͠
͚ࣗͨͪͩͷ ϓϩμΫτ͡Όͳ͍
͓٬༷ͷ߹͋Δ w ֬ೝ͓٬͞Μʹͯ͠Β͏ w ϦϦʔελΠϛϯάίϯτϩʔ ϧ͍ͨͣ͠ w ͖ͤΓ͡Όͳͯ͘ɺڠۀͯͬ͠ ͍͖͍ͯͨ w
ຖϓϩμΫτʹுΓ͍ͯ͘Ε Δʁʁ
IUUQXXXCBDLMPHKQHJUHVJEFTUFQVQTUFQVQ@IUNM ϦϦʔεϒϥϯν
࣍ճ ຊ൪ εςʔδϯά Քಇத εςʔδϯά
࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά
ػೳՃ# ࣍ճ ຊ൪ εςʔδϯά Քಇத εςʔδϯά
࣍ճ ຊ൪ εςʔδϯά Քಇத εςʔδϯά
࣍ճ ຊ൪ εςʔδϯά Քಇத εςʔδϯά
࣍ճ ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ
࣍ճ ຊ൪ εςʔδϯά ػೳՃ$ ࣍ʑճϦϦʔε Քಇத εςʔδϯά ࠩҟ
࣍ճ ຊ൪ εςʔδϯά ػೳՃ$ ࣍ʑճϦϦʔε Քಇத εςʔδϯά release ࠩҟ
࣍ճ ຊ൪ εςʔδϯά ػೳՃ$ ࣍ʑճϦϦʔε Քಇத εςʔδϯά release master ࠩҟ
࣍ճ ຊ൪ εςʔδϯά ػೳՃ$ ࣍ʑճϦϦʔε Քಇத εςʔδϯά release master ࠩҟ
࣍ճ ຊ൪ εςʔδϯά ػೳՃ$ ࣍ʑճϦϦʔε Քಇத εςʔδϯά release master ࠩҟ
࣍ճ ຊ൪ εςʔδϯά ػೳՃ$ ࣍ʑճϦϦʔε Քಇத εςʔδϯά release master ࠩҟ
࣍ճ ຊ൪ εςʔδϯά ػೳՃ$ ࣍ʑճϦϦʔε Քಇத εςʔδϯά release master
࣍ճ ຊ൪ εςʔδϯά ػೳՃ$ ࣍ʑճϦϦʔε Քಇத εςʔδϯά release master
࣍ճ ຊ൪ εςʔδϯά ػೳՃ$ ࣍ʑճϦϦʔε Քಇத εςʔδϯά release master
Roll back w εφοϓγϣοτͷ3PMMCBDL͕ Մೳɻ͋͘·ͰҰ࣌తʹɻ w σϓϩΠ͞Εͨॱʹͭ͘όʔδϣ ϯ൪߸ͱͦͷ࣌ͷίϛοτϋογϡ ΛνΣοΫͯͦ͠ͷϦϏδϣϯʹ ͤΔ
˞"EEPOTͷঢ়ଶมԽ͠ͳ͍
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ hash:
aaaaaaa hash: bbbbbbb hash: aaaaaaa
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ hash:
aaaaaaa hash: bbbbbbb hash: aaaaaaa
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ hash:
aaaaaaa hash: bbbbbbb
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ hash:
aaaaaaa hash: bbbbbbb hash: bbbbbbb
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ ࣄނ
hash: aaaaaaa hash: bbbbbbb hash: bbbbbbb
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ ࣄނ
hash: aaaaaaa hash: bbbbbbb
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ ࣄނ
hash: aaaaaaa hash: bbbbbbb hash: aaaaaaa
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ hash:
aaaaaaa hash: bbbbbbb hash: aaaaaaa
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ hash:
aaaaaaa hash: bbbbbbb hash: aaaaaaa
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ hash:
aaaaaaa hash: bbbbbbb hash: aaaaaaa मਖ਼
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ hash:
aaaaaaa hash: bbbbbbb hash: aaaaaaa मਖ਼
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ hash:
aaaaaaa hash: bbbbbbb hash: aaaaaaa
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ ⾠ෆ۩߹
hash: aaaaaaa hash: bbbbbbb hash: aaaaaaa
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ ⾠ෆ۩߹
hash: aaaaaaa hash: bbbbbbb hash: aaaaaaa IPUpY hash: ccccccc
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ ⾠ෆ۩߹
hash: aaaaaaa hash: bbbbbbb hash: aaaaaaa IPUpY hash: ccccccc
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ ⾠ෆ۩߹
hash: aaaaaaa hash: bbbbbbb hash: aaaaaaa IPUpY hash: ccccccc hash: ccccccc
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ ⾠ෆ۩߹
hash: aaaaaaa hash: bbbbbbb hash: aaaaaaa IPUpY hash: ccccccc hash: ccccccc
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ ⾠ෆ۩߹
hash: aaaaaaa hash: bbbbbbb hash: aaaaaaa IPUpY hash: ccccccc hash: ccccccc hash: ccccccc
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ hash:
aaaaaaa hash: bbbbbbb hash: aaaaaaa IPUpY hash: ccccccc hash: ccccccc hash: ccccccc
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ hash:
aaaaaaa hash: bbbbbbb hash: aaaaaaa IPUpY hash: ccccccc hash: ccccccc hash: ccccccc
ػೳՃ# ࣍ճ ػೳՃ" ࣍ճϦϦʔε ຊ൪ εςʔδϯά Քಇத εςʔδϯά ࠩҟ hash:
aaaaaaa hash: bbbbbbb hash: aaaaaaa IPUpY hash: ccccccc hash: ccccccc hash: ccccccc hash: bbbbbbb !ccccccc
(JU)VCଆͷઃఆ w NBTUFSQVTIͯ͠ຊ൪ʹө ͞Εͳ͍ͷͰฏ w ߋʹฏҡ࣋Λաܹʹ͢ΔͳΒGPSL ܗࣜʹͯ͠SFMFBTFϒϥϯνΛकΔ
)FSPLVଆͷઃఆ w ຊ൪ڥ͓٬͞Μͱཧऀ͚ͩ ৮ΕΔΑ͏ʹ͢Δ w ΞυΦϯΛ৮͍͍͔ͬͯνΣοΫ w ڥมΛ֬ೝ͠ͳ͍ͱ%#Λ(6* Ͱ͍͡Εͳ͍
࣍ճ ຊ൪ εςʔδϯά Քಇத εςʔδϯά ઌํ୲ऀ ཧऀ ύʔτφʔ σΟϨΫλʔ deploy
or operate Add-ons
IUUQRJJUBDPNMMISLMMJUFNTFCCGCE खલຯḩ Ͱ͕͢
Herokuͱ ςετ 03
CI/CD Continuous Integration Continuous Delivery "HJMF
w ʮ࠷ॳʹ͓͖ͬͯ͘ʯ w ʮ࣭ཧΛ͍εύϯͰʯ w ʮςετ͕௨Βͳ͍ͷϨϏϡʔ ͠ͳ͍ʯ
͍
͍͖ͬͯ·͠ΐ͏
HerokuCI + CircleCI
HerokuCI w ඵͰམͪͯͨʢࠓվળʣ ˠ8FC"1*ͷςετ͕Ͱ͖ͳ͔ͬ ͨ w ϦϙδτϦͷ1VTIʹରԠ࣮ͯ͠ߦɻ 3FWJFXBQQͷൃੜͰͳ͘QVTI Ͱ࡞ w
EZOPΛফඅ w "EEPOTΛ͑Δ
CircleCI w ݁ՌΛ֬ೝ͍ͨ͠ͷʹ(JU)VC0SHT Ͱ0VUTJEF$PMMBCPSBUPSͩͱμϝɻ 0SHBOJ[BUJPO"DDFTT͕ඞཁʁ w ֎෦ͷύʔτφʔ͞ΜΛ.FNCFS ʹ͢ΔͱϦϙδτϦͷӾཡɾ࡞ ΛҰൠʹ։์Ͱ͖ͳ͘ͳΔ w
5FBNͰࣗͨͪͷϝϯόʔ͚ͩ ͷνʔϜΛ࡞ͬͯຖճͦΕΛׂ ΓͯΔํʹมߋ
None
–࡞ۀऀ͍Θ͘ l1)1ͰDJSDMFZNMͱ͔ॻ͘ͷ͍ͨΜʜz
·ͩ·ͩ͜Ε͔Β
ࠓޙ w εϐʔσΟʹ࡞Γ͡ΊΔͨΊͷ ϘΠϥʔϓϨʔτɾࣾυΩϡϝ ϯτ w %PDLFSͲ͏ͳͷ w ͦͦςετΛͪΌΜͱॻͧ͘ FUD
Thank you for your listening!