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

Amazon S3をWebサイト運営 (主にWordPressなど)で活用する

Amazon S3をWebサイト運営 (主にWordPressなど)で活用する

JAWS-UG Kobe 2016/06/14

Hidetaka Okamoto

June 14, 2016
Tweet

More Decks by Hidetaka Okamoto

Other Decks in Technology

Transcript

  1. A m a z o n S 3 Λ We

    b αΠ τ ӡ Ӧ ʢ ओ ʹ Wo rd P re s s ͳ Ͳ ʣ Ͱ ׆ ༻ ͢ Δ J A W S - U G K O B E 2 0 1 6 / 0 6 / 1 4
  2. ࿩ ͢ ͜ ͱ • Static Website Hosting • WordPress

    with S3 • StaticPressࣄྫ঺հ
  3. Ԭ ຊ ल ߴ • Digitalcube ΤϯδχΞ • WordBenchژ౎ϞσϨʔλ •

    Reactͱ͔AWS SDKͰJSͿΜ ·Θ͠ • Πϕϯτʹଠޑ࣋ͪࠐΉ΍ͭ
  4. ͱ Γ ͋ ͑ͣ S 3 ʹ w e b

    αΠ τ Λ Ξ οϓ ͯ͠ Έ Δ
  5. ࠓ ճ Ξ οϓ ͢ Δ ϑ Ν Πϧ .

    ᵓ ᴷ ᴷ i m a g e . p n g ᵓ ᴷ ᴷ i n d e x . h t m l ᵋ ᴷ ᴷ s t y l e . c s s
  6. $ a w s s 3 m b s 3

    : / / m y b u c k e t - - re g i o n u s - w e s t - 1
  7. $ a w s s 3 s y n c

    . s 3 : / / j a w s - u g - k o b e \ - - a c l p u b l i c - re a d u p l o a d : . / i n d e x . h t m l t o s 3 : / / j a w s - u g - k o b e / i n d e x . h t m l u p l o a d : . / s t y l e . c s s t o s 3 : / / j a w s - u g - k o b e / s t y l e . c s s u p l o a d : . / i m a g e . p n g t o s 3 : / / j a w s - u g - k o b e / i m a g e . p n g
  8. $ a w s s 3 s y n c

    . s 3 : / / j a w s - u g - k o b e \ - - a c l p u b l i c - re a d u p l o a d : . / i n d e x . h t m l t o s 3 : / / j a w s - u g - k o b e / i n d e x . h t m l u p l o a d : . / s t y l e . c s s t o s 3 : / / j a w s - u g - k o b e / s t y l e . c s s u p l o a d : . / i m a g e . p n g t o s 3 : / / j a w s - u g - k o b e / i m a g e . p n g
  9. - - a c l p u b l i

    c - re a d Λ ͭ ͚ ๨ Ε Δ ͱ 4 0 3 Τϥ ʔ ʹ ͳ Δ
  10. $ a w s s 3 w e b s

    i t e s 3 : / / j a w s - u g - k o b e / \ - - i n d e x - d o c u m e n t i n d e x . h t m l \ - - e r ro r- d o c u m e n t e r ro r. h t m l
  11. S 3 Λ ࢖ ͏ ϝ Ϧ ο τ •

    ֹ݄10ԁલޙͱ֨҆ • SLA 99.9%ͷؤৎ͞ • EC2ΑΓϝϯςָ͕ • ༰ྔແ੍ݶʢ̍ϑΝΠϧ5TBʣ
  12. ͱ ͋ Δ ܳ ೳ ਓ ͷ We b αΠ

    τ h t t p : / / o t o t a k e . c o m /
  13. ͱ ͋ Δ ܳ ೳ ਓ ͷ We b αΠ

    τ h t t p : / / f u k u y u k i . n e t / p o s t - 8 0 5 /
  14. Wo rd P re s s w i t h

    A m a z o n S 3
  15. Wo rd P re s s w i t h

    S 3 • ϝσΟΞϑΝΠϧΛS3΁ • αΠτͦͷ΋ͷΛS3΁ • FSΛϚ΢ϯτ
  16. Wo rd P re s s w i t h

    S 3 • ϝσΟΞϑΝΠϧΛS3΁ • αΠτͦͷ΋ͷΛS3΁ • FSΛϚ΢ϯτ ɹˠࠓ೔͸৮Εͳ͍
  17. Wo rd P re s s ͷ ϝ σΠ Ξ

    ϑ Ν Πϧ Λ S 3 ΁
  18. N e p h i l a c l a

    v a t a ( བྷ ৽ ් ) h t t p s : / / j a . w o rd p re s s . o rg / p l u g i n s / n e p h i l a - c l a v a t a /
  19. N e p h i l a c l a

    v a t a ( བྷ ৽ ් ) • WordPressͷϝσΟΞΛS3΁ • EBSʹ΋อଘ͢ΔͷͰ࡟আ͠ ͯ΋ࣄނΒͳ͍ • աڈͷը૾΋ࣗಈͰɹɹɹ Ξοϓϩʔυ
  20. Wo rd P re s s - > S 3

    ͷ I A M ࡞ ੒
  21. Wo rd P re s s - > S 3

    ͷ I A M ࡞ ੒
  22. S t a t i c P re s s

    h t t p : / / j a . s t a t i c p re s s . n e t /
  23. S t a t i c P re s s

    • WordPressαΠτΛHTMLʹ • ੩తԽ͞Ε͍ͯΔͷͰS3ʹ ΞοϓϩʔυͰ͖Δ • WordPressαΠτΛS3Ͱɹɹ ϗετ͢Δ͜ͱ͕Մೳʹ
  24. S t a t i c P re s s

    Λ ࢖ ͏ ͱ ྑ ͍ έ ʔε • ߋ৽ස౓͕গͳ͍αΠτͰαʔό୅Λઅ໿͍ͨ͠ • ߋ৽ͷऴΘͬͨαΠτͳͷͰϝϯςφϯεͨ͘͠ͳ͍ • WordPressͷηΩϡϦςΟϦεΫා͍ • ͪΐͬͱมΘͬͨWordPressӡ༻΍ͬͯΈ͍ͨ
  25. S t a t i c P re s s

    Λ ࢖ ͏ ϝ Ϧ ο τ • ੩తԽͨ͠ϑΝΠϧΛS3ʹ͋͛Ε͹EC2͕ෆཁ • ੩తԽ͍ͯ͠ΔͷͰɺWordPressͷϝϯςෆཁ • PHP / MySQLແ͠ͳͷͰηΩϡϦςΟϦεΫ͕ݮΔ
  26. S t a t i c P re s s

    ӡ ༻ Πϝ ʔ δ • ϩʔΧϧαʔόʹWP • AWS SDK΍AWS CLIͰS3΁ • Route53͸S3΁໊લղܾ
  27. S t a t i c P re s s

    Λ ࢖ ͏ σϝ Ϧ ο τ • PHP / MySQL͕࢖͑ͳ͍ͷͰϑΥʔϜ΍ݕࡧ͕ਏ͍ • ߋ৽ = StaticPressͰͷ࠶ߏங + S3Ξοϓϩʔυͳͷ Ͱɺසൟʹߋ৽͢ΔαΠτͩͱ൥ࡶ • ෳ਺ਓͰฤू͢Δͱ͖ɺWPͷઃஔ৔ॴʹ໎͏ • ·ͩ҆ఆ൛Ͱͳ͍ͷͰͨ·ʹόάΔ
  28. We n e e d P u l l R

    e q u e s t !
  29. S t a t i c P re s s

    ར ༻ ࣄ ྫ
  30. ͜ Μ ͳ ϋ ϯζ Φ ϯ ͋ Δ Β

    ͠ ͍Ͱ ͢ h t t p s : / / j a w s u g o s a k a . d o o r k e e p e r. j p / e v e n t s / 4 6 3 4 3
  31. T H A N K S ! • Static Website

    Hosting • WordPress with S3 • StaticPressࣄྫ঺հ