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

Engine Yard Cloud 入門

Engine Yard Cloud 入門

Yusuke Ando

April 08, 2013
Tweet

More Decks by Yusuke Ando

Other Decks in Programming

Transcript

  1. Agenda • αϯϓϧͷσϓϩΠ • &OHJOF:BSE$MPVEͷ֓ཁ • σϓϩΠͱϚΠάϨʔγϣϯ • ֤छϩά৘ใͷ֬ೝ •

    όοΫΞοϓͱεφοϓγϣοτ • εέʔϧΞ΢τ • Πϯελϯε΁ͷ44) • &OHJOF:BSE$-* • $IFGΛར༻ͨ͠؀ڥͷΧελϚΠζ
  2. Copyright © 2013 Engine Yard. All Rights Reserved. 6 2006೥ɿ

    Engine Yard ઃཱ (Ruby࣮ߦ؀ڥͷఏڙ։࢝) 2008೥ɿ Amazon༷͕Engine Yardʹग़ࢿΛൃද 2009೥ɿ AWSج൫ͷϓϥοτϑΥʔϜΛఏڙ։࢝ ࠷େڃͷAWSϦηʔϥʔʹ 2011೥ɿ PHP࣮ߦ؀ڥͷఏڙ։࢝ 2012೥ɿ Engine Yard ೔ຊ๏ਓઃཱ Node.js࣮ߦ؀ڥͷఏڙ։࢝ എܠ: Engine Yard, Inc.ͷϏϧ(ӈख)͕ݐͭ1929೥ͷαϯϑϥϯγεί Engine YardͷาΈ
  3. PaaS IaaS SaaS ΞϓϦέʔγϣϯ σʔλ ϥϯλΠϜ ϛυϧ΢ΣΞ OS Ծ૝Խ αʔόʔ

    ετϨʔδ ωοτϫʔΫ ΞϓϦέʔγϣϯ σʔλ ΞϓϦέʔγϣϯ σʔλ ϥϯλΠϜ ϛυϧ΢ΣΞ OS Ծ૝Խ αʔόʔ ετϨʔδ ωοτϫʔΫ ΦϯϓϨϛε ΞϓϦέʔγϣϯ σʔλ ϥϯλΠϜ ϛυϧ΢ΣΞ OS Ծ૝Խ αʔόʔ ετϨʔδ ωοτϫʔΫ ϋʔυ΢ΣΞɺϛυϧ ΢ΣΞɺΞϓϦέʔ γϣϯͷ͢΂ͯΛॴ༗ ͢Δܗଶ ωοτϫʔΫ΍αʔ όʔϚγϯͳͲͷΠϯ ϑϥΛαʔϏεͱͯ͠ ఏڙ͢Δܗଶ ΞϓϦέʔγϣϯͷ ػೳΛαʔϏεͱ͠ ͯఏڙ͢Δܗଶ ϥϯλΠϜ ϛυϧ΢ΣΞ OS Ծ૝Խ αʔόʔ ετϨʔδ ωοτϫʔΫ ΞϓϦέʔγϣϯ࣮ߦ ؀ڥɾ։ൃ؀ڥΛαʔ Ϗεͱͯ͠ఏڙ͢Δܗ ଶ PaaS Πϊϕʔτ Ξ΢τιʔε • ࣗ༝ʹબ୒ʗ։ൃΛ ͢Δ͜ͱ͕Մೳɻ • બ୒ʗઃఆʗ։ൃ ޻਺͕͔͔Δɻ • Πϊϕʔτ૚͕૿͑ Δ΄Ͳ޻਺૿Ճɻ • ॴ༗ʗ։ൃίετ͕ ͔͔ΒͣʹࡁΉɻ • Πϊϕʔτ૚ʹूத Ͱ͖Δɻ • Ξ΢τιʔε૚ຖʹ બ୒෯͕ݶఆ͞Εͯ ͍Δɻ
  4. ౰વग़དྷ·͢ΑͶʁ Application Server Application Server Application Server Master Database Slave

    Database LB •Ϋϥελߏ੒ͷڍಈͷཧղ •͜ͷߏ੒ͷγεςϜηοτΞοϓ •͜ͷߏ੒ͷγεςϜͷӡ༻
  5. μογϡϘʔυ΍CLI͔Βͷߴ౓ͳӡ༻ σϓϩΠ όοΫΞοϓ ΫϥελϦϯάߏ੒ NoSQL εϨʔϒDB Ϋϩʔϯ ϦόʔεϓϩΩγ Cron δϣϒ

    ৽نߏங ύοέʔδಋೖ ΞϓϦέʔγϣϯӡ༻ γεςϜ؅ཧ μογϡϘʔυ͔Β ༷ʑͳγεςϜΛਝ଎ʹߏ੒
  6. σϓϩΠ Gentoo Linux (EC2 Instance) ιʔείʔυ Gemfile rake db:migrate ઃఆϑΝΠϧੜ੒

    /data/{appname}/ releases/{datetime} ಛఆͷύεʹରͯ͠ ࣗಈσϓϩΠ
  7. CLI ΫϥΠΞϯτ • ίϚϯυϥΠϯ͔ΒEngine Yard Cloud ʹΞΫηε • gem install

    engineyard • ey deploy σϓϩΠΛ࣮ߦ • ey rebuild ؀ڥͷ࠶ߏங • ey web disable / enable WebΞΫηεͷແޮԽɾ༗ޮԽ • ey recipes ΧελϜ Chef Ϩγϐͷ࣮ߦ ΞϓϦέʔγϣϯͷ ϧʔτͰ࣮ߦ͢Δ
  8. ύοέʔδߋ৽ • શͯͷߏங͸ChefͷϨγϐ • Կ౓Ͱ΋࠶ߏஙͳͷͰ࠷৽ͷϛ υϧ΢ΣΞΛਵ࣌ಋೖՄೳ • ΧελϚΠζ΋Ͱ͖Δ • Engine

    Yard͸ϛυϧ΢ΣΞͷ ݕূΛਵ࣌ߦͳ͍ͬͯ·͢ Amazon EC2 Cloud cookbook ΧελϜϨγϐ Your App ΞυΦϯ
  9. Chef Ϩγϐͷ࣮ߦ • https://github.com/engineyard/ey-cloud-recipes • ϑΥʔΫͨ͠ϧʔτɾσΟϨΫτϦͰίϚϯυ࣮ߦ ey recipies upload -e

    ENV ey recipes apply -e ENV • ΧελϜϨγϐ͸࠶ߏங࣌ʹ΋ࣗಈ࣮ߦ • ఀࢭɾ࠶։ͰࣦΘΕͳ͍ߏ੒มߋ͸શͯϨγϐͰߦ͏