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
月額10円から作るServerless Website〜Azure編〜/serverlessf...
Search
Kunihiro Morita
August 25, 2017
Technology
8
16k
月額10円から作るServerless Website〜Azure編〜/serverlessfukuoka-20170825
2017/8/25 Serverless Meetup Fukuoka #1 の資料です。
https://serverless.connpass.com/event/62473/
Kunihiro Morita
August 25, 2017
Tweet
Share
More Decks by Kunihiro Morita
See All by Kunihiro Morita
絵で覚える AWS 全 (?) サービス入門 〜 できるAWSカルタ 〜/jawsug-20191019
morita92hiro
1
2.3k
決戦用MSセンチネル/alterbooth-20190606
morita92hiro
1
240
勝手にAlibaba Cloud White Beltシリーズ Elastic Compute Service(ECS)/alieaters-20190301
morita92hiro
0
390
夏休みで差がつく!Ansible/ansiblejp-20180803
morita92hiro
2
2.6k
希望のRancher〜コンテナをアウフヘーベン〜/ranchermeetup-20171006
morita92hiro
0
270
いまからDockerで始めるGitLab CE/gitlabjp-20170919
morita92hiro
1
1.3k
コンテナ運用いきのこるには/ranchermeetup-20170807
morita92hiro
1
560
AWS Summit Tokyoをお探しですか?/jawsug-20170713
morita92hiro
0
160
ブラウザだけでインフラ操作?〜これさえあれば、何もいらない。〜/fukuazu-20170622
morita92hiro
1
890
Other Decks in Technology
See All in Technology
LeSSに潜む「隠れWF病」とその処方箋
lycorptech_jp
PRO
2
120
2024-10-30-reInventStandby_StudyGroup_Intro
shinichirokawano
1
590
アジャイルと契約 エッセンシャル版 / Agile Contracts Essential Edition
fkino
0
110
신뢰할 수 있는 AI 검색 엔진을 만들기 위한 Liner의 여정
huffon
0
170
分布で見る効果検証入門 / ai-distributional-effect
cyberagentdevelopers
PRO
4
690
omakaseしないための.rubocop.yml のつくりかた / How to Build Your .rubocop.yml to Avoid Omakase #kaigionrails
linkers_tech
3
680
ABEMA のコンテンツ制作を最適化!生成 AI x クラウド映像編集システム / abema-ai-editor
cyberagentdevelopers
PRO
1
180
AIを駆使したゲーム開発戦略: 新設AI組織の取り組み / sge-ai-strategy
cyberagentdevelopers
PRO
1
130
Shift-from-React-to-Vue
calm1205
1
1.2k
グローバル展開を見据えたサービスにおける機械翻訳プラクティス / dp-ai-translating
cyberagentdevelopers
PRO
1
150
APIテスト自動化の勘所
yokawasa
7
4k
オニオンアーキテクチャで実現した 本質課題を解決する インフラ移行の実例
hryushm
14
3k
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
Embracing the Ebb and Flow
colly
84
4.4k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
YesSQL, Process and Tooling at Scale
rocio
167
14k
Learning to Love Humans: Emotional Interface Design
aarron
272
40k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.6k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
41
2.1k
Thoughts on Productivity
jonyablonski
67
4.3k
Statistics for Hackers
jakevdp
796
220k
KATA
mclloyd
29
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
Transcript
ֹ݄10ԁ͔Β࡞Δ Serverless Website ʙAzureฤʙ #serverlessfukuoka 2017/8/25 Serverless Meetup Fukuoka #1
1
AWSฤ(2016/3/21)1 1 https://speakerdeck.com/morita92hiro/yue-e-10yuan-karazuo-ruserverless-website 2017/8/25 Serverless Meetup Fukuoka #1 2
ా༟ גࣜձࣾΦϧλʔϒʔε ιϦϡʔγϣϯΞʔΩςΫτ @morita92hiro http://hawaku.hateblo.jp 2017/8/25 Serverless Meetup Fukuoka #1
3
ʮ1܅ɺLPαΠτ࡞ͬ ͯɻCMS͍Βͳ͍ɻʯ 2017/8/25 Serverless Meetup Fukuoka #1 4
>>1ʮWeb Appsͷग़൪ʂʯ 2017/8/25 Serverless Meetup Fukuoka #1 5
Web Apps • WebαΠτɺWebΞϓϦͷϗετʹ࠷దԽͨ͠αʔϏε • ߴՄ༻ੑɺCI/CD • αΠτ٧Ί์ 2017/8/25 Serverless
Meetup Fukuoka #1 6
ʮ1܅ɺ͓͍߹Θͤϖʔδ࡞ͬͯʯ >>1ʮ͋ͬɺ͍ʯ 2017/8/25 Serverless Meetup Fukuoka #1 7
Web Apps • ASP.NETɺNode.jsɺJavaɺPHPɺPython • on Linux(preview) • Node.jsɺPHPɺ.NET CoreɺRubyɺDocker
2017/8/25 Serverless Meetup Fukuoka #1 8
ʮ1܅ɺHTTPSԽΑΖʯ 2017/8/25 Serverless Meetup Fukuoka #1 9
HTTPSԽ • SSLΛߪೖͯ͠ಋೖ • ֦ுػೳͱͯ͠Let's Encrypt͕͑Δ 2017/8/25 Serverless Meetup Fukuoka
#1 10
>>1ʮWebαΠτʹ Web App࠷ద͊… ( ˘ω˘)ţźōʯ 2017/8/25 Serverless Meetup Fukuoka #1
11
ʮ1܅ɺྉ͕ۚɻ10ԁͲ ͍ͬͨ͜ʁʯ 2017/8/25 Serverless Meetup Fukuoka #1 12
>>1ʮWeb App Freeϓ ϥϯʹมߋʂʯ 2017/8/25 Serverless Meetup Fukuoka #1 13
>>1ʮFreeϓϥϯΧελϜυϝΠϯ͑ͳ͍ɾɾɾʯ 2017/8/25 Serverless Meetup Fukuoka #1 14
>>1ʮCDNೖΕͯΧελ ϜυϝΠϯׂΓͯʂʯ 2017/8/25 Serverless Meetup Fukuoka #1 15
Azure CDN • ίϯςϯπσϦόϦʔαʔϏε • GzipѹॖػೳͰ͞Βʹߴɺసૹίετݮʂ 2017/8/25 Serverless Meetup Fukuoka
#1 16
>>1ʮ͋ɺSSLূ໌ॻɾɾɾʯ 2017/8/25 Serverless Meetup Fukuoka #1 17
>>1ʮങͬͯΒ͓͏ʯ • Let's Encryptͷূ໌ॻAzure CDNͰ(ͨͿΜ)͑Δ • Let's Encryptͷূ໌ॻ3ϲ݄ظݶ • ࣗಈߋ৽ͷΈΛ࡞ΔΑΓങ͏΄͏͕͍҆ʢʼߪೖʣ
• DVূ໌ॻͳΒ1,000ԁ/લޙ͔ΒߪೖՄೳ • AWS Certificate Manager(ACM)͕Azureʹɾɾɾ|дƅ)ŧŽŕ 2017/8/25 Serverless Meetup Fukuoka #1 18
ొஃޙهʢగਖ਼ʣ Azure CDNʹHTTPS͕؆୯ʹ͑Δػೳ͕͋Γ·ͨ͠ɻ • Azure CDN ΧελϜ υϝΠϯͷ HTTPS ͷ༗ޮԽ
https://docs.microsoft.com/ja-jp/azure/cdn/cdn-custom-ssl 2017/8/25 Serverless Meetup Fukuoka #1 19
தؒ·ͱΊ • 10ԁ/݄͙Β͍ʁ+SSLূ໌ॻ(Web Appແྉϓϥϯ) • 1,000ԁ/݄͙Β͍ʁ(Web App༗ྉϓϥϯ)ɻαΠτ٧Ί์ 2017/8/25 Serverless Meetup
Fukuoka #1 20
ʮ1܅ɺ͜ΕαʔόʔϨεͳͷʁʯ >>1ʮPaaSͰ͢ʯ 2017/8/25 Serverless Meetup Fukuoka #1 21
αʔόʔϨεͱ2 ऍᷟʹઆ๏Ͱ͕͢… αʔόʔϨεɺαʔόʔ͕ͳ͍͜ͱΛࣔ͢Θ͚Ͱͳ͘ɺ։ ൃऀ͕αʔόʔʹ͍ͭͯ৺͢Δඞཁ͕ͳ͍͜ͱΛ͍ࣔͯ͠Δ ͚ͩͰ͢ɻ ैདྷͷΞϓϦέʔγϣϯ։ൃͷେ͖ͳ෦ɺΞϓ ϦέʔγϣϯͷཁٻΛຬͨͨ͢ΊͷιϦϡʔγϣϯͷεέʔϦ ϯάɺϗεςΟϯάɺࢹʹؔ͢Δ࣭ʹ͑Δͱ͜Ζʹ͋Γ· 2 https://docs.microsoft.com/ja-jp/azure/logic-apps/logic-apps-serverless-overview
2017/8/25 Serverless Meetup Fukuoka #1 22
>>1ʮมߋʂʯ 2017/8/25 Serverless Meetup Fukuoka #1 23
>>1ʮBLOB͏Αʂʯ 2017/8/25 Serverless Meetup Fukuoka #1 24
Azure Blob Storage • ΦϒδΣΫτετϨʔδ • ؆қ੩తαΠτ • ੑ(LRS/GRS/RA-GRS) 2017/8/25
Serverless Meetup Fukuoka #1 25
>>1ʮindex.htmlະରԠɾɾɾʯ http://example.com/ͷΞΫηεͰindex.htmlΛදࣔͯ͘͠Εͳ͍ 2017/8/25 Serverless Meetup Fukuoka #1 26
>>1ʮCDNೖΕΔʂʯ 2017/8/25 Serverless Meetup Fukuoka #1 27
Azure CDN Rules Engine3 • HTTPཁٻͷॲཧํ๏ΛΧελϚΠζՄೳ • ReWrite RuleͰindex.htmlରԠ5 5
https://stackoverflow.com/questions/37368829/azure-cdn-rules-engine-to-rewrite-default-document-and-remove-html- extension 3 https://docs.microsoft.com/ja-jp/azure/cdn/cdn-rules-engine 2017/8/25 Serverless Meetup Fukuoka #1 28
>>1ʮ͋ͬɺ͓͍߹Θ ͤϖʔδ!ʯ 2017/8/25 Serverless Meetup Fukuoka #1 29
>>ʮJSͰBLOBʹPOST͓͍ͯ͠߹ Θͤσʔλஔ͍ͯɺʯ 2017/8/25 Serverless Meetup Fukuoka #1 30
>>1ʮJS͕BLOBͷॻ͖ࠐΈݖݶඞ ཁ͠ɺJSʹೝূใΛॻ͖ࠐΉͷ ɾɾɾʯ 2017/8/25 Serverless Meetup Fukuoka #1 31
>>1ʮ͍ࣺͯͳೝূใΛऔಘͰ͖ Εɾɾɾʯ 2017/8/25 Serverless Meetup Fukuoka #1 32
>>1ʮSASͱAzure Functionʂʯ 2017/8/25 Serverless Meetup Fukuoka #1 33
Shared Access Signatures(SAS) • ະೝূήετʹॻ͖ࠐΈݖݶ • Ұ࣌తͳೝূใΛൃߦ • SAS TokenAzure
Functionܦ༝Ͱऔಘ 2017/8/25 Serverless Meetup Fukuoka #1 34
Azure Function • ΠϕϯττϦΨʔͰىಈ • C#ɺF#ɺNode.jsɺPythonɺPHPɺBatchɺBash͕͑Δ • ͓͍߹Θ͕ͤདྷͨΒඞཁͳ௨ઌ 2017/8/25 Serverless
Meetup Fukuoka #1 35
ิ • ͓͍߹Θͤσʔλஔ͖ʹCORSઃఆ • POST߈ܸ͞Εͨ͘ͳ͍ͷͰ͔ͬ͠Γ੍ݶ! 2017/8/25 Serverless Meetup Fukuoka #1
36
>>1ʮͰ௨ʹඞཁͳೝূใΛ FunctionʹຒΊࠐΈͨ͘ͳ͍ɾɾɾʯ 2017/8/25 Serverless Meetup Fukuoka #1 37
>>1ʮThe Twelve-Factor Appʯ4 4 https://12factor.net/ja/ 2017/8/25 Serverless Meetup Fukuoka #1
38
3ষ ઃఆ4 ઃఆΛڥมʹ֨ೲ͢Δ ΞϓϦέʔγϣϯ࣌ʹઃఆΛఆͱͯ͠ίʔυʹ֨ೲ͢ Δɻ͜ΕTwelve-Factorʹҧ͍ͯ͠ΔɻTwelve-Factor ઃఆ Λίʔυ͔Βݫີʹ͢Δ͜ͱ Λཁٻ͢ΔɻઃఆσϓϩΠ ͝ͱʹେ͖͘ҟͳΔ͕ɺίʔυͦ͏Ͱͳ͍ɻ 4
https://12factor.net/ja/ 2017/8/25 Serverless Meetup Fukuoka #1 39
>>1ʮAzure FunctionͷڥมΛ͏Αʯ 2017/8/25 Serverless Meetup Fukuoka #1 40
தؒ·ͱΊ • 10ԁ/݄͙Β͍ʁʴSSLূ໌ॻ 2017/8/25 Serverless Meetup Fukuoka #1 41
ʮ1܅ɺ࣌ػցֶशʯ 2017/8/25 Serverless Meetup Fukuoka #1 42
>>1ʮɾɾɾʯ 2017/8/25 Serverless Meetup Fukuoka #1 43
>>1ʮCognitive Services!ʯ 2017/8/25 Serverless Meetup Fukuoka #1 44
Cognitive Services • REST APIͷαʔϏε܈ • ײݕग़ɺࢹ֮ೝࣝɺԻೝࣝɺݴޠཧղͳͲࢁ • ػցֶशͷ͕ࣝͳͯ͑͘Δ 2017/8/25
Serverless Meetup Fukuoka #1 45
Մೳੑ∞ • ࠓճͷέʔεͩͱ͓͍߹Θͤ༰Ληϯνϝϯτੳͱ͔ • ը૾ΛPOSTग़དྷΔΑ͏ʹͯ͠ըղੳͱ͔ 2017/8/25 Serverless Meetup Fukuoka #1
46
ͪͳΈʹ 2017/8/25 Serverless Meetup Fukuoka #1 47
Azure FunctionʹPOSTύλʔϯ • Funtion࣮ߦ࣌ؒ57 • ͍λεΫQueueΛڬΜͰϐλίϥ8 8 https://buildazure.com/2017/08/15/scaling-azure-functions-with-durable-functions/ 7 https://buildazure.com/2017/08/17/azure-functions-extend-execution-timeout-past-5-minutes/
2017/8/25 Serverless Meetup Fukuoka #1 48
தؒ·ͱΊ • SAS+Azure Funtion(10ԁ/݄͙Β͍?+SSLূ໌ॻ) • Azure FunctionPOST(10ԁ/݄͙Β͍?+SSLূ໌ॻ) 2017/8/25 Serverless Meetup
Fukuoka #1 49
>>1ʮͦ͏ͩʂʯ 2017/8/25 Serverless Meetup Fukuoka #1 50
>>1ʮαʔόʔϨείʔυϨεʹ͠Α͏ʯ 2017/8/25 Serverless Meetup Fukuoka #1 51
>>1ʮLogic Appsʂʯ 2017/8/25 Serverless Meetup Fukuoka #1 52
Logic Apps • IFTTTmyThingsɺMS FlowΈ͍ͨͳͭ • ը໘ϙνϙνͰઃఆɻInfrastructure as CodeͰཧՄೳ •
ߴͳ͜ͱΛ͍ͨ͠ͱ͖Azure FunctionͱΈ߹ΘͤΔ 2017/8/25 Serverless Meetup Fukuoka #1 53
>>1ʮLogic AppsͷWebhookʹ CORSઃఆͰ͖ͳ͍ɾɾɾʯ 2017/8/25 Serverless Meetup Fukuoka #1 54
>>1ʮAzure Function ProxyڬΉʂʯ 2017/8/25 Serverless Meetup Fukuoka #1 55
Azure Function Proxy • ΤϯυϙΠϯτڞ௨Խ • API ManagementΑΓϥΠτʹ͑Δ(Β͍͠) • CORSઃఆͰ͖Δ(ࠓճ͜Ε͕త)
2017/8/25 Serverless Meetup Fukuoka #1 56
ิࢿྉ FlowɺLogic AppsɺFunctionsɺWebJobsͷൺֱ9 de:code 2017ͰAzure FunctionsͱLogic AppsͷΛ͖ͯͨ͠10 Azure App ServiceɺVirtual
MachinesɺService FabricɺCloud Servicesͷൺֱ11 11 https://docs.microsoft.com/ja-jp/azure/app-service-web/choose-web-site-cloud-service-vm 10 http://yoshidashingo.hatenablog.com/entry/2017/06/17/112504 9 https://docs.microsoft.com/ja-jp/azure/azure-functions/functions-compare-logic-apps-ms-flow-webjobs 2017/8/25 Serverless Meetup Fukuoka #1 57
>>1ʮ৽αʔϏεʂʯ 2017/8/25 Serverless Meetup Fukuoka #1 58
Event Grid6 • 8/17ੜ • preview • αʔόʔϨεΞϓϦέγϣϯ։ൃ • OpsࣗಈԽ
ࠓޙAzureͷαʔόϨεΞʔΩςΫνϟ ͷத৺ʹͳ͍ͬͯ͘ʁ 6 https://docs.microsoft.com/en-us/azure/event-grid/overview 2017/8/25 Serverless Meetup Fukuoka #1 59
Azure Container Instance • ίϯςφͷϑϧϚωʔδυαʔϏε • FaaSͷಈ࡞ڥͱͯ͠ • kubernetesͷԾϊʔυͱͯ͠ར༻Մ •
preview 2017/8/25 Serverless Meetup Fukuoka #1 60
·ͱΊ • Web Appsύλʔϯ(ิ:CognitiveՃͰར༻Մೳ) • Blobύλʔϯ 2017/8/25 Serverless Meetup Fukuoka
#1 61
ServerlessPaaS࠷దʹ࣮ݱͰ͖ Δग़དྷΔͳΒͲͪΒͰ(ɾ˲ɾ)ŘŘ!! 2017/8/25 Serverless Meetup Fukuoka #1 62
σϞ Logic Apps+Cognitive Services 2017/8/25 Serverless Meetup Fukuoka #1 63
͓ΘΓ 2017/8/25 Serverless Meetup Fukuoka #1 64