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
900
Other Decks in Technology
See All in Technology
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
550
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
フルカイテン株式会社 採用資料
fullkaiten
0
40k
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
Why does continuous profiling matter to developers? #appdevelopercon
salaboy
0
190
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.1k
【若手エンジニア応援LT会】ソフトウェアを学んできた私がインフラエンジニアを目指した理由
kazushi_ohata
0
150
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
750
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
信頼性に挑む中で拡張できる・得られる1人のスキルセットとは?
ken5scal
2
530
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
1
170
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Scaling GitHub
holman
458
140k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Site-Speed That Sticks
csswizardry
0
23
Building an army of robots
kneath
302
43k
Speed Design
sergeychernyshev
24
610
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Large-scale JavaScript Application Architecture
addyosmani
510
110k
GitHub's CSS Performance
jonrohan
1030
460k
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