Upgrade to Pro — share decks privately, control downloads, hide ads and more …

webサイトだって Serverlessで運営やりたいんや!

webサイトだって Serverlessで運営やりたいんや!

JAWS FESTA 2016 Lightnig Talk

Hidetaka Okamoto

October 22, 2016
Tweet

More Decks by Hidetaka Okamoto

Other Decks in Technology

Transcript

  1. w e b αΠ τ ͩ ͬͯ S e r

    v e r l e s s Ͱ ӡ Ӧ ΍ Γ ͨ ͍ Μ΍ ʂ J A W S F E S TA 2 0 1 6 L i g h t n i g Ta l k
  2. ௨ ৗ ͷ w e b αΠ τ Λ S

    e r v e r l e s s ʹ ͯ͠ ϝ ϯ ς φ ϯε ͷ ख ؒ Λ ݮ Β ͠ ͨ ͍
  3. H i d e t a k a O k

    a m o t o • AMIMOTO ( Digitalcube ) • WordBenchKyoto Organizer • WordPress / AWS / React • SAAʹམͪͯSysOps߹֨ͨ͠
  4. ௨ ৗ ͷ w e b αΠ τ Λ S

    e r v e r l e s s ʹ ͯ͠ ϝ ϯ ς φ ϯε ͷ ख ؒ Λ ݮ Β ͠ ͨ ͍
  5. S e r v e r l e s s

    w e b a p p l i c a t i o n
  6. Ұ ൠ త ͳ S e r v e r

    l e s s w e b Ξ ϓ Ϧ έ ʔ γ ϣ ϯ
  7. Ұ ൠ త ͳ S e r v e r

    l e s s w e b Ξ ϓ Ϧ έ ʔ γ ϣ ϯ ͩ ͱ ɾ ɾ ɾ • S3্ͰαʔόαΠυϨϯμϦϯά͸࣮ߦͰ͖ͳ͍ • headλά಺ʢmetaλά౳ʣΛಈతʹग़ྗͰ͖ͳ͍ • OGP΍SEOܥͷͨΊʹ1ϖʔδ1HTMLੜ੒͢Δඞཁ͕͋Δ • ΊΜͲ͍͘͞
  8. A P I G a t e w a y

    + L a m b d a Ͱ S S R
  9. S e r v e r l e s s

    S e r v e r s i d e R e n d e r i n g
  10. s e r v e r l e s s

    . y m l functions: hello: handler: handler.hello description: Index Page events: - http: method: get path: index response: headers: Content-Type: "'text/html'" template: $input.path('$')
  11. L a m b d a f u n c

    t i o n ( n o d e j s ) module.exports.hello = (event, context, cb) => { var renderedPage = `<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <div id=“container">Hello World !</div> </body> </html>`; cb(null, renderedPage ); };
  12. ΍ ͬͯ Έ ͨ Ϧ ϯ Ϋ ʢ Q i

    i t a ʣ ɾ h t t p : / / q i i t a . c o m / m o t c h i 0 2 1 4 / i t e m s / 5 6 b 3 7 8 0 a a 5 8 8 4 0 5 7 f b d 5 ɾ h t t p : / / q i i t a . c o m / m o t c h i 0 2 1 4 / i t e m s / a 2 9 9 a b 7 1 7 5 3 d 8 8 c c 1 b d c L a m b d a ͕ H T M L ੜ ੒ ɺ A P I G a t e w a y ͔ Β ฦ ͢
  13. S e r v e r l e s s

    S e r v e r s i d e R e n d e r i n g ͩ ͱ ɾ ɾ ɾ • ίϯςϯπσʔλͲ͜Ͱ؅ཧ͢Δͷ໰୊ • ʮɾɾɾWordPress͔ΒREST APIͰͱͬͯ͘Δʁʯ • ্ཱͪ͛ΒΕΔAMIMOTO AMI • όΠόΠServerless
  14. ΍ ͬ ͺ Γ Wo rd P re s s

    ͦ ΕͰ ΋ Wo rd P re s s • ؆୯ʹαΠτΛΧελϚΠζͰ͖Δ • ଟ͘ͷਓ͕؅ཧը໘࢖͍׳ΕͯΔ • ͱΓ͋͑ͣͳΜͱ͔ͳΔ • ʮԶୡ͸ࠓ·Ͱ௨Γ࢖͍͍ͨΜ΍ʯ
  15. Wo rd P re s s ͷ ྑ ͞ ͸

    ͦ ͷ · · ɺ Π ϯ ϑ ϥ ߏ ੒ Λ S e r v e r l e s s ʹ ͠ ͨ S a a S ͸ ͳ ͍ ͔
  16. h t t p s : / / b e

    t a . g e t s h i f t e r. i o /
  17. S h i f t e r i s …

    WordPressΛ ϝϯςφϯεϑϦʔʹ ӡ༻͢Δ͜ͱ͕Ͱ͖Δ ServerlessͳSaaS
  18. S h i f t e r i s S

    e r v e r l e s s h o s t i n g s o l u t i o n f o r W P • DockerΛ࢖ͬͯʮߋ৽͍͚ͨ࣌ͩ͠ʯWordPressΛىಈ • ϑϩϯτΤϯυ͸੩తԽͯ͠S3 + CloudFront͔Β഑৴ • ʮීஈWordPress͕ଘࡏ͠ͳ͍ʯͷͰɺϝϯςφϯείετ͕ݮΒͤΔ
  19. S h i f t e r D a s

    h b o a rd ͸ S e r v e r l e s s S PA
  20. S h i f t e r i s g

    ro w i n g • ຖि໦༵Ξοϓσʔτ • betaظؒ͸ແྉͰར༻Մೳ • SFTP΍όοΫΞοϓ΋༧ఆத • Feedback͸Slackʹͯ
  21. E n j o y S e r v e

    r l e s s Wo rd P re s s : ) h t t p s : / / b e t a . g e t s h i f t e r. i o / Tw i t t e r : @ g e t s h i f t e r